cthar has asked for the wisdom of the Perl Monks concerning the following question:
I have the following hash table
word occurrence a 2 b 4 c 2 d 1 e 1 f 2 g 4 h 3
From the above table.. i want to count the frequencies as follows
Freq.of occurrence freq_count 0 0 1 2 2 3 3 1 4 2 5 0
I did something like this:
How to go about it? Your guidances will be much more appreciated.. Thanks..if(exists($count{$word})){ $occurence = $count{$word}; freq_count++; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: count frequency of occurence....
by BrowserUk (Patriarch) on Nov 03, 2009 at 06:44 UTC | |
by wfsp (Abbot) on Nov 03, 2009 at 08:00 UTC | |
by BrowserUk (Patriarch) on Nov 03, 2009 at 08:39 UTC | |
by davido (Cardinal) on Nov 03, 2009 at 08:22 UTC | |
|
Re: count frequency of occurence....
by Marshall (Canon) on Nov 03, 2009 at 08:59 UTC | |
|
Re: count frequency of occurence....
by jwkrahn (Abbot) on Nov 03, 2009 at 06:41 UTC |