in reply to Re^4: Elegance, dammit!
in thread Elegance, dammit!

Now I'm not sure what format you are actually looking for. I originally thought you wanted a hash of arrayrefs, where the arrays contain the label and subject fields and the hash is keyed by date. But I'm not sure what "two columns as an arrayref keyed by date" looks like. Assuming the former is correct, you'd do it like this:
my $ref = $dbh->selectall_hashref(... for my $row (values %$ref) { $row = [ @$row{qw/label subject/} ]; } # or # $_ = [ @$_{qw/label subject/} ] for values %$ref; # or # $ref = { map {; $_, [ @{$ref->{$_}}{qw/label subject/} ] } keys %$re +f };
But it would make more sense to me to just leave it as a hash of hashes; unless there are extreme efficiency issues to concern you, I prefer hashes over arrays when the values are different types of things (in this case, label and subject).