in reply to how to find a key from a hash

You can always use grep if you know what the name will be like:

use strict; use warnings; use Data::Dumper; my %hash = ( foo => 'bar', football => 'Monday', one_thing => 'another', ); my @match = grep /^foo/, keys %hash; print Dumper \@match;
But why don't you know the name of the key? That's one of the major reasons to use a hash instead of a regular array (besides using them to find unique keys). Should you be using a regular array instead?

jeffa

L-LL-L--L-LL-L--L-LL-L--
-R--R-RR-R--R-RR-R--R-RR
B--B--B--B--B--B--B--B--
H---H---H---H---H---H---
(the triplet paradiddle with high-hat)