in reply to Re: Hash problem - Perl noob
in thread Hash problem - Perl noob
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
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Hash problem - Perl noob
by ides (Deacon) on Sep 18, 2006 at 13:29 UTC |