title: What is the proper way to check if a string is empty in Perl?
body: <p>I've just been using this code to check if a string is empty:</p>
  
  <pre><code>if ($str == "")
  {
    // ...
  }
  </code></pre>
  
  <p>And also the same with the not equals operator...</p>
  
  <pre><code>if ($str != "")
  {
    // ...
  }
  </code></pre>
  
  <p>This seems to work (I think), but I'm not sure it's the correct way, or if there are any unforeseen drawbacks. Something just doesn't feel right about it.</p>