Skip to content

Instantly share code, notes, and snippets.

@dylanwh
Created January 14, 2016 19:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dylanwh/8e46c22bda50eb21e60f to your computer and use it in GitHub Desktop.
Save dylanwh/8e46c22bda50eb21e60f to your computer and use it in GitHub Desktop.
use strict;
use warnings;
$SIG{__DIE__} = sub {
print "die handler: @_";
};
$SIG{__WARN__} = sub {
print "warn handler: @_";
};
eval {
die "error message";
};
warn $@;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment