In real life, these hashreferences would each have between 50 and 150 elements. The above code isn't a huge drain, but it seems inelegant. Is there a handy methodology that I'm missing here?my $object; my $subobject; foreach my $keyn (keys %{$subobject}){ $object->{$keyn} = $subobject->{$keyn}; }
In reply to Merge Hashrefs by oakbox
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |