#!/usr/bin/perl -w use strict; my %employee = ( email => { Name => 'bob', Address => 'blah', Telephone=> 'foo3' } ); my @found; foreach my $email (keys %employee){ if ($email=~/e/i) { push (@found, $employee{$email}); } } foreach my $emp (@found){ print $emp."\n"; if ($emp->{'Name'}=~/bob/i) { print $emp->{'Name'}."\n"; } }