http://www.perlmonks.org?node_id=717086


in reply to Concatenate anonymous hash ref

You can replace this little loop
foreach my $key (keys %$temp) { $x->{$key} = $temp->{$key}; }
with
@$x{keys %$temp} = values %$temp;