in reply to Sorting problem with Orcish Manuever

japhy got it nailed, just before I did. But my solution is different: replace
return ($va->[0] <=> $vb->[0]) or ($va->[1] cmp $vb->[1]);
with
return ($va->[0] <=> $vb->[0]) || ($va->[1] cmp $vb->[1]);
and it works.

p.s. Please don't make us hunt around for the question so much. When I finally found exercise 2 in that section, it simply referred me to another exercise in a different section! How hard is quoting a question of 2 lines?

Replies are listed 'Best First'.
Re^2: Sorting problem with Orcish Manuever
by roboticus (Chancellor) on May 22, 2006 at 16:31 UTC
    bart:

    Thanks for the feedback. I'll give your version a try too.

    Regarding your P.S., sorry about that, my bad. I actually tried to link to it directly using syntax like [id://128722#the orcish manuever|Orcish Manuever], but it didn't work, and I couldn't figure out how to do it. I'll try to remember to add context in the future.

    Drat! And here I was patting myself on the back for actually reading the How (Not) To Ask A Question page (and others)... 8^P

    --roboticus

      Just an FYI: To link to an anchor like you intended, use this syntax:

      [link://?node=128722#the%20orcish%20maneuver|The Orcish Maneuver]

      The above produces: The Orcish Maneuver :-)

      HTH,

      planetscape
        Thanks for the hint--I've updated the node and included the link for posterity! 8^)

        (Funny, though, how I automagically read the %20 as ' ', so when I entered the link in the top node, it kept giving me 404s. So then I read & reread What shortcuts can I use for linking to other information? and found an alternative: [href://?node_id=128722#the orcish maneuver|blah blah blah]. Then, in the middle of one of my "previews" of this node, I finally noticed the %20 characters, and had another D'oh moment...)

        --roboticus