summaryrefslogtreecommitdiff
path: root/jni/ruby/sample/occur.pl
blob: 331ce502112513cec0f23790a3657a62e7df0f3c (plain)
1
2
3
4
5
6
7
8
9
while (<>) {
  for (split(/\W+/)) {
    $freq{$_}++;
  }
}

for (sort keys %freq) {
  print "$_ -- $freq{$_}\n";
}