foreach (qw/hasha hashb hashc/) { @keys = keys eval('%' . $_); print "There are " . scalar(@keys) . " keys here for '$_'\n"; } #### my %big_data = ( hasha => \%hasha, hashb => \%hashb, hashc => \%hashc, ); foreach (qw/hasha hashb hashc/) { @keys = keys %{$big_data{$_}}; print "There are " . scalar(@keys) . " keys here for '$_'\n"; }