{ local *CORE::GLOBAL::die = sub { print "Really die? "; if (($resp = <STDIN>) =~ /^y/i) { CORE::die @_; } else { print "narrowly averted: @_\n"; } }; # do the thing that dies }
In reply to Re^2: $SIG{__DIE__} not working as expected
by educated_foo
in thread $SIG{__DIE__} not working as expected
by duelafn
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |