in reply to out of order tree generation

the second and third level has already all information bottom-up

Ignore level one.

It really depends on the chart you wanna draw, if it's top-down you need to invert the relation.

i.e.

Cheers Rolf
(addicted to the Perl Programming Language :)
Wikisyntax for the Monastery FootballPerl is like chess, only without the dice

Replies are listed 'Best First'.
Re^2: out of order tree generation
by adambot (Acolyte) on Apr 03, 2019 at 18:16 UTC
    the chart i'm trying to make should look like:
    Professor v-----------v------------v---------v Cubert Hermes Zoidberg Amy v----------v Dwight Leela v--------------v Fry Bender
    so as you can see, top down. To do the find, would i use the map function or is there something better?
      Personally I'd build a Hash of Arrays %children , by looping with while(my ($id, $att) = each %second_level) and pushing into $children{$boss_id}

      No code sorry this looks too much like homework, but actually you have enough now anyway ...;)

      Cheers Rolf
      (addicted to the Perl Programming Language :)
      Wikisyntax for the Monastery FootballPerl is like chess, only without the dice

        thanks! This is actually a passion project -- i need to track upgrades to units in a game.