A couple things I noticed, 1) you are assigning the array reference to the same hash key each iteration through the loop (is this what you want?), 2) pushing the array ref into the hash gives you an anonymous array within an anonymous array, which I don't think is what you want. It might make more sense to assign the row to the key (provided you are using different keys through the loop).
If you just want an array of array references (unless there's a field in the returned row that is unique enough to use as a hash key) you can try:
my @allrows = (); while (my $row = $sth->fetchrow_arrayref) { push @allrows, $row; }
In reply to Re^3: DBI hashref does not return data in order of query
by tuxz0r
in thread DBI hashref does not return data in order of query
by hallikpapa
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |