in reply to Out of Memory selecting from MySQL

It would appear BrowserUK addressed your memory issue. One thing I'd like to mention is you don't need that temporary, nor do you need to be so explicit in assigning it.

while (my @db_row = $sth->fetchrow_array) { push @my_arr, [@db_row[0..8]]; }

Replies are listed 'Best First'.
Re^2: Out of Memory selecting from MySQL
by BrowserUk (Patriarch) on Oct 12, 2007 at 06:11 UTC

    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.
      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.