Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re: Difference between this array assignment and push

by rinceWind (Monsignor)
on May 16, 2007 at 14:37 UTC ( #615788=note: print w/ replies, xml ) Need Help??


in reply to Difference between this array assignment and push

I would go with the first approach as it's much clearer what you are doing.

In the second case, @pics may have some previous contents that you are adding to. The code is iterating matches in a while loop; there's no reason to see why this would ever be better than picking up all matches as a list and assigning or pushing them to the array.

--
wetware hacker
(Qualified NLP Practitioner and Hypnotherapist)


Comment on Re: Difference between this array assignment and push

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (19)
As of 2014-07-22 18:27 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (124 votes), past polls