in reply to IPC::Open3 woes

I'm expecting this script to write the output from my test.pl script to output.log and errors from the test script to error.log, however both files are created, but empty.

Unfortunately, you can't just link one thing to another using a single filehandle. You'll have to create some data pipe yourself: read out the programs stdout and stderr, and write it back to the files you want. Don't forget to waitpid, after which $? will have the status code.

44696420796F7520732F2F2F65206F
7220756E7061636B3F202F6D736720
6D6521203A29202D2D204A75657264

Replies are listed 'Best First'.
Re: Re: IPC::Open3 woes
by rjray (Chaplain) on Mar 10, 2002 at 22:41 UTC

    This doesn't quite address the writer's original problem, though. He isn't expecting that, he's using the (correct) library module to set up the pipes on his behalf, behind the scenes. I think a large part of the problem stems from a lack of clarity in the manual page for IPC::Open3, at least in this case.

    --rjray