title: Escape @ in Perl regex
body: <p>Im using perl to match a password against a regex in a bash script.</p>
  
  <p>While testing the regex for the password, I got to this problem:</p>
  
  <p>This works : </p>
  
  <pre><code>perl -e 'if ( "Bomba\@2071"  =~ /^(?=.*[A-Z])(?=.*[!@#$&amp;*])(?=.*[0-9])(?=.*[a-z].*[a-z].*[a-z]).{8,}$/ ) { print 1; } '
  </code></pre>
  
  <p>While this never matches :</p>
  
  <pre><code>perl -e 'if ( "Bomba@2071"  =~ /^(?=.*[A-Z])(?=.*[!@#$&amp;*])(?=.*[0-9])(?=.*[a-z].*[a-z].*[a-z]).{8,}$/ ) { print 1; } '
  </code></pre>
  
  <p>As you can notice, it works because I escape the @ symbol. I had never seen something like this in another programming languages and after being stuck with this for over an hour, I found the reason by mere chance.</p>
  
  <p>So, my question is, Whats going on here? Why do I need to escape an odd character like @?</p>