sub print_node { my ($leaf, $depth) = @_; print " " x ($depth - 1), "* $leaf", $/; }