in reply to Best Way to Skip out of a sub Entirely
But just for completeness1 you can use next to skip in your loop e.g
sub foo { bar(); print "at $_\n" } sub bar { next LOOP if $_ % 2 == 0 } LOOP: for(0 .. 10) { foo() } __output__ at 1 at 3 at 5 at 7 at 9
_________
broquaint
1 forgive me Larry, for I am about to sin ...
|
|---|