See DBI about the Slice option:
my $result = $sth->fetchall_arrayref({}); [download]
In reply to Re: DBI Hash of Column name values by Corion in thread DBI Hash of Column name values by avrono