Though, if I were using this, I would prefer for it to a return a reference.sub merge { my %merged; for (@_) { while (my ($k, $v) = each %$_) { push @{$merged{$k}}, $v; } } %merged; }
MeowChow s aamecha.s a..a\u$&owag.print
In reply to Re: (Ovid - use a HoA to merge hashes) Re: Combining hashes
by MeowChow
in thread Combining hashes
by mpolo
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |