in reply to Matching a long list of phrases

How about:

my $regex = join "|", map { qr{$_} } split "\n", <<PHRASES; phrase one phrase two phrase three phrase moo PHRASES if ($incoming{'text'} =~ /$regex/) { DO WHAT NEEDS TO BE DONE HERE }
--
Leviathan.