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. }
In reply to Re: easy way to extract a hash from an array?
by beachbum
in thread easy way to extract a hash from an array?
by rmexico
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |