3 # wc.reduce.pl. Example for KMR shell command pipeline. It is a
4 # reducer for word count.
12 my ($key, $value) = split " ";
13 $counter->{$key} += $value;
16 for (sort { $counter->{$a} <=> $counter->{$b} } keys %$counter) {
17 print $_, " ", $counter->{$_}, "\n";