title: Text replacement with backslash in a variable in Perl
body: <p>How can I replace the backslash inside the variable?</p>
  
  <pre><code>$string = 'a\cc\ee';
  $re = 'a\\cc';
  $rep = "Work";
  
  #doesnt work in variable
  $string =~ s/$re/$rep/og;
  print $string."\n";
  
  #work with String
  $string =~ s/a\\cc/$rep/og;
  print $string."\n";
  </code></pre>
  
  <p>output:</p>
  
  <pre><code>a\cc\ee
  Work\ee
  </code></pre>