in reply to while 's 'continue' block
So here, the continue block contains the "get to the next item" code in a clean location. Leaving out that last "redo" means I could use it as a "finally" clause... no matter what exit I take via "next" inside the block, it's gonna run that code.{ blah blah; blah blah; last if $some_exit_condition; blah blah; blah blah; next if $some_early_next_condition; blah blah; blah blah; last; # or redo, if near-infinite loop } continue { blah blah; blah blah; redo; }
Sorry for the abstract code here. A real example is still gelling in my head. If pressed, I show it.
-- Randal L. Schwartz, Perl hacker
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: while 's 'continue' block
by coreolyn (Parson) on Jan 04, 2001 at 21:44 UTC | |
|
Re: Re: while 's 'continue' block
by extremely (Priest) on Jan 05, 2001 at 01:15 UTC |