diff options
Diffstat (limited to 'jni/ruby/sample/occur.pl')
-rw-r--r-- | jni/ruby/sample/occur.pl | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/jni/ruby/sample/occur.pl b/jni/ruby/sample/occur.pl new file mode 100644 index 0000000..331ce50 --- /dev/null +++ b/jni/ruby/sample/occur.pl @@ -0,0 +1,9 @@ +while (<>) { + for (split(/\W+/)) { + $freq{$_}++; + } +} + +for (sort keys %freq) { + print "$_ -- $freq{$_}\n"; +} |