in reply to Re: Re: Anon. array of refs to a range generated list of scalars.
in thread Anon. array of refs to a range generated list of scalars.
If you need last, wrap the whole thing:do {{ $bar; baz() or next; }} while $foo;
Of course, if you need both, it does get awfully clumsy:{ do { $bar; baz() and last; } while $foo; }
In that case, and if you're so inclined then maybe in the other cases as well, I propose:LOOP: { do {{ $bar; baz() or next; quux() and last LOOP; }} while $foo; }
At least it documents the loop nature of the block, even if the break condition is again somewhat hidden.while(1) { $bar; baz() or next; quux() and last; }
Makeshifts last the longest.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re4: Anon. array of refs to a range generated list of scalars.
by Hofmator (Curate) on Jan 18, 2003 at 20:31 UTC | |
by Aristotle (Chancellor) on Jan 18, 2003 at 20:54 UTC |