With any reasonably large set of keywords, this is maybe not
the best idea. Not only does alternation within the regex
really slow the engine down ( Camel 3 explain why quite well )
, but you will likely exceed the maximum allowed size of a
single regex quickly.

I would suggest using qr//, which was introduced in perl 5.5.
It allows you to store a compiled regex in a scalar. Given
all the keywords are stored in @words, create a hash ( wait for it )
called %regex like this: