in reply to Traversing through HoH

The usual way would be to go through it recursively. Something like this:

#!/usr/bin/env perl use Modern::Perl; sub recurse { my $hashref = shift; for my $k (keys %$hashref){ if( ref $hashref->{$k} eq 'HASH' ){ recurse($hashref->{$k}); } else { # do stuff with $key and $value say "$k -> $hashref->{$k}"; } } } my %hash = ( one => { a => 11, b => 22, c => 33 }, two => 222, three => { A => { aa => 1111 }, B => { bb => 2222 } }, ); recurse(\%hash);

I would also suspect that There Is A Module For That.

Aaron B.
My Woefully Neglected Blog, where I occasionally mention Perl.