[Israel.pm] Echo-ing commands to the standard output

Shlomi Fish shlomif at iglu.org.il
Sun Feb 27 11:13:42 PST 2005


On Sunday 27 February 2005 18:26, David Rachamim wrote:
> Hi All,
> Is there a way to have Perl echo the commands it gets to the standard
> output (or to any other place) before it executes them?

Try the Devel::Trace module from CPAN:

http://search.cpan.org/dist/Devel-Trace/

It should do exactly that.

Regards,

	Shlomi Fish


> The following example may explain what I mean:
>
> The script:
> -----------
>
> print "Hello\n";
> for (1..3)
> {
> 	print "$_\n";
> }
>
>
> The output (should be something generally like this):
> -----------------------------------------------------
>
> print "Hello\n";
> Hello
> for (1..3)
> {
> 	print "$_\n";
> }
> print "$_\n";
> 1
> print "$_\n";
> 2
> print "$_\n";
> 3
>
> --------------------
> Thanks,
> David
>
> _______________________________________________
> Perl mailing list
> Perl at perl.org.il
> http://perl.org.il/mailman/listinfo/perl

-- 

---------------------------------------------------------------------
Shlomi Fish      shlomif at iglu.org.il
Homepage:        http://www.shlomifish.org/

Knuth is not God! It took him two days to build the Roman Empire.



More information about the Perl mailing list