in reply to exit a loop

Sounds like you want last. But it's also worth reading up on next and redo.

--
<http://dave.org.uk>

"The first rule of Perl club is you do not talk about Perl club."
-- Chip Salzenberg