Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re^2: Re-ordering data branches in a [Tree::DAG_Node] tree

by AnomalousMonk (Archbishop)
on Apr 23, 2018 at 04:44 UTC ( [id://1213404]=note: print w/replies, xml ) Need Help??


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', # );

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1213404]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others goofing around in the Monastery: (6)
As of 2024-04-23 13:47 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found