my $search = 'search'; my @matches; for my $i ( 0 .. $#list ) { if ( grep { /$search/i } values %{ $list[$i] } ) { push @matches, \%{ $list[$i] } } }