in reply to Re^3: How to print STDOUT to a file
in thread How to print STDOUT to a file

system($rnapath, "-p", "-noCloseGU", "-noLP", "$_") == 0 or die $?;
$rnapath being the program called. Thank you for your patience.

Replies are listed 'Best First'.
Re^5: How to print STDOUT to a file
by salva (Canon) on Nov 14, 2005 at 12:22 UTC
    the bullet proof way:
    my $pid = fork; if (defined $pid and $pid == 0) { open STDOUT, ">", $fn or die; exec $script, @args; exit 1; } if ($pid) { waitpid($pid); $? and die "error on child: $?" } else { die "unable to fork: $!"; }