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

Re: sorting question

by johnnywang (Priest)
on Oct 17, 2004 at 19:59 UTC ( [id://399960]=note: print w/replies, xml ) Need Help??


in reply to sorting question

use strict; my $xy = [[1,2,3,4,5],[4,2,5,0,2]]; my @sorted = sort{$b->[1]<=>$a->[1] ||$b->[0]<=>$a->[0]} map{[$xy->[0] +->[$_],$xy->[1]->[$_]]} (0..$#{$xy->[0]}); print "($_->[0],$_->[1])\n" foreach @sorted;

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others rifling through the Monastery: (6)
As of 2024-04-23 09:27 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found