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

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