35 #Q: How many times is the $search found inside all the hash values?? ... 41 #Q: How many hash values contain at least one "$search" inside of them? ... #### >perl -wMstrict -le "my %hash = ( x => '---------', y => '-----x---', z => '-XxX-x-X-', ); my $Xs_in_values = 0; $Xs_in_values += () = /X/gi for values %hash; print $Xs_in_values; my $values_with_X = grep /X/i, values %hash; print $values_with_X; " 6 2