Re: Saving STDERR into a variable

2003-03-19 Thread zentara
On 18 Mar 2003 23:48:25 -, [EMAIL PROTECTED] (Steve Grazzini) wrote: >James Kipp <[EMAIL PROTECTED]> wrote: >> Navid M. <[EMAIL PROTECTED]> writes: >>> >>> I was wondering if it's possible to save the error of >>> a DOS command from the error stream into a variable. >>> >> you could try the

RE: Saving STDERR into a variable

2003-03-19 Thread Kipp, James
> >> > >> I was wondering if it's possible to save the error of > >> a DOS command from the error stream into a variable. > >> > > you could try the old 2>&1 trick > > $out = `$cmd 2>&1`; > > as others have mentioned, the above may depend on your which win32 OS you are using. works fine on my

Re: Saving STDERR into a variable

2003-03-19 Thread Steve Grazzini
James Kipp <[EMAIL PROTECTED]> wrote: > Navid M. <[EMAIL PROTECTED]> writes: >> >> I was wondering if it's possible to save the error of >> a DOS command from the error stream into a variable. >> > you could try the old 2>&1 trick > $out = `$cmd 2>&1`; > > or use system() and read the docs for

Re: Saving STDERR into a variable

2003-03-18 Thread Wiggins d'Anconia
Kipp, James wrote: Hello, I was wondering if it's possible to save the error of a DOS command from the error stream into a variable. For example, the STDOUT of a DOS command can be saved to a variable this way: $var = `dir`; # Using back quotes but this won't save anything from STDERR. you

RE: Saving STDERR into a variable

2003-03-18 Thread Kipp, James
> Hello, > > I was wondering if it's possible to save the error of > a DOS command from the error stream into a variable. > > For example, the STDOUT of a DOS command can be saved > to a variable this way: > > $var = `dir`; # Using back quotes > > but this won't save anything from STDERR. y

Saving STDERR into a variable

2003-03-18 Thread Navid M.
Hello, I was wondering if it's possible to save the error of a DOS command from the error stream into a variable. For example, the STDOUT of a DOS command can be saved to a variable this way: $var = `dir`; # Using back quotes but this won't save anything from STDERR. Thanks, Navid M. __