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

Re: perl exit eval via next in a loop

by hardburn (Abbot)
on Jul 17, 2013 at 14:30 UTC ( [id://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
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1044823]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others contemplating the Monastery: (5)
As of 2024-04-19 13:23 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found