my $ref1= { ref1_specific_key => 'some value', common_key => { common_subkey => 'foo'; } }; my $ref2= { ref2_specific_key => 'some other value', common_key => { common_subkey => 'bar'; } }; my $output= { ref1_specific_key => 'some value', ref2_specific_key => 'some other value', common_key => { common_subkey => 'bar'; } };