What would you say? Is this an acceptable (even idiomatic use of "last") or just a hack that should be avoided?
Its goto which has a strong connection to spaghetti code
So sure this "feature" is http://perldoc.perl.org/perlsyn.html#Basic-BLOCKs but lots will find it fishy
How does 'goto LABEL' search for its label?, Re^3: Re Execute Lines of Code ("loops"), How does next label work?, An exploration of higher-level-language approaches to the "First all-zero row in an NxN matrix" problem (goto Considered Harmful), Why I Hate Nested If-Else blocks
Perl::Critic::Policy::ControlStructures::ProhibitCascadingIfElse - Don't write long "if-elsif-elsif-elsif-elsif...else" chains.]
see source of Regexp::Grammars search for elsif
So there you have it, all kinds of opinions, all equally optional :)
In reply to Re: use of last ( is goto, bare blocks aren't loops)
by Anonymous Monk
in thread use of last
by morgon
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |