If you really want the output, you might want to go back to using backticks. You can get the return code from $? after the command has run and you can capture or print the output.
Also, keep in mind that the return code, both as returned by system() and as available in $? is actually the value returned by the wait() system call. You will need to shift it to the right by 8 bits (or divide by 256) to get the actual return code.
Something like this:
#!/usr/bin/perl # This is minimal and hasn't been checked at all. print "Content-type: text/html\n\n"; print `/path/to/perl -w /path/to/script -opts`; # FIX THIS LINE print "Exit value: ", $? >> 8;
-sauoq "My two cents aren't worth a dime.";
In reply to Re: Executing another script from a CGI
by sauoq
in thread Executing another script from a CGI
by higle
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |