in reply to Problem with sorting numbers.
Use <=> with a numeric sort, cmp with strings. See sort.
Additionally, the reason repeated occurances aren't being printed is because you're using the occurance as the hash key. Given the above implementation you probably want to use an array instead of a hash.
|
|---|