Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re: recursion

by Basilides (Friar)
on Jun 23, 2002 at 15:26 UTC ( [id://176610]=note: print w/replies, xml ) Need Help??


in reply to Trouble traversing binary tree (was: recursion)

oh wait, i left a print line in there that you don't need to see--from when i was trying to debug it. proper routine, which doesn't work, is:
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}); } }

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://176610]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (7)
As of 2024-04-24 10:03 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found