in reply to
once again: program output and return code
eval tells me:
In both forms, the value returned is the value of
the last expression evaluated inside the mini-
program; a return statement may be also used, just
as with subroutines. The expression providing the
return value is evaluated in void, scalar, or list
context, depending on the context of the eval
itself. See the wantarray entry elsewhere in this
document for more on how the evaluation context
can be determined.
So you can get the return with $ret = eval ....
If you want to execute a shell, use system with redirection:
$ret = system('perl','return.pl',">$tmp_stdout","2&>$tmp_stderr");
"We are not alone"(FZ)