in reply to Re: update required for subroutine
in thread update required for subroutine

mam this output only i have from your code see the error inner keys are not replaced

_OUTPUT_ $VAR1 = { '1' => [ { 'b' => [ { 'e' => [ 'E', 'G' ], 'c' => [ 'C' ], 'content' => 'B ' } ], 'content' => 'A ', 'd' => [ { 'content' => 'D ', 'x' => [ 'C' ], 'z' => [ 'E', 'G' ] } ] } ] }; _INPUT_ my %xhash=('a' => [ { 'b' => [ { 'e' => [ 'E', 'G' ], 'c' => [ 'C' ], 'content' => 'B ' } ], 'content' => 'A ', 'd' => [ { 'content' => 'D ', 'x' => [ 'C' ], 'z' => [ 'E', 'G' ] } ] } ]); my %c_hash=('a' => { 'addval' => { 'b' => { 'addval' => { 'e' => { 'addv +al' => {}, 'repv +al' => '5' }, 'c' => { 'addv +al' => {}, 'repv +al' => '3' } }, 'repval' => '2' }, 'd' => { 'addval' => { 'x' => { 'addv +al' => {}, 'repv +al' => '10' }, 'z' => { 'addv +al' => {}, 'repv +al' => '11' } }, 'repval' => '4' } }, 'repval' => '1' });

Replies are listed 'Best First'.
Re^3: update required for subroutine
by almut (Canon) on Apr 21, 2010 at 12:56 UTC

    You must be using code different from the one I posted.  When I use your input %xhash and %c_hash in the exact above code, I get

    $VAR1 = { '1' => [ { '4' => [ { '11' => [ 'E', 'G' ], 'content' => 'D ', '10' => [ 'C' ] } ], 'content' => 'A ', '2' => [ { '3' => [ 'C' ], 'content' => 'B ', '5' => [ 'E', 'G' ] } ] } ] };