Forked from bessarabov/gist:d3936945c5bafac4855c4fa4cb72067c
Created
June 26, 2016 11:46
-
-
Save mishin/f727ae3a2e1d5fd2f79ca86d2d706948 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/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