in reply to DBI Array of Hashes... simpler way?

Actually I think you really want to use the Slice option to selectall_arrayref:

$dbh->selectall_arrrayref( $sql, { Slice => {} } );
awkward looking, yes but effective.

-derby

Replies are listed 'Best First'.
Re^2: DBI Array of Hashes... simpler way?
by Rodster001 (Pilgrim) on Aug 25, 2009 at 17:09 UTC
    Yup, that's it. So, just for everyone else... this is what the modified code would look like. Much more concise, which is exactly what I was looking for. Thanks!

    my $query = qq~ SELECT * FROM my_table ~; my $res = $dbh->selectall_arrayref($query, { Slice => {} } );
Re^2: DBI Array of Hashes... simpler way?
by Anonymous Monk on Jul 16, 2013 at 01:41 UTC
    derby, thanks so much. exactly what I was looking for.