@a = qw /bill bill jane john carl jane mike susi jane/; # a couple of words

foreach $e (@a){
  $count{$e} = $count{$e} + 1; # cycle through array and create a hash
}                              # named %count

foreach $e (sort keys %count) {
  print "$e seen $count{$e} times.\n"; # cycle through sorted hash and print
}
