in reply to Pipe, fork, exec and red-hot pokers.
My guess is that you want to look at either IPC::Open3 or Expect.
With Expect, the new program will be on a tty, so it will be line buffered, however your stdout and stderr will be mixed together.
With IPC::Open3, the stdout and stderr will be seperated, but stdout won't be line buffered.
However, as it says in the IPC::Open3 docs, you can use IO::select to do non-blocking I/O on the resulting filehandles.
|
|---|