in reply to Re^3: Sorting data structure
in thread Sorting data structure

Ok, pointing out the obvious thing that jumps out at me, is this nasty line doing the right thing:
for my $user (for my $user ((sort { $users{$b}->{count} <=> $users{$a} +->{count} } keys %users) {
A nested for using the same variable $user? Yes, I realize they don't kill one another due to the scoping, provided you don't really care about the outer $user variable within the inner for, but that's really nasty.

Looking just slightly more carefully, it looks like the outer for block is never started... Is it simply a cut and paste problem, or does the real code really look that way?

-Scott