Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re: Saving Standard Error

by jrsimmon (Hermit)
on Aug 06, 2009 at 18:59 UTC ( [id://786540]=note: print w/replies, xml ) Need Help??


in reply to Saving Standard Error

  • Closing STDERR is a bad idea. Perhaps there is a situation where it is not, but I can't think of any.
  • If you had searched for an answer to your question, you might have found intersting nodes such as this one, this one, and this one.

Replies are listed 'Best First'.
Re^2: Saving Standard Error
by bichonfrise74 (Vicar) on Aug 06, 2009 at 19:45 UTC
    Can you explain why closing STDERR is a bad idea? I never knew that.
      use strict; use warnings; warn "My errors go to the console!"; open(STDERR, ">myErr.log") or die $!; warn "My errors are logged!"; close(STDERR); warn "My errors go...nowhere!";

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (2)
As of 2025-02-08 04:25 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Which URL do you most often use to access this site?












    Results (95 votes). Check out past polls.