BEGIN { $SIG{__DIE__} = sub { mail( $_[0] ) }; }
That will send the die message to your mail routine. Alternatively, if you don't want to catch all dies, check out the block form of eval.
In reply to Re: Catch all die in Perl?
by friedo
in thread Catch all die in Perl?
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |