if( exists $hash{$key} ){ &$hash{$key}; } elsif( $key =~ /phrase/ ){ # several could match but all required the same action &$hash{'some_action'}; } else { &$hash{'default_action'}; } #### s**lil*; $*=join'',sort split q**; s;.*;grr; &&s+(.(.)).+$2$1+; $; = qq-$_-;s,.*,ahc,;$,.=chop for split q,,,reverse;print for($,,$;,$*,$/)