title: Perl - how to put escape sequence into string?
body: <p>I am converting one form of regex to Perl-compatible regex. I need to replace all occurrences of <code>%s</code> to <code>\s</code>, so I am doing:</p>
  
  <pre><code>$s =~ s/(?&lt;!%)%s/\s/g;
  </code></pre>
  
  <p>But it gives me error: <code>Unrecognized escape \s passed through at ....</code>. Actually I am understanding where the problem is, so probably I can’t convert to string some unknown escape sequence. But how do I bypass this thing?</p>