Title: RE: system();

Does not work on Win9x.

-Peter

Peter A. Vogel
Manager, Engineering Operations
iReady Corporation
http://www.iready.com http://www.iready.net 


> -----Original Message-----
> From: Joe Schell [mailto:[EMAIL PROTECTED]]
> Sent: Monday, May 22, 2000 7:35 AM
> To: Perl-Win32-Users Mailing List
> Subject: RE: system();
>
>
> '2>&1' works on WinNT.  I am not so confident that it works
> in the standard
> shell for win 9x.  Has anyone verified this?
>
> > Behalf Of Bellenger, Bruno (Paris)
> >
> >
> > >"Hogue, Jon" wrote:
> >     >> I want to run a dos command and play with the output of the
> > command.
> >     >>
> >     >> For example,
> >     >>
> >     >> If I do system("foo.exe"), how do I get the ouput of foo.exe.
> > (not the exit
> >     >> status).
> >
> > >Open it in a pipe:
> > >#open(FOO, "foo.exe|");
> >
> > open(FOO, "foo.exe| 2>&1");
> > # adding '2>&1' will get you what foo.exe writes to STDERR too,
> > # not just STDOUT
> > # An alternative if you're not expecting lots of lines is
> the simpler :
> > @foo_return = `foo.exe` ;
> > # Note : The above uses backticks, not single quotes.
> > # Each element of @foo_return now contains one line of foo.exe's
> > # output (including the newline/carriage return char.).
> >
> > >(Note: I've assumed this works on Perl-Win32. I've only
> used it on Unix.)
> >
> > It does work on WIN32.
> >
>
>
> ---
> You are currently subscribed to perl-win32-users as:
> [EMAIL PROTECTED]
> To unsubscribe, forward this message to
>          [EMAIL PROTECTED]
> For non-automated Mailing List support, send email to 
>          [EMAIL PROTECTED]
>

Reply via email to