Skip to content

Instantly share code, notes, and snippets.

@tobyink
Created August 8, 2012 20:26
Show Gist options
  • Save tobyink/3298347 to your computer and use it in GitHub Desktop.
Save tobyink/3298347 to your computer and use it in GitHub Desktop.
compile-time versus run-time fatal warnings
use 5.010;
use warnings FATAL => qw(all);
eval { "x" + 1 } or warn "Caught error: $@\n";
use 5.010;
use warnings FATAL => qw(all);
eval { $x =+ 2 } or warn "Caught error: $@\n";
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment