> From: Janakiram Koka [mailto:[EMAIL PROTECTED]] > > I am trying to get the selectall_hashref() method to work. I > have a table .... > my $matrix = $dbh->selectall_hashref("SELECT * FROM youthLeader"); > print "value 2 = " . $matrix->[1]{fname} . "\n";
Check the DBI docs again, you don't really want the selectall_hashref method, you appear to want the selectall_arrayref method with a 'Slice' or 'Columns' attribute argument. You are referencing $matrix as an array reference (albeit a reference to an array of hash references) which is what selectall_arrayref returns. selectall_hashref actually returns a reference to a hash (of hashes). HTH, Douglas Wilson
