According to the answer to this question, merging two hashes in Perl 5 can be done either with:
%newHash = (%hash1, %hash2); %hash1 = %newHash;
or:
@hash1{keys %hash2} = values %hash2;
On the other hand, Perl 5.18 will introduce per process hash randomization.
Will the second method still be correct to use in Perl 5.18?
After reading through Re^2: Hash order randomization is coming, are you ready?, the answer is yes. As before,
keys,valuesandeachwill produce the same sequence iterating through the hash inside the same process if the hash isn’t changed in between.