in reply to Re^2: Assign (key, value) to a hash w/o clobbering hash
in thread Assign (key, value) to a hash w/o clobbering hash

because the OP doesn't want to clobber what's already in the hash.

Maybe, but the OP proposed a solution that do reset the hash :

# Works, but needs redundent array undef %hash; @array = (split /X/, "fooXbar"); $hash{$array[0]} = $array[1]; @array = (split /X/, "bishXbash"); $hash{$array[0]} = $array[1]; foreach(keys %hash){ print "2: $_ = $hash{$_}\n"; }

so what is to be achieved isn't that clear after all.