我有一个哈希哈希,我需要过滤.我确实找到了如何进行查找,但它没有回答我的问题.
假设我有一个像这样的散列哈希:
my %HoH = ( flintstones => { husband => "fred",pal => "barney",town => "springfield" },jetsons => { husband => "george",wife => "jane","his boy" => "elroy",},simpsons => { husband => "homer",wife => "marge",kid => "bart",town => "springfield",);
我想说我想要所有来自斯普林菲尔德的城镇居民.我想在输出中使用相同的哈希哈希,而不需要局外人.
my %HoH = ( flintstones => { husband => "fred",);
它似乎很傻但无法弄清楚如何过滤结构.目标是在过滤后迭代所有的斯普林菲尔德人.
我当然做了一些研究,我最接近的是哈希切片.
但他们似乎很可怕.