in reply to Use of 'last' within single-line while loops
last will exit the inner-most loop statement. Those are:
Expressions with loop statement modifiers are not considered by last. The same goes for loop-like functions. These include the following:
All loop statements have braces, but not all braces are related to loop statements. The following are examples that aren't:
If you want a warning for the code you used, take a look at perlcritic. If it doesn't yet have a rule for it, you could create one.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Use of 'last' within single-line while loops
by choroba (Cardinal) on Mar 21, 2018 at 06:52 UTC | |
by ikegami (Patriarch) on Mar 21, 2018 at 17:00 UTC | |
|
Re^2: Use of 'last' within single-line while loops
by hurricup (Pilgrim) on Mar 21, 2018 at 07:34 UTC |