http://qs1969.pair.com?node_id=615788


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)