in reply to build regexp on a list of patterns

Regex::PreSuf can combine a list of words into a more compact set of alternations and character classes:
use Regex::PreSuf; my $re = presuf(qw(foobar fooxar foozap)); # $re should be now 'foo(?:zap|[bx]ar)'

-Mark