perl -ne '$a{$_}++ for split; END { @a = sort { $a{$b} <=> $a{$a} } keys %a; print "$_\n" for @a[0..9]; }'