in reply to merging two hashes and updating the 1st hash keys.

This achieves your goal. But it still loops, albeit that the loop is hidden:

%hash1 = qw( a b c d e f ); %hash2 = qw( a J e K y z ); @sharedKeys = grep defined( $hash2{ $_ } ), keys %hash1; @hash1{ @sharedKeys } = @hash2{ @sharedKeys };; print %hash1;; e K c d a J

Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.
RIP PCW It is as I've been saying!(Audio until 20090817)