Help for this page
my $in = [ {c_id => 1, r_to => 0, dept => 0, p_id => 1, comm => 'this',}, ... {c_id => 9, r_to => 3, dept => 2, p_id => 1, comm => 'no way',}, {c_id => 10, r_to => 9, dept => 3, p_id => 1, comm => 'give',}, ];
1: this - 3: the other ... - 5: else - 6: that - 7: moreover
traverse($in,0,0, sub {print ' ' x $_->{dept},'-',$_->{comm},"\n";}); ... traverse($ref, $node->{c_id}, ($depth + 1), $code); } }
traverse($in, 0, 0); ... traverse($ref, $_->{c_id}, ($depth + 1)); } }