Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re: perl exit eval via next in a loop

by hardburn (Abbot)
on Jul 17, 2013 at 14:30 UTC ( #1044823=note: print w/replies, xml ) Need Help??


in reply to perl exit eval via next in a loop

If there was an otherwise fatal error (like a die()) somewhere inside the eval, it will be captured and printed out in the warn. The $@ variable holds the error message that it would have die()'d with. The loop can then continue on as if nothing happened, and you have a nice little error message to help debug things.


"There is no shame in being self-taught, only in not trying to learn in the first place." -- Atrus, Myst: The Book of D'ni.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (4)
As of 2019-10-20 23:54 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Notices?