in reply to Re^3: Re Execute Lines of Code ("loops")
in thread Re Execute Lines of Code
Now consider a bare block with both redo and last. It is exactly like two labels with gotos except that it is often less clear.
Then why not use loop labels for redo, next and last?
FILE: while ( my $file = $DIR> ) { ... last FILE if ( condition1 ); ... redo FILE if ( condition2 ); }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^5: Re Execute Lines of Code (labels)
by tye (Sage) on Jan 28, 2008 at 06:20 UTC | |
by hipowls (Curate) on Jan 28, 2008 at 06:36 UTC |