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

Re^5: Problem with a sort result: weird subtraction behaviour?

by Discipulus (Canon)
on Jan 15, 2016 at 09:00 UTC ( #1152833=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    perl -e "print join qq(\n),sort {$a - $b} @ARGV" 33 1 2 99
    1
    ...
    33
    99
    # same result using <=> or -
    
  2. or download this
    perl -e "print join qq(\n),sort {$a - $b} @ARGV" 10000000000 3 2
    10000000000
    2
    3
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others scrutinizing the Monastery: (5)
As of 2023-12-11 10:04 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    What's your preferred 'use VERSION' for new CPAN modules in 2023?











    Results (41 votes). Check out past polls.

    Notices?