use strict; use warnings; my %hash = ("one" => "1", "two" => "2", "one" => "3", ); foreach my $key ( keys %hash ) { print $key, " => ", $hash{$key}, "\n"; }