my %hash_with_duplicates: # Intitilized elsewhere my %hash_without_duplicates = reverse reverse %hash_with_duplicates;