title: How do I escape special characters for a substitution in a Perl one-liner?
body: <p>Is there some way to replace a string such as <code>@</code>or <code>*</code> or <code>?</code> or <code>&amp;</code> without needing to put a "\" before it?</p>
  
  <p>Example:</p>
  
  <pre><code>perl -pe 'next if /^#/; s/\@d\&amp;/new_value/ if /param5/' test
  </code></pre>
  
  <p>In this example I need to replace a <code>@d&amp;</code> with <code>new_value</code> but the old value might contain any character, how do I escape only the characters that need to be escaped?</p>