.... .... forach my $hashkey (keys %myHash) { if($hashkey !~ /$pat/) { print "no Match $hashkey\n"; } }