Re: Backticks and the cmd.exe shell

2005-01-03 Thread Sisyphus
Jan Dubois wrote: On Mon, 03 Jan 2005, Sisyphus wrote: Have you tried : my $out = `cmd /C dir`; No, I didn't - mainly because '/C' does not appear as an option in 'cmd command' under Windows Help. I did try a few other switches which *were* mentioned there (such as '/c' and '/k') but they didn't wo

RE: Backticks and the cmd.exe shell

2005-01-03 Thread Jan Dubois
On Mon, 03 Jan 2005, Sisyphus wrote: >>> Have you tried : >>> >>> my $out = `cmd /C dir`; > > No, I didn't - mainly because '/C' does not appear as an option in > 'cmd command' under Windows Help. I did try a few other switches which > *were* mentioned there (such as '/c' and '/k') but they didn't

Re: Backticks and the cmd.exe shell

2005-01-03 Thread Sisyphus
Unfortunately, $out contains the output of running 'dir.exe'. How do I code it so that $out captures the output of running the 'dir' shell command, rather than the output of running 'dir.exe' ? Have you tried : my $out = `cmd /C dir`; No, I didn't - mainly because '/C' does not appear as an option

RE: Backticks and the cmd.exe shell

2005-01-03 Thread Jan Dubois
On Mon, 03 Jan 2005, $Bill Luebkert wrote: > Sisyphus wrote: > > > Suppose I have a file somewhere in my path named 'dir.exe' (that > > prints "Gotcha!" when executed). > > > > I also have a perl script, in which I want to capture the output of > > running the 'dir' shell command. So I write: > > >

Re: Backticks and the cmd.exe shell

2005-01-03 Thread $Bill Luebkert
Sisyphus wrote: > Hi, > > Suppose I have a file somewhere in my path named 'dir.exe' (that prints > "Gotcha!" when executed). > > I also have a perl script, in which I want to capture the output of > running the 'dir' shell command. So I write: > > my $out = `dir`; > > Unfortunately, $out co