title: Print the value in Hash of Hash for two different keys in Perl
body: <p>Below is a hash in Perl:</p>
  
  <pre><code>my %hash = (
              'episode1' =&gt; {
                              'when' =&gt; '08.13.97',
                              'airdate' =&gt; '08.13.97',
                              'episodenumber' =&gt; '101',
                              'id' =&gt; '103511',
                              'title' =&gt; 'Cartman Gets an Anal Probe',
                              'available' =&gt; 'true'
                            },
              'episode2' =&gt; {
                              'when' =&gt; '08.20.97',
                              'airdate' =&gt; '08.20.97',
                              'episodenumber' =&gt; '102',
                              'id' =&gt; '1035156',
                              'title' =&gt; 'Weight Gain 4000',
                              'available' =&gt; 'true'
                            }
  );
  </code></pre>
  
  <p>I want to print the "id" of both episodes,but the below code is not working:</p>
  
  <pre><code>foreach my $key1 ( keys %hash ) {
    foreach my $key2 ( keys %{$hash{$key1}} ) {
      print "$hash{$key1}{$key2}{id}\n";
    }
  }
  </code></pre>
  
  <p>Please help.</p>