I would use a statement modifier here
OUTER: foreach my $i ( $from .. $to ) { $i % $_ and next OUTER for 2 .. 5; say $i; }
because it is more like natural language, and because I dislike both one-line-xxx(){...}-loops and multiline loops with just one statement in the loop body.
But that's just a matter of taste or style ;-)
In reply to Re^2: if ... elsif ... else
by shmem
in thread if ... elsif ... else
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |