in reply to Recursion, tree parsing.

You can also do this kind of thing with a stack:
sub parse { my @stack = @_; while (@stack) { my $node = pop @stack; print $node->{data}; push @stack, @{$node->{children}}; } }
Since Perl subroutine calls are so expensive this approach is often faster than recursion. Use Benchmark or Devel::DProf to be sure.

-sam