in reply to Sorting hashes with new value detection
my %hash; while (my ($k,$v) = each %values) { push @{$hash{$v}}, $k; } [download]