in reply to Q: So you think you're good with structures? A: Umm... Yes!
in thread So you think you're good with structures?

Okay, I found a structure that doesn't get processed by the code well. On inspection, it looks like it should though. It follows shortly...It's just a Data::Dumper dump, so it might be a bit hard to read.
$rdb = { '/employee' => { 'aa' => { 'data' => { 'lastName' => 'BALL', 'key' => '000126' }, 'parent' => '', 'children' => { '/employee/earningStatement' => { 'ah' => { 'data' => { 'checkType' => 'payCheck' }, 'parent' => 'aa', 'children' => { '/employee/earningStatement/earningBase' => { 'al' => { 'data' => { 'gross' => '790.00', 'net' => '405.92', 'ckDate' => '20000126' }, 'parent' => 'ah' } }, '/employee/earningStatement/earningPay' => { 'aj' => { 'data' => { 'hours_earningPay' => '80.00' }, 'parent' => 'ah' }, 'ak' => { 'data' => { 'hours_earningPay' => '' }, 'parent' => 'ah' } } } }, 'ac' => { 'data' => { 'checkType' => 'payCheck' }, 'parent' => 'aa', 'children' => { '/employee/earningStatement/earningBase' => { 'ag' => { 'data' => { 'gross' => '790.00', 'net' => '405.36', 'ckDate' => '20000105' }, 'parent' => 'ac' } }, '/employee/earningStatement/earningPay' => { 'ae' => { 'data' => { 'hours_earningPay' => '80.00' }, 'parent' => 'ac' }, 'af' => { 'data' => { 'hours_earningPay' => '' }, 'parent' => 'ac' } } } } } } } }, '/employee/earningStatement/earningBase' => { 'al' => {}, 'ag' => {} }, '/employee/earningStatement/earningPay' => { 'aj' => {}, 'ak' => {}, 'ae' => {}, 'af' => {} }, '/employee/earningStatement' => { 'ah' => {}, 'ac' => {} } }; $rdb->{'/employee/earningStatement/earningBase'}{'al'} = $rdb->{'/empl +oyee'}{'aa'}{'children'}{'/employee/earningStatement'}{'ah'}{'childre +n'}{'/employee/earningStatement/earningBase'}{'al'}; $rdb->{'/employee/earningStatement/earningBase'}{'ag'} = $rdb->{'/empl +oyee'}{'aa'}{'children'}{'/employee/earningStatement'}{'ac'}{'childre +n'}{'/employee/earningStatement/earningBase'}{'ag'}; $rdb->{'/employee/earningStatement/earningPay'}{'aj'} = $rdb->{'/emplo +yee'}{'aa'}{'children'}{'/employee/earningStatement'}{'ah'}{'children +'}{'/employee/earningStatement/earningPay'}{'aj'}; $rdb->{'/employee/earningStatement/earningPay'}{'ak'} = $rdb->{'/emplo +yee'}{'aa'}{'children'}{'/employee/earningStatement'}{'ah'}{'children +'}{'/employee/earningStatement/earningPay'}{'ak'}; $rdb->{'/employee/earningStatement/earningPay'}{'ae'} = $rdb->{'/emplo +yee'}{'aa'}{'children'}{'/employee/earningStatement'}{'ac'}{'children +'}{'/employee/earningStatement/earningPay'}{'ae'}; $rdb->{'/employee/earningStatement/earningPay'}{'af'} = $rdb->{'/emplo +yee'}{'aa'}{'children'}{'/employee/earningStatement'}{'ac'}{'children +'}{'/employee/earningStatement/earningPay'}{'af'}; $rdb->{'/employee/earningStatement'}{'ah'} = $rdb->{'/employee'}{'aa'} +{'children'}{'/employee/earningStatement'}{'ah'}; $rdb->{'/employee/earningStatement'}{'ac'} = $rdb->{'/employee'}{'aa'} +{'children'}{'/employee/earningStatement'}{'ac'};
The starting key is "/employee". I'm pretty sure the sequences should be:
aa ah al aj aa ah al ak aa ac ag ae aa ac ag af
Change $VAR1 to $rdb before pasting back into the problem.

Replies are listed 'Best First'.
Re{2}: Q: So you think you're good with structures? A: Umm... Yes!
by dragonchild (Archbishop) on Aug 06, 2001 at 22:28 UTC
    Ooops. In the recursive function, change the last few lines to:
    pop @tables_seens; return @records; }
    This allows you to remove the @tables_seens = () line in the control section.

    I am sorry about forgetting that. I thought about doing a pop, but the dataset you gave at first didn't find that bug. *blushes*

    ------
    /me wants to be the brightest bulb in the chandelier!