in reply to Matching a long list of phrases

Using very fast Regexp::Trie pointed by fletch
use Regexp::Trie; my $rt = Regexp::Trie->new; open(IN, "phrases.txt"); @list = <IN>; for (@list){ chomp; $rt->add($_); } my $regexp = $rt->regexp; print "$regexp\n"; if ($incoming{text} =~ qr(\b$regexp\b)){ print "Matched: $& \n"; }
--Artist