my $query = qq(SELECT id, col1, col2 FROM some_table); my $results = $dbh->selectall_hashref($query, 1);