In praise of Regexp::Assemble
…and of the Perl modules in general. I had the following problem:
Given a list of 16 character alphanumeric IDs, find all the lines from a large-ish (\~6GB) logfile which contain at least one of the IDs.
The naive approach was to construct a big regular expression like
\W(\QID1 ...


This is an interesting problem which can appear in certain cases
(although not very often). A little searching around led me to many
posts stating that there is no easy solution and
There is a lot of debate on the intertubes if one should or shouldn’t
use wildcard imports. I’m mostly indifferent to the discussion (mainly
because all the package references are resolved compile time – so there
is no performance overhead – and because today’s