Help for this page

Select Code to Download


  1. or download this
    use warnings;
    use strict;
    ...
    Argument "3abcd" isn't numeric in numeric comparison (<=>) at c:\temp\
    +sort.pl line 4.
    Argument "6foo" isn't numeric in numeric comparison (<=>) at c:\temp\s
    +ort.pl line 4.
    one two 1 2 3abcd 6foo 11 12
    
  2. or download this
    #...
    print join( " ", sort { $a cmp $b || $a <=> $b } @a ), "\n";
    
    __END__
    1 11 12 2 3abcd 6foo one two