Hello,

Try this:

$ perl -le '$c="ls -l";print $c;system $c'
ls -l
total 16
drwxr-xr-x 4 pyh pyh 4096 2012-05-12 17:08 backup
drwxr-xr-x 2 pyh pyh 4096 2012-05-13 08:29 bin
drwxr-xr-x 5 pyh pyh 4096 2012-05-03 11:03 ipdata
drwxr-xr-x 4 pyh pyh 4096 2012-05-14 10:34 tmp



Hi

                 I want to print the command during script execution .
Example :


===================
$ls = `ls`;

Print "$ls\n";
==================

In the above script I want to print "ls" command before 'ls' command gets executed . Like 
 "set -x" does  in  shell scripts .

Could you please help me on this ?

Thanks
Sunita






--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/


Reply via email to