use strict; use Scalar::Util qw/reftype/; my %hash_to_do sub do_hash { my $hash_ref = shift; foreach my $key (keys %$hash_ref) { my $value_type = reftype $hash_ref->{$key}; if ($value_type eq 'HASH') { do_hash($hash_ref->{$key}); } else { # do something else } } }
In reply to Re: Arbitrarily Nested HoH
by llancet
in thread Arbitrarily Nested HoH
by Limbic~Region
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |