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