Help for this page

Select Code to Download


  1. or download this
    my %created = ( AUTHOR => $author,
                    TYPE   => $node_type,
    ...
                    PARENT => $parent_id || '',
                    KIDS   => [],
                  );
    
  2. or download this
    for my $root ( sort { $a <=> $b } keys %created ) {
       my $parent = $created{$root}{PARENT};
       push @{$created{$parent}{KIDS}}, $root;
    }
    
  3. or download this
    sub print_nodes {
       my @kids = @_;
    ...
    }
    
    print_nodes( @topnodes );