To catch die's with eval, the eval block must be terminated with a semi-colon.
Do you have a source for this?
sub dies { die "That's it!"; } if (eval { dies(); 1 }) { print "No death!\n"; } else { print "Death caught: $@\n"; }
In reply to Re: Re: Error Handling Misconception
by chromatic
in thread Error Handling Misconception
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |