$x = { foo => "abc" }; $x .= { bar => "def", baz => "ghi" }; # I want $x to be: # { foo => "abc", bar => "def", baz => "ghi" } #### my $temp = { bar => "def", baz => "ghi" }; foreach my $key (keys %$temp) { $x->{$key} = $temp->{$key}; }