Help for this page

Select Code to Download


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