Help for this page
use strict; my %temphash = ( "tom" => "good", "dick" => "bad", "hary" => "ugly" ); ... my $regexp = join('|',keys %temphash); print "Found: [$1]\n" while ( $temp =~ /($regexp)/cg );
Found: [tom] Found: [dick]