Hi! I'm trying to find the size of a nested hash in a HoH. Here i what I've written.
sub ResetHashProteinTally
{
my ($rHoH_ProteinFamilies) = @_; #capturing array
for my $proteinfamily ( keys %{$rHoH_ProteinFamilies} )
{
my $size = (keys %{$rHoH_ProteinFamilies->{proteinfamily}}); #---
+-> finds the length of a hash
print "$size\n";
}
} #end of sub routine ResetHashProteinTally
Here is the output I'm getting.
0
0
0
(There are only 3 nested hashes in the initial data set I'm working with.)
I'm still new to working with HoHes so I've been coming across a couple conceptual problems like this. Thanks in advance.