Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Re: Capturing STDERR using IO::Handle

by ysth (Canon)
on Nov 26, 2007 at 09:11 UTC ( [id://652948]=note: print w/replies, xml ) Need Help??


in reply to Capturing STDERR using IO::Handle

You are suffering from a little confusion. The fdopen method doesn't associate some other filehandle with your IO::Handle; it's the other way around: after the fdopen, your $stderr will be associated with whatever STDERR was before (only with the incorrect 'r' mode).

To capture STDERR of a system call, you'd want the stderr output to go to some temporary file and then (rewind if necessary and) read from the file.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others pondering the Monastery: (6)
As of 2024-04-18 13:45 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found