title: Filtering a hash of hash in perl
body: <p>I have a hash of hash that I need to filter. I did find how to do a lookup but it did not answer my question.</p>
  
  <p>Say I have a hash of hash like that :</p>
  
  <pre><code>my %HoH = (
      flintstones =&gt; {
          husband   =&gt; "fred",
          pal       =&gt; "barney",
          town      =&gt; "springfield"
      },
      jetsons =&gt; {
          husband   =&gt; "george",
          wife      =&gt; "jane",
          "his boy" =&gt; "elroy",
      },
      simpsons =&gt; {
          husband   =&gt; "homer",
          wife      =&gt; "marge",
          kid       =&gt; "bart",
          town      =&gt; "springfield",
      },
  );
  </code></pre>
  
  <p>I lets say I want all the townfolks from springfield. I want the same hash of hash in output without the outsiders.</p>
  
  <pre><code>my %HoH = (
      flintstones =&gt; {
          husband   =&gt; "fred",
          pal       =&gt; "barney",
          town      =&gt; "springfield"
      },
      simpsons =&gt; {
          husband   =&gt; "homer",
          wife      =&gt; "marge",
          kid       =&gt; "bart",
          town      =&gt; "springfield",
      },
  );
  </code></pre>
  
  <p>It seems silly but can't figure out how to filter the struture. The goal would be to iterate on all the people of springfield after filtering.</p>
  
  <p>I of course did some research and the closest thing I came by is hash slices.
  But they seem scary.</p>