in reply to Breaking a Loop

Call a subroutine from the middle of the loop, perhaps? I don't know what trouble you are having "stopping the loop".

-- Randal L. Schwartz, Perl hacker