in reply to Re: Re-ordering data branches in a [Tree::DAG_Node] tree
in thread Re-ordering data branches in a [Tree::DAG_Node] tree

Why not just

c:\@Work\Perl\monks>perl -wMstrict -le "my @test_data = ( 'a', ' b', ' e', ' f', ' g', ' c', ' d', 'h', ' i', ' j', ); print for @test_data; print '==========='; ;; print $_->[0] for sort { $a->[1] cmp $b->[1] } map [ $_, m{ \w+ }xmsg ], @test_data ; " a b e f g c d h i j =========== a b c d e f g h i j


Give a man a fish:  <%-{-{-{-<

Replies are listed 'Best First'.
Re^3: Re-ordering data branches in a [Tree::DAG_Node] tree
by tybalt89 (Monsignor) on Apr 23, 2018 at 09:15 UTC

    Because it fails for

    my @test_data = ( 'j', # ' i', # ' h', # ' g', # ' f', # ' e', # ' d', # 'c', # ' b', # ' a', # );