in reply to Can a hash name have the same value twice.

Create a two dimensional hash like this:
@cities = qw/ US:Miami AU:Melbourne US:Chicago /; map {my($co,$ci)=split/:/,$_; $n{$co}{$ci}=1 } @cities; foreach $x (sort keys %n) { foreach (sort keys %{$n{$x}}) { printf "$x - $_\n"; } }
Which will print out:

AU - Melbourne
US - Chicago
US - Miami