sub write_parms_to_file {
my ($aux_parms, $match_stddev, $used_ratings, $used_cov) = @_;
+ POSIX::setlocale(&POSIX::LC_ALL, 'nb_NO.UTF-8');
+
+ my @sorted_players = sort { $players{$a} cmp $players{$b} } keys %players;
+
POSIX::setlocale(&POSIX::LC_ALL, 'C');
my $tmpnam = POSIX::tmpnam();
printf MCCALC "%f\n", $match_stddev;
printf MCCALC "%d\n", scalar keys %players;
- for my $id (keys %players) {
+ for my $id (@sorted_players) {
my $rating = $used_ratings->{$id} // 500.0;
printf MCCALC "%s %f\n", $id, $rating;
}