in reply to How do I create a list with the 10 most frequently used words in a file?
Use single-quotes instead of double, for Linux.perl -anE "$c{$_}++ for @F}{ ++$top<11 && say qq|$c{$_}\t$_| for sort +{$c{$b}<=>$c{$a}} keys %c" YOUR-FILE.txt
"It's ten o'clock... Do you know where your AI programs are?"
|
---|