The hash looks like %employee = ( $email { Name => $foo, Address => $foo2, Telephone=> $foo3},); foreach my $email (keys %employee){ if ($email=~/$foo/i){ push (@found, \$employee{$email});} foreach my $emp (@found){ if ($emp->{'Name'}=~/$foo/i){ print $emp->{'Name'};}}
In reply to hash reference by tbone
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |