in reply to once again: program output and return code
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:
Jeroen$ret = system('perl','return.pl',">$tmp_stdout","2&>$tmp_stderr");
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Re: once again: program output and return code
by chipmunk (Parson) on Jun 07, 2001 at 19:55 UTC | |
by particle (Vicar) on Jun 07, 2001 at 22:03 UTC | |
Re: Re: once again: program output and return code
by particle (Vicar) on Jun 07, 2001 at 19:25 UTC | |
by jeroenes (Priest) on Jun 07, 2001 at 19:31 UTC |