last 
last LABEL
lastThe last operator immediately exits the loop in question, just like the
break statement in C or Java (as used
in loops). If LABEL is omitted, the operator
refers to the innermost enclosing loop. The continue block, if any, is not
executed.
LINE: while (<MAILMSG>) {
last LINE if /^$/; # exit when done with header
# rest of loop here
}last cannot be used to exit a
block that returns a value, such as eval
{}, sub {}, or do {}, and it should not be used to exit a
grep or map operation. With warnings enabled, Perl
warns if you last out of a loop
that’s not in your current lexical scope, such as a loop in a calling
subroutine.
A block by itself is semantically identical to a loop that
executes once. Thus, last can be used
to effect an early exit out of such a block. See also Chapter 4 for illustrations of how last, next,
redo, and continue work.