in reply to Script wrapper script

See if this works for you. I'm not sure it will always capture $? correctly.
#!/usr/bin/perl use warnings; use strict; use IPC::Open3; #my $cmd = 'ls -la'; my $cmd = 'date'; my $pid = open3(\*WRITER, \*READER, \*ERROR, $cmd); # if \*ERROR is set to 0, stderr will be combined with stdout # set \*WRITER to 0 unless you need to write to stdin while( my $output = <READER> ) { #can send this to files print "output->$output"; } while( my $errout = <ERROR> ) { #can send this to files print "err->$errout"; } waitpid( $pid, 0 ) or die "$!\n"; my $retval = $?; print "pid->$pid\nretval->$retval\n";

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