sub display { my $self = shift; $self->displaynames($self->{root}); } sub displaynames { my $self = shift; $head = shift; if (defined ($head->{LRef})) { $self->displaynames($head->{LRef}); } print $head->{Val}, "\n"; if (defined ($head->{RRef})) { $self->displaynames($head->{RRef}); } }
In reply to Re: recursion
by Basilides
in thread Trouble traversing binary tree (was: recursion)
by Basilides
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |