⭐ in reply to How can I redirect STDOUT and STDERR from a program on WIN32?
Now you are reading both STDERR and STDOUT of the file from CAPTURE.use IPC::Open3; open3("<&STDIN", \*CAPTURE, \*CAPTURE, $cmd) or die "Cannot run $cmd: +$!";
I don't know how to do this and get return codes as well though, the return of open3 is a process ID. Also note that you need to be careful with mixing filehandles. Should you try to get output while it is giving you input, programs take a while to get bored with that sort of silliness...
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Answer: How can I redirect STDOUT and STDERR from a program on WIN32?
by stdout (Initiate) on Oct 03, 2004 at 19:27 UTC |