use warnings; use strict; quit: for (1 .. 10) { check_early ($_); } sub check_early { my $value = shift; last quit if $value == 5; print "$value\n"; }
Prints:
1 Exiting subroutine via last at noname1.pl line 11. 2 3 4 Exiting subroutine via last at noname1.pl line 11.
In reply to Re: Desparate behavior in loop labels
by GrandFather
in thread Desparate behavior in loop labels
by b4swine
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |