http://www.perlmonks.org?node_id=249519


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

I know this isn't really the answer you were looking for, but I think you should consider getting a better sort program. I don't think there are any limitations on the GNU one, and it is typically faster than doing the same thing in Perl.