title: How can I escape a literal string I want to interpolate into a regular expression?
body: <p>Is there a built-in way to escape a string that will be used within/as a regular expression? E.g.</p>
  
  <pre><code>www.abc.com
  </code></pre>
  
  <p>The escaped version would be:</p>
  
  <pre><code>www\.abc\.com
  </code></pre>
  
  <p>I was going to use:</p>
  
  <pre><code>$string =~ s/[.*+?|()\[\]{}\\]/\\$&amp;/g; # Escapes special regex chars
  </code></pre>
  
  <p>But I just wanted to make sure that there's not a cleaner built-in operation that I'm missing?</p>