Help for this page
foreach (@animals) { $animals{$_}++; } # initialize %animals hash
@animals{@animals} = (1) x @animals;