apple appears 1 apple appears 2 banana appears 1 banana appears 2 pear appears 1 pear appears 2 kiwi appears 1 kiwi appears 2
rather than a summary of the word frequencies. To get a summary you could do something like
print qq{$_ appears $wordfreq{$_} times\n} for sort keys %wordfreq;
after the foreach loop.
Cheers,
JohnGG
In reply to Re^2: Hash problem - Perl noob
by johngg
in thread Hash problem - Perl noob
by UncleTom
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |