# I want to write this: my @rows = @{ $dbh->selectall_arrayref($sql) }; # Instead, I always write this, and remove the dump # after verifying the data and its format: my $rows_aref = $dbh->selectall_arrayref($sql) or die; print Dumper $rows_aref; my @rows = @{$rows_aref};