Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re^4: sorting the column of array element

by sauoq (Abbot)
on May 24, 2012 at 12:27 UTC ( #972235=note: print w/ replies, xml ) Need Help??


in reply to Re^3: sorting the column of array element
in thread sorting the column of array element

None of the code above works actually.

The code I gave you in my first response works fine for me:

t$ perl -le 'my @o=([3, 1, 2]);print "@{$o[0]}";my @s=sort {$b <=> $a} + @{$o[0]};print"@s";' 3 1 2 3 2 1

-sauoq
"My two cents aren't worth a dime.";


Comment on Re^4: sorting the column of array element
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (11)
As of 2015-07-30 21:57 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (273 votes), past polls