perl -we 'my $x = 0;eval "local \$SIG{__DIE__} = sub {\$x = 123};4/0"; print "$x: $@"' 123: Illegal division by zero at (eval 1) line 1.