[Chicago-talk] Using a hash in a regex

Jonathan Rockway jon at jrock.us
Thu Jul 13 14:17:17 PDT 2006


I'm confused as to what the "two-argument" form of m// is.  Am I missing 
something?

> No, you have to loop manually.
>
> for my $key ( keys %h ) {
>      if ( m/$s/$key/ ) {
>           $n = $h{$key};
>      }
> }
>   



More information about the Chicago-talk mailing list