Not to "pile on", but I wanted to note that over the years I've found "early return" to be one of the best refactoring tools. I've used it to turn many a convoluted loops with overly complex flow control into a "trivial" / "obvious" loop that calls a very simple subroutine with an early return. It is the most maintainable of "jump out here" flows, quite a bit better than last or my $done= 0; and tons better than "bare block as 'loop' with redo" [expletive], for example.
- tye
In reply to Re: "return" to break out of a loop (super)
by tye
in thread "return" to break out of a loop
by weedom
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |