note
hdb
<p>
From [http://search.cpan.org/~timb/DBI-1.53/DBI.pm]:
</p>
<p><em>
You may often want to fetch an array of rows where each row is stored as a hash. That can be done simple using:
</em></p>
<code>
my $emps = $dbh->selectall_arrayref(
"SELECT ename FROM emp ORDER BY ename",
{ Slice => {} }
);
foreach my $emp ( @$emps ) {
print "Employee: $emp->{ename}\n";
}
</code>
<p>
So despite the name you get a reference to an array of hash references.
</p>
<p>UPDATE: Have you tried looking at it using Data::Dumper? Should show the structure being a hash at the bottom.</p>
1040177
1040177