in reply to Convert XML to Hash
my %counts; while (my ($key,$value) = get_key_and_value()) { $counts{$key}{$value}++; } [download]