Help for this page

Select Code to Download


  1. or download this
    foreach (sort { $player{$b}[1]*1 + $player{$b}[3]*.5 <=> $player{$a}[1
    +]*1 + $player{$a}[3]*.5 } keys %player) {
        print $_ . " " . join(" ", @{$player{$_}}[1..3]) . "\n";
    }
    
  2. or download this
    this results in
    Kasparov 2 1 2
    ...
    Anand 1 2 0
    Shirov 1 1 0
    Karpov 1 0 0
    
  3. or download this
    $player{$1} = [ $1, $p1wins, $p1loss, $p1draw ];