@list = qw(bing spam bing sponge bob pub time wibble sponge sponge); $count{$_}++ for @list; print map {"$_\t$count{$_}\n"} sort keys %count;