Skip to content

Instantly share code, notes, and snippets.

@bessarabov
Last active June 26, 2016 11:46
Show Gist options
  • Select an option

  • Save bessarabov/d3936945c5bafac4855c4fa4cb72067c to your computer and use it in GitHub Desktop.

Select an option

Save bessarabov/d3936945c5bafac4855c4fa4cb72067c to your computer and use it in GitHub Desktop.
#!/usr/bin/perl
use strict;
use warnings FATAL => 'all';
use feature 'say';
say '1';
if (1) {{
say '2';
last;
say '3';
}}
say '4';
__END__
output:
$ perl script
1
2
4
without double {{ :
$ perl script
1
2
Can't "last" outside a loop block at c.pl line 11.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment