Help for this page

Select Code to Download


  1. or download this
    my @unsorted = ( ... );
    my @sorted = sort { $a <=> $b } @unsorted;
    
  2. or download this
    $ perl -E 'say "@{[ sort { $a <=> $b } 30,5,7,9,8, -01111,-10,1,3,9,-3
    +0,5,-100,0,-1,0xFF,-3,30,3,2,-300,-0xFF,15 ]}"'
    -585 -300 -255 -100 -30 -10 -3 -1 0 1 2 3 3 5 5 7 8 9 9 15 30 30 255