in reply to easy way to extract a hash from an array?

If your goal is to search on first name, then you might not want to use an array anyhow....

my %people = (); while (blah) { ## do something $people{$fname}{$lname}++; } my $search_term = 'John'; if (exists $people{$search_term}){ # do stuff. }