http://qs321.pair.com?node_id=479133


in reply to Re: DBI fetchall_arrayref using $max_size doesn't dereference normally.
in thread DBI fetchall_arrayref using $max_size doesn't dereference normally.

gmax,

The code is currently at work, thank you. I'm sure there is an even better way than the way I modified the code per your suggestion since I don't understand all of what is happening or why.

If you or someone else could unpack the while statement it could be greatly appreciated.
  • Comment on Re^2: DBI fetchall_arrayref using $max_size doesn't dereference normally.

Replies are listed 'Best First'.
Re^3: DBI fetchall_arrayref using $max_size doesn't dereference normally.
by runrig (Abbot) on Jul 28, 2005 at 21:20 UTC
    The docs say that when there are no more rows, fetchall_arrayref returns a reference to an empty array. That would imply your while loop would never terminate (a reference is always true, even if it's a reference to an empty array). gmax's suggested code above fixes that.