http://www.perlmonks.org?node_id=520101


in reply to Re: Capturing stderr
in thread Capturing stderr

That looks painful. Is there any reason that IPC::Open3 wouldn't work?

-Jeff

Replies are listed 'Best First'.
Re^3: Capturing stderr
by Celada (Monk) on Dec 31, 2005 at 06:33 UTC

    IPC::Open3 will indeed simplify the first half of the code, which deals with the piping and the forking. Sorry for recommending the long winded solution :-( . It won't help with reading the outputs afterwards though, you still have to use a select loop to read interleaved input from both handles. That's why [id://ikegami]'s recommentation of IPC::Run looks like it's even easier (thanks!).