for $i (@phrase) { $wordfreq{"$phrase[ $j ]"}++; # print "$wordfreq{\"$phrase[ $j ]\"} appears $wordfreq{\"$phrase[ $j ]\"}\n"; $j++; }