Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re: Error Checking: Have you tried 'Try/Catch'?

by mirod (Canon)
on Feb 20, 2001 at 12:22 UTC ( [id://59614]=note: print w/replies, xml ) Need Help??


in reply to Error Checking: Have you tried 'Try/Catch'?

Just for information, here is the True Perl Way (tm):

eval { die "screaming" }; if( $@=~ /screaming/) { print "stop screaming\n"; } print "happily going on\n";

$@ is empty ('') if the eval succeeds, otherwise it contains the error message returned by the code.

Log In?
Username:
Password:

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

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

    No recent polls found