# or even shorter, but perhaps a bit unreadable: $wordfreq{$_} for (@phrase);