in reply to Object of objects, Binary tree,
my @todo = $tree; while (@todo) { my $node = shift(@todo); ... push @todo, $node->children; } [download]