in reply to speed up one-line "sort|uniq -c" perl code

Just a silly optimisation, really, and I doubt one where your code is losing out greatly, but:
print $_ , $i++ % 2 ? "\n" : "\t" for %h;

Is a bit faster than eaching through the hash.

Jasper