in reply to Re: Depth First Search
in thread Depth First Search
and I would like to go over all of the children and then the fathers I will do it like this in perl 6 , I would like to find a why using perl5 to do the same .my %document = ( '1' => { '1.1' => 'xxx', '1.2' => { '1.2.1' => 'xxx', '1.2.2' => 'xxx' } }, '2' => { '2.1' => { '2.1.1' => 'xxx' } } );
Thanks , for the help !sub process (%chapters) { await do for %chapters.kv -> $number, $content { start { note "Chapter $number started"; &?ROUTINE.outer.($content) if $content ~~ Hash; sleep 1; # here the chapter itself is processed note "Chapter $number finished"; } } } process(%document);
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Depth First Search
by BrowserUk (Patriarch) on Aug 10, 2016 at 09:14 UTC | |
by gbar (Initiate) on Aug 10, 2016 at 15:58 UTC | |
by BrowserUk (Patriarch) on Aug 10, 2016 at 20:00 UTC | |
|
Re^3: Depth First Search
by BrowserUk (Patriarch) on Aug 10, 2016 at 09:03 UTC | |
by gbar (Initiate) on Aug 10, 2016 at 18:08 UTC | |
by BrowserUk (Patriarch) on Aug 10, 2016 at 19:55 UTC |