You can use the quotemeta function in perl to escape a string to be used as part of a literal match for the string.
quotemeta