Help for this page

Select Code to Download


  1. or download this
    my @list = (qw(
        a b c d e f
    ...
    
    $by = by_score({ a => -5, b => 4, c => -3, d => 6, e => -1 });
    print join ",", sort( {$by->($a,$b)} @list );
    
  2. or download this
    $by = by_score({ a => -5, b => 4, c => -3, d => 6, e => -1 });
    print join ",", sort( $by, @list );