while (my($k1, $v1) = each %hash) {
while (my($k2, $value) = each %$v1) {
via https://bbs.chinaunix.net/thread-1810192-1-1.html