use IO::Handle; STDOUT->autoflush(1); STDERR->autoflush(1); #### use strict; use IPC::Run qw(run); my @com = qw(outerr.pl); my ($in, $out); run( \@com, \$in, \$out, \$out); print $out;