No such thing as a small change | |
PerlMonks |
Re: Traversing a simple tree - using GRAPH::DFSby wufnik (Friar) |
on Jun 17, 2004 at 13:18 UTC ( [id://367606]=note: print w/replies, xml ) | Need Help?? |
why not generalize your problem slightly and
use Jarko Heitaniemi's Graph packages to do the work
of the postorder traversal for you? i am normally reluctant to suggest any reengineering of code presented, but i have personally saved so much time using Graph::Base, Graph::Directed and Graph::DFS that i feel compelled to sketch out the following: won't save you time immediately, but very handy in the medium & long term. hope it helps;
...wufnik -- in the world of the mules there are no rules --
In Section
Seekers of Perl Wisdom
|
|