in reply to
next and last within subs
The following three lines are equivalent to your subroutine. Use them each place they are needed.
last if $x > $stop; next if $y eq $text; foobar();
[download]
Bill
Comment on
Re: next and last within subs
Download
Code
In Section
Seekers of Perl Wisdom