title: Perl Reg Expressions, word anchor and special characters
body: <p>I am trying to write a script to detect variable types and have been having an issue with my regular expression.</p>
  
  <pre><code>if(/\$\b([a-zA-Z]|_ )(\w)*\b /x &amp;&amp; !/ /)
  </code></pre>
  
  <p>is what I am using to detect a scalar. The problem right now though is that <code>\b \b</code> doesn't seem to be working with the special characters (<code>!@#$</code>, etc). For example it would count <code>$var###</code> as a valid name. Any ideas?</p>