in reply to $SIG{__DIE__} not working as expected
You can arrange for a callback to be run just before the "die"
does its deed, by setting the $SIG{__DIE__} hook. ...
You can change the message by die-ing again in your handler, but you cannot prevent death.
If you need to continue, wrap your code in an eval block:
eval { ... die "Hi!"; }; print "cheated death!\n";
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: $SIG{__DIE__} not working as expected
by educated_foo (Vicar) on Jun 09, 2008 at 01:06 UTC |