title: Printing keys based on Hash values in Perl
body: <p>I need to print keys based on vales in hash. Here is the code, I wrote</p>
  
  <pre><code>foreach $value (values %hash)
  {
      print "$value\t$hash{$value}\n";
  }
  </code></pre>
  
  <p>Error: I can only print values, but not keys.</p>
  
  <p>Any help will be greatly appreciated.</p>
  
  <p>Thanks</p>