for (values %hash1) { $_ = $hash2{$_} if exists $hash2{$_}; } [download]
In reply to Re: Replace the value of a hash by Roy Johnson in thread Replace the value of a hash by Anonymous Monk