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.)
In reply to Re^3: How to combine two different hashes into single hash.
by tobyink
in thread How to combine two different hashes into single hash.
by Sami_R
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |