# Your version $result = system(@_); #### # My version my $pid = open3($chld_in, $chld_out, $chld_err, @_) or return -1;