use strict; use warnings; # Just to demonstrate the problem: $SIG{__DIE__} = sub {die "[Unwanted stuff] @_"}; eval { local %SIG; die("Something is wrong!\n"); }; print "Got: $@\n";