in reply to Re: Out of Memory selecting from MySQL
in thread Out of Memory selecting from MySQL

Indeed. There is also no need to duplicate the temporary array into an anonymous array. You can just take a reference to it:

my @a; while( my @temp = split ',', <STDIN> ) { push @a, \@temp } print "@$_" for @a;; a,b,c e,f,g 1,2,3 ^Z a b c e f g 1 2 3

Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.
"Too many [] have been sedated by an oppressive environment of political correctness and risk aversion."

Replies are listed 'Best First'.
Re^3: Out of Memory selecting from MySQL
by Somni (Friar) on Oct 12, 2007 at 09:10 UTC
    Hm, true enough. I have a tendency to copy fetch_* return values, but that's because I use the *ref methods, and the documentation used to specifically say the references returned may be reused. Old habits die hard.