use SysCall3; my $nasty = SysCall3 -> exec( 'bigNastyProgram' ); for my $err ( $nasty -> getinfo( 'STDERR' ) ) { # process the error output print STDERR $err; } for my $out ( $nasty -> getinfo ('STDOUT' ) ) { # process the stdout print $out; } my $code = $nasty -> getinfo( 'EXITCODE' ); # process return code exit $code; # if wanting to pass control back to the o/s