Advertisement
Guest User

Untitled

a guest
Jun 26th, 2016
57
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.30 KB | None | 0 0
  1. #!/usr/bin/perl
  2.  
  3. use strict;
  4. use warnings FATAL => 'all';
  5. use feature 'say';
  6.  
  7. say '1';
  8.  
  9. if (1) {{
  10. say '2';
  11. last;
  12. say '3';
  13. }}
  14.  
  15. say '4';
  16.  
  17. __END__
  18. output:
  19.  
  20. $ perl script
  21. 1
  22. 2
  23. 4
  24.  
  25. without double {{ :
  26.  
  27. $ perl script
  28. 1
  29. 2
  30. Can't "last" outside a loop block at c.pl line 11.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement