Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re^3: STDERR going to string

by Anonymous Monk
on Oct 12, 2011 at 10:13 UTC ( #930967=note: print w/ replies, xml ) Need Help??


in reply to Re^2: STDERR going to string
in thread STDERR going to string

because re-opening STDERR decouples perl's STDERR from the called C library's STDERR

It will probably work if you save/dup STDERR and restore it

open my $errsave, '>&', STDERR or do { print "couldn't dup STDERR: $!"; exit 2; }; open STDERR ... ... open STDERR, '>&', $errsave or do { print "couldn't restore/dup STDERR: $!"; exit 2; };


Comment on Re^3: STDERR going to string
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (11)
As of 2014-08-28 13:51 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The best computer themed movie is:











    Results (261 votes), past polls