Do you know where your variables are? | |
PerlMonks |
Need help with Tree::Naryby ido50 (Scribe) |
on Apr 26, 2004 at 10:51 UTC ( [id://348133]=perlquestion: print w/replies, xml ) | Need Help?? |
ido50 has asked for the wisdom of the Perl Monks concerning the following question:
Hi! I hope anyone can help me with the Tree::Nary module. Basically it's a module for handling a tree data structure where every node can have multiple children. Click Here for the CPAN page of the module. I'm trying to traverse the tree (using the traverse function) and print all the nodes in the tree. I have used the following function to do so: This function only prints the root tree. I know there's more than one node (The root) in the tree because the number-of-nodes function returns the correct number. Also, when using IN_ORDER or POST_ORDER instead of PRE_ORDER, one of the root's children is printed instead. Why does this happen and how can I fix it to make it print the entire tree? Thanks, Ido. ------------------------- Live fat, die young
Back to
Seekers of Perl Wisdom
|
|