in reply to Re: Re: Sorting array by number of occurences of a char
in thread Sorting array by number of occurences of a char

Either I'm blind, or saouq has edited his node. This node serves no purpose now :)

Yes, zigdon, you caught me. Originally I just pasted my quick one-liner in and hit submit instead of preview.

Your node does serve a purpose though. You have that nice little link that explains the ST very thoroughly. :-)

This was the text of the node when zigdon first saw it:

$ perl -le '@unsorted = qw(a,b,c c,b,a a,a,a,a b,b); @sorted = map { $ +_->[1] } sort { $b->[0] <=> $a->[0] } map { [tr/,// , $_] } @unsorted +; print "@sorted"' a,a,a,a a,b,c c,b,a b,b
-sauoq
"My two cents aren't worth a dime.";