my $regex = join '|', map {"\Q${_}\E"} @words; # list of alternative strings