%hash1 = (key1 => 'value1'); %hash2 = ('age1 => 'value3'); $hash1{$_} = $hash2{$_} for keys %hash2;