XP is just a number | |
PerlMonks |
Re: perl exit eval via next in a loopby hardburn (Abbot) |
on Jul 17, 2013 at 14:30 UTC ( [id://1044823]=note: print w/replies, xml ) | Need Help?? |
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.
In Section
Seekers of Perl Wisdom
|
|