in reply to (Ovid) Re(2): Sort on boredom
in thread Sort on boredom

Well, it did answer your question:
Is there any way of eliminating the temporary variable %freqs?
But it does add as many 'intermediate' arrays as there are uniq values. I guess that's not what you had in mind. Oh, well.