Help for this page

Select Code to Download


  1. or download this
    perl -w -MData::Dumper -e '
    @old = ( "10.5 AA", "9 AC", "2 BB");  
    @new = sort {$b <=> $a} @old; 
    print Dumper \@new;'
    
  2. or download this
    Argument "10.5 AA" isn't numeric in sort at -e line 1.
    Argument "9 AC" isn't numeric in sort at -e line 1.
    ...
              '9 AC',
              '2 BB'
            ];