ruby/sample/occur.pl

10 строки
118 B
Raku

while (<>) {
for (split(/\W+/)) {
$freq{$_}++;
}
}
for (sort keys %freq) {
print "$_ -- $freq{$_}\n";
}