Refining what InfiniteSilence said and applying to the OP examples, I'd go with:
sub part0 { ... } sub part1 { ... } if ( $condition1 ) { { part0(); last if $condition2; part1(); } --$loop; }
Then all of the condition and decrement logic is, visually, close together, so easier to understand.
In reply to Re: at continue, last
by RonW
in thread at continue, last
by djerius
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |