It might have been even faster to look up the documentation for last with perldoc -f last, or here: perlfunc. Look at the example! It's got a while loop with last breaking out of it.
# example from perldoc -f last
LINE: while (<STDIN>) {
last LINE if /^$/; # exit when done with header
#...
}