in reply to Re: Recursion, tree parsing.
in thread Recursion, tree parsing.

Hmm, his code seems perfectly right to me. Your code skips the case where the children array may have only 1 element.

@bing = ("1"); print scalar @bing," ",$#bing,$/; if ($#bing > 0) { # your conditional print "Would execute$/"; } else { print "Wouldn't execute$/"; } __END__ Results: 1 0 Wouldn't execute


antirice    
The first rule of Perl club is - use Perl
The
ith rule of Perl club is - follow rule i - 1 for i > 1