R
Ramon F Herrera
I have an application which counts word frequency.
As I scan every word, its subtotal is placed in a
hash, as exemplified by this Perl pseudo code:
Frequency{"this"}++
Frequency{"that"}++
Frequency{"whatever"}++
When the counting loop is done, I would like to find out
which words are the most common ones. So what I need is
to perform a sort based on the hash values, considering
them as integers.
How can I do that?
TIA,
-Ramon F Herrera
As I scan every word, its subtotal is placed in a
hash, as exemplified by this Perl pseudo code:
Frequency{"this"}++
Frequency{"that"}++
Frequency{"whatever"}++
When the counting loop is done, I would like to find out
which words are the most common ones. So what I need is
to perform a sort based on the hash values, considering
them as integers.
How can I do that?
TIA,
-Ramon F Herrera