|Welcome to the Monastery|
Re^3: Out of Memory Error -- Possible Leak?by BrowserUk (Patriarch)
|on Dec 14, 2005 at 07:19 UTC||Need Help??|
That line expands the contents of the array into a list (Ie. On Perls' stack). If the subarray pointed by $subarray is large, it will consume a large amount of memory to do that.
You can avoid that by indexing the array, rather than aliasing it's elements. Eg.
Or, if you need to modify the elements, substitue $subarray->[ $index ] wherever you are currently using $value.
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
Lingua non convalesco, consenesco et abolesco. -- Rule 1 has a caveat! -- Who broke the cabal?
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.