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

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

Published: Sunday, 29 August 2004