my @qrydata; # I want to load the query rows into this array. my $xx=0; #row counter while (my $row = $sth->fetchrow_arrayref) { # Does the arrayref have the expected data? Yes - unique rows for my $fld(@$row) { print "$fld|"; } print "\n"; # so push the arrayref onto the Array push @qrydata, $row; # cut it short for test purposes - save 10 rows last if $xx++ >10; } # this prints out 10 copies of the last row fetched!! :( for my $row (@qrydata) { for my $fld(@$row) { print "$fld<"; } print "\n"; }