Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re: How can I tell at run time that my script is writing to STDERR?

by zigdon (Deacon)
on Oct 23, 2002 at 16:27 UTC ( [id://207438]=note: print w/replies, xml ) Need Help??


in reply to How can I tell at run time that my script is writing to STDERR?

use the $SIG{__WARN__}:
$SIG{__WARN__} = sub { die $_[0] }; warn "This will be fatal\n"; print "You will never get to this line\n";
See perlvar for more info.
  • Comment on Re: How can I tell at run time that my script is writing to STDERR?
  • Download Code

Log In?
Username:
Password:

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

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

    No recent polls found