in reply to Recursion, tree parsing.
You can probably get away without checking for the existance of @{$t->{children}}. Either that or change:
if(@{$t->{children}}){
with
if($#{$t->{children}} > 0){
or some other variant. Depends on how you create the node.
Must admit I've never noticed C like strcutures in Perl (such as trees and link-lists). Recently I've wondered why. Could be that there are, just I've never noticed...
!unlike
"The price if ignorance, which is of course that you must learn from those who know." Socrates (paraphrased)
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Re: Recursion, tree parsing.
by BUU (Prior) on Apr 14, 2003 at 15:17 UTC | |
by demerphq (Chancellor) on Apr 15, 2003 at 07:38 UTC | |
Re: Re: Recursion, tree parsing.
by jonadab (Parson) on Apr 15, 2003 at 01:48 UTC | |
Re: Re: Recursion, tree parsing.
by antirice (Priest) on Apr 14, 2003 at 21:03 UTC |
In Section
Seekers of Perl Wisdom