Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re^4: beginner - ordering tuples

by 7stud (Deacon)
on Nov 13, 2010 at 22:19 UTC ( [id://871259]=note: print w/replies, xml ) Need Help??


in reply to Re^3: beginner - ordering tuples
in thread beginner - ordering tuples

In your elegant solution, you need to switch around your second conditional to:

$b->[1] <=> $a[1]

Replies are listed 'Best First'.
Re^5: beginner - ordering tuples
by LanX (Saint) on Nov 14, 2010 at 02:22 UTC
    Right, I missed that the second position should be descending.

    You forgot a dereferencing: $b->[1] <=> $a->[1]

    Cheers Rolf

Log In?
Username:
Password:

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

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

    No recent polls found