Everyone seems to want to talk about $SIG{__DIE__}. For
much finer-grained control check out
eval and $@. If you
wish to combine the two mechanisms you will need to use
$^S in your DIE handler. See
perlvar. (Or use the
perldoc command to read the local versions of these.)