Help for this page

Select Code to Download


  1. or download this
    # Code1
    @s = sort mycriteria @a;
    ...
      sin($aa) <=> sin($bb) ||
      $aa*$aa <=> $bb*$bb;
    }
    
  2. or download this
    # Code2
    @s = sort {($a =~ /(\d+)/)[0] <=> ($b =~ /(\d+)/)[0] || uc($a) cmp uc(
    +$b)} @a;