in reply to IPC::Open3 confusion
Try adding this at the top of your outerr.pl:
Update:Also, IPC::Run is reputed to be safer to use than IPC::Open3. Here is how it would look:use IO::Handle; STDOUT->autoflush(1); STDERR->autoflush(1);
(Sad to say though, neither this version nor the one by BazB seems to give the interleaved output you want, even with autoflush turned on, on my Linux box. All the STDOUTs come before all the STDERRs).use strict; use IPC::Run qw(run); my @com = qw(outerr.pl); my ($in, $out); run( \@com, \$in, \$out, \$out); print $out;
|
|---|