in reply to Re^2: String sorting in Perl
in thread String sorting in Perl

Yes, Limbic~Region, you're right ++, that's why I updated the post immediately after I posted it, but you saw it before I posted the change. Having said that, my understanding on how the sort should be carried out is not exactly the same as yours (I explained it in my update).

Replies are listed 'Best First'.
Re^4: String sorting in Perl
by Limbic~Region (Chancellor) on Jun 04, 2014 at 18:06 UTC
    Laurent_R,
    The code should get the counts, order them with the highest counts first, then move to the next value.

    I didn't see anything that implied shorter strings should come first but I agree that "move to the next value" is fairly ambiguous.

    Cheers - L~R