Perl: Escaping a string or pattern to be used in a regular expression

Published: Sunday, 29 August 2004

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