Help for this page

Select Code to Download


  1. or download this
    @arr = ("jack", 80, "martin", 3, "allan", 'george');
    
    ...
    @sort = sort { $a cmp $b } @arr;
    
    print "@sort \n";
    
  2. or download this
    @sort = sort { $a <=> $b } @arr ;