Re: how to display commands while perl script executing

2012-05-15 Thread Torqued
Regards.../om On 15-May-2012, at 18:23, Bob McConnell wrote: >> From: Sunita.Pradhan >> >>I want to print the command during script execution . >> Example : >> >> >> === >> $ls = `ls`; >> >> Print "$ls\n"; >> == >> >> In the above script I w

RE: how to display commands while perl script executing

2012-05-15 Thread Bob McConnell
> From: Sunita.Pradhan > > 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"

Re: how to display commands while perl script executing

2012-05-15 Thread Michael Rasmussen
On Tue, May 15, 2012 at 07:40:44AM -0400, sunita.prad...@emc.com wrote: > Hi > > I want to print the command during script execution . > Example : > > === > $ls = `ls`; > > Print "$ls\n"; > == A straightforward way to do this is to run your script

Re: how to display commands while perl script executing

2012-05-15 Thread Shlomi Fish
Hi Sunita, On Tue, 15 May 2012 07:40:44 -0400 wrote: > Hi > > I want to print the command during script execution . > Example : > > > === > $ls = `ls`; > > Print "$ls\n"; > == > I should note that trapping the output of "ls" is pretty silly

RE: how to display commands while perl script executing

2012-05-15 Thread Sunita.Pradhan
It is working for one line program . How can we implement in a script ? -Sunita -Original Message- From: CloudWebDNS.com [mailto:supp...@cloudwebdns.com] Sent: Tuesday, May 15, 2012 5:27 PM To: beginners@perl.org Subject: Re: how to display commands while perl script executing Hello

Re: how to display commands while perl script executing

2012-05-15 Thread CloudWebDNS.com
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

how to display commands while perl script executing

2012-05-15 Thread Sunita.Pradhan
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