in reply to Need to sort large table of data...

Incidentally, if your array is really "gigantic" - so much so that you need to process it externally to Perl - you may want to write it to a file and sort it with the unix "sort" utility. The following two lines will do everything you want except for the hyphen after the count:
sort -k1n -k2n -k3n -k4n -k5n < inputfilename | uniq -c > outputfilename
and the output will look like this:
2 1 1 1 1 1 1 1 2 1 1 8 1 1 6 5 12 12

Replies are listed 'Best First'.
Re^2: Need to sort large table of data...
by tilly (Archbishop) on Feb 19, 2008 at 07:46 UTC
    Be careful to double-check your locale.

    On Linux with GNU sort I've been bitten in the past by the fact that the default locale does not consider some characters (in that case tabs) to be part of the collating operation.

    For that reason I find it a good precaution to set $LC_ALL to C before using GNU sort.