in reply to running an outside script

There's a very simple way to do it in Perl:
my $prog_output = `shell_command 2&>1`; print "OUTPUT: $prog_output\n";
At least this is what I have in a few of my smaller scripts (mostly throw-away) running in tcsh shell. The '2&>1' simply makes it so that all the error messages produced by the script (printed to the STDERR file handler) will also be 'sent' to STDOUT and consequently received by our script.

There are of course other much better approaches. For example, take a look at vroom's explanation here. Or also take a look at the Perl interprocess communication document, especially the 'Using open() for IPC' section ;-)



_____________________
# Under Construction