in reply to Catch all die in Perl?
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.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Catch all die in Perl?
by Anonymous Monk on Jul 18, 2005 at 21:02 UTC |