Skip to content

Instantly share code, notes, and snippets.

@ugexe

ugexe/test.pl6 Secret

Created April 27, 2017 18:37
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 ugexe/47c6369bead8707a1aa158be78939bd2 to your computer and use it in GitHub Desktop.
Save ugexe/47c6369bead8707a1aa158be78939bd2 to your computer and use it in GitHub Desktop.
# Doesn't short-circuit, so always dies
my $foo = try { die "xxx" }
|| try { 1 }
|| die "le end";
# Short-circuits, assign $foo the value of 1
my $foo = try { die "xxx" }\
|| try { 1 }\
|| die "le end";
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment