The Regex::Presuf module can be used to build regular expressions out
of 'word lists', lists of strings. The regular expression matches the
same words as the word list. These regular expressions normally run
few dozen percentages faster than a simple-minded '|'-concatenation of
the words.
Install by
perl Makefile.PL
make
make test
make install
Then proceed by reading the actual documentation contained in the PreSuf.pm,
if make install went fine, "perldoc Regex::PreSuf" should work.
Enjoy,
Jarkko