|
|
| Syntactic Confectionery Delight | |
| PerlMonks |
Re^3: push in for loopby jeffa (Chancellor) |
| on Dec 12, 2011 at 17:32 UTC ( #943133=note: print w/ replies, xml ) | Need Help?? |
|
I am glad you used map, which would be my recommendation for filtering an array. The reason the array is not being completely scanned before the for loop begins is due to memory optimization. You can always explicitly copy the array instead if needed, but it would be a code kludge to have to tell Perl not "build up the array" every time. (That's my take, anyway.)
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
|
|
||||||||||||||||||||