in reply to A minor epiphany with grep and map

This is handy too. I've often felt that DBI lacks a fetchall_hashref method. :)

my $sth = $dbh->prepare(q{ SELECT Table_PK, Name ... }); $sth->execute; my %lookup = map { $_->[0], $_->[1] } @{ $sth->fetchall_arrayref };

Here's one of my favorites:

$sth->bind_columns( map { undef ${$_}; \${$_}; } @{ $sth->{NAME_lc} } ); while($sth->fetch) { print("$table_pk\t$name\n"); }

It's good to be lazy.

Alakaboo
I am the lurker that spams in the night.