http://www.perlmonks.org?node_id=1012781


in reply to Single regex

Use one of Regexp::Assemble/Regexp::Trie/Regex::PreSuf to assemble an efficient regex then make a single substitution pass

or $regex = join '|', map \&quotemeta, @tv;