title: How do I find and count duplicate values in a perl hash
body: <p>I need to find the duplicate values in a perl hash and then output the key/value pair and associated dup count when that count is > 1. </p>
  
  <p>(I could leave a code sample of what I've attempted but that would just result in mass confusion and possibly uncontrolled laughter, and I'm really hoping to make it through life with some semblance of self esteem.) </p>
  
  <p>Hash key/value would look like the following: </p>
  
  <pre><code>%hash = qw('FHDJ-124H' =&gt; 'hostname1', 'HJDHUR-87878' =&gt; 'hostname2', 'HGHDJH-874673' =&gt; 'hostname1');
  </code></pre>
  
  <p>My desired output would be:</p>
  
  <pre><code>2 duplicates found for hostname1
      FHDJ-124H
      HGHDJH-874673
  </code></pre>
  
  <p>Using perl 5.6 on Solaris 10. Tightly controlled production environment where upgrading or loading perl mods is not allowed. (A change request for moving to 5.8 is about 6 months out).</p>
  
  <p>Many thanks!</p>