# or even shorter, but perhaps a bit unreadable: $wordfreq{$_} for (@phrase);
I think perhaps you meant:
$wordfreq{$_}++ for (@phrase);
Since, after all, it's supposed to count the frequency of each word :)
s**lil*; $*=join'',sort split q**; s;.*;grr; &&s+(.(.)).+$2$1+; $; = qq-$_-;s,.*,ahc,;$,.=chop for split q,,,reverse;print for($,,$;,$*,$/)
In reply to Re^2: Hash problem - Perl noob
by chargrill
in thread Hash problem - Perl noob
by UncleTom
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |