Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re: Re: once again: program output and return code

by chipmunk (Parson)
on Jun 07, 2001 at 19:55 UTC ( [id://86609]=note: print w/replies, xml ) Need Help??


in reply to Re: once again: program output and return code
in thread once again: program output and return code

Adding an extra level of indirection with eval does noth solve the problem. eval returns the value of the last expression evaluated, but that last expression would return the same value without the help of eval:
$x = 1; $y = 2; $return1 = $x + $y; $return2 = eval { $x = 1; $y = 2; $x + $y }
If particle already knew what that last expression should be, to get the value he wants, using eval wouldn't gain him anything.

I know how to get STDIN and STDOUT, or STDIN and the exit value, but I can't figure out how to get STDOUT, STDERR, and the exit value. :(

Replies are listed 'Best First'.
Re: Re: Re: once again: program output and return code
by particle (Vicar) on Jun 07, 2001 at 22:03 UTC
    > I know how to get STDIN and STDOUT, or STDIN and the exit value, but I can't figure out how to get STDOUT, STDERR, and the exit value. :(

    i'm just glad i'm not crazy. but maybe i can narrow the scope a little. i know i can get return code from system. but can i redirect the output of the system call in a portable way?

    =Particle

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://86609]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others romping around the Monastery: (4)
As of 2024-04-19 15:46 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found