die "Error: duplicate value for $key\n" if exists $hash{$key}; $hash{$key} = $value;