Perl: the Markov chain saw | |
PerlMonks |
Re: how to stop the fileby screamingeagle (Curate) |
on Feb 05, 2002 at 08:11 UTC ( [id://143379]=note: print w/replies, xml ) | Need Help?? |
you could use the last function , which immediately breaks out of the loop.
Keep in mind that (Quoting from the documentation) "last cannot be used to exit a block which returns a value such as eval {}, sub {} or do {}, and should not be used to exit a grep() or map() operation"
In Section
Seekers of Perl Wisdom
|
|