in reply to Re^2: How to combine two different hashes into single hash.
in thread How to combine two different hashes into single hash.

It'll do that with use strict.

You could do this:

my %output; $output{$_} ||= {( %{$VAR1->{$_}||{}}, %{$VAR2->{$_}||{}} )} for keys(%$VAR1), keys(%$VAR2);

Not really any need to use the // operator which limits backwards compatibility. (Introduced in Perl 5.10.)