$SIG{__DIE__} = sub { if (! $^S ) { # Report the error } else { # Ignore the error as it came # came from inside an eval } };