in reply to Re: Can a while loop be stopped with "last"?
in thread Can a while loop be stopped with "last"?

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 #... }