Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re: $a <=> $b

by GrandFather (Cardinal)
on Oct 10, 2012 at 01:31 UTC ( #998106=note: print w/ replies, xml ) Need Help??


in reply to $a <=> $b

roboticus answered the immediate question, but note that this is why you should avoid using $a and $b a general purpose variables: they are magical and should really only be used inside sort.

Note too that using sort without a {...} bit is like sort {$a cmp $b}. That is, sort's default is to do a string sort.

True laziness is hard work


Comment on Re: $a <=> $b
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (13)
As of 2014-09-18 09:37 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (109 votes), past polls