in reply to open3 question

In the code for IPC::Open3, if you set the third (stderr) filehandle to 0, stderr will be sent to stdout
#my $pid = open3(\*WRITE, \*READ, \*ERROR,"bc"); my $pid = open3(\*WRITE, \*READ,0,"bc"); #if \*ERROR is false, STDERR is sent to STDOUT
Also in your code you have 2 while loops, one for $out and one for $err. You will be better off using IO::Select to read the filehandles, otherwise the first while loop will "block" unless it's properly constructed.

I'm not really a human, but I play one on earth. flash japh