in reply to Counting Variations of Key in a Hash
Note in your original code that @zoos probably shouldn't be globally scoped.my %animals; while( my ($state, $zoos) = each %bighash ){ while( my ($zoo, $row) = each %$zoos ){ my $animal = $row->[1]; $animal =~ s/\d+$//; push @{$animals{$animal}->{$state}}, $zoo; } }
|
|---|