#!/usr/bin/perl -w use strict; my %hash; my @info = qw( Katie Bob Aimee Carol John Carol ); foreach ( @info ) { $hash{$_}++; } print "\n"; foreach ( keys %hash ) { print "$_ -> ", $hash{$_}, "\n"; }