#!/usr/bin/perl chomp $_ and $w{$_}++ while (<>); printf "%d - %s\n",$w{$_},$_ foreach keys %w;