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 ); }
In reply to Re^4: Re Execute Lines of Code ("loops")
by hipowls
in thread Re Execute Lines of Code
by btobin0
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |