in reply to Re: Creating regex from arrays
in thread Creating regex from arrays

The fix to that problem is quotemeta, not selectively escaping pipes

$tomatch = join "|", map quotemeta, @results;