in reply to Condensed rank table output
Running with LanX's advice: (untested)
# Assumes %user_scores is map: UserName => score my %users_by_score = (); push @{$users_by_score{$user_scores{$_}}}, $_ for keys %user_scores; my $rank = 1; foreach my $rank_score (reverse sort keys %users_by_score) { print $rank++, '. ', join(', ', @{$users_by_score{$rank_score}}), +' - ', $rank_score, "\n" }
This was a nice warm-up for me today, thanks. Read perldata, perlref, and perldsc for more on how this works.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Condensed rank table output
by LanX (Saint) on Sep 07, 2019 at 23:39 UTC | |
|
Re^2: Condensed rank table output
by LanX (Saint) on Sep 08, 2019 at 18:59 UTC | |
by tlk (Acolyte) on Sep 13, 2019 at 12:07 UTC |