Slash Boxes
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
More | Login | Reply
Loading... please wait.
  • Unlike the others this is untested.

    my @votes = do {
        my $votes = open($votes_file);

    my $count = 0;
    my %skip;

    loop {
        say "\nRound {++$count}";

        my @ranking = CountRound( @votes, %skip ).pairs.sort({.value});

        say sprintf "%s: %s", .key, .value
            for @ranking;

        given @ranking[0].value {
            when $_ > 0.5 {
                say sprintf "\nThe winner i