Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re^3: push in for loop

by jeffa (Chancellor)
on Dec 12, 2011 at 17:32 UTC ( #943133=note: print w/ replies, xml ) Need Help??


in reply to Re^2: push in for loop
in thread push in for loop

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)


Comment on Re^3: push in for loop
Select or Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://943133]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (8)
As of 2014-07-14 06:38 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    When choosing user names for websites, I prefer to use:








    Results (255 votes), past polls