title: how to check if a hash is empty in perl
body: <p>I use the following code to check if the hash is empty. Is there a better method and is this safe to use?</p>
  
  <pre><code>if (!keys %hash) { print "Empty";} 
  </code></pre>