title: perl regex: how to escape backslash character
body: <p>In the script below I use a replacement pattern that is stored in a variable.
  I seem to be unable to get one backslash in my end result. I get either none or two.
  It has something to do with the eval statement
  Can anybody give me insight on this please.</p>
  
  <p>test.pl:</p>
  
  <pre><code>use Data::Dumper;
  
  @arr = ("a", "b", "c");
  $re = '$1 \|';
  @arr = map { $_ =~ s/($_)/eval qq{"$re"}/e &amp;&amp; $_ } @arr;
  print Dumper(\@arr);
  
  @arr = ("a", "b", "c");
  $re = '$1 \\|';
  @arr = map { $_ =~ s/($_)/eval qq{"$re"}/e &amp;&amp; $_ } @arr;
  print Dumper(\@arr);
  
  @arr = ("a", "b", "c");
  $re = '$1 \\\|';
  @arr = map { $_ =~ s/($_)/eval qq{"$re"}/e &amp;&amp; $_ } @arr;
  print Dumper(\@arr);
  </code></pre>
  
  <p>$ test.pl</p>
  
  <pre><code>$VAR1 = [
            'a |',
            'b |',
            'c |'
          ];
  $VAR1 = [
            'a |',
            'b |',
            'c |'
          ];
  $VAR1 = [
            'a \\|',
            'b \\|',
            'c \\|'
          ];
  </code></pre>