more useful options | |
PerlMonks |
Re: A few random questions from Learning Perl 3by jpfarmer (Pilgrim) |
on Jan 06, 2003 at 04:59 UTC ( [id://224546]=note: print w/replies, xml ) | Need Help?? |
3) next brings things to the bottom iteration of a loop, right? Does that mean you can't call next more than once in any given loop? If not, what happens if you need to?
Actually, it bypasses the remaining statements in the loop and goes directly to the next iteration. You can put more than one next in a loop, but once the first one is executed, the rest will be irrelevant. However, you could do something like this:
Then you could have more than one next and it make sense.
In Section
Seekers of Perl Wisdom
|
|