Pathologically Eclectic Rubbish Lister | |
PerlMonks |
Re: loopy troubleby jeffa (Bishop) |
on Jan 07, 2016 at 21:31 UTC ( [id://1152252]=note: print w/replies, xml ) | Need Help?? |
First you have to answer the question, is the amount of times to loop going to be known ahead of time or will it depend on some condition being met down the road? If the former, you generally use for loops, and you generally use while loops for the latter.
If you need to break out of a loop, you can use the last keyword
Hope this helps! jeffa L-LL-L--L-LL-L--L-LL-L-- -R--R-RR-R--R-RR-R--R-RR B--B--B--B--B--B--B--B-- H---H---H---H---H---H--- (the triplet paradiddle with high-hat)
In Section
Seekers of Perl Wisdom
|
|