From: Ian Jackson Date: Tue, 2 Aug 2016 13:25:51 +0000 (+0100) Subject: stv: produce votelog X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ian/git?p=appendix-a6.git;a=commitdiff_plain;h=59dc49c75d23c59e0557a86bb1dd4e64c563a5b3 stv: produce votelog --- diff --git a/stv b/stv index 68940f4..ebd99ff 100755 --- a/stv +++ b/stv @@ -398,4 +398,14 @@ for (;;) { push @unsorted, @$votes; } +open VL, ">.stv.votes" or die $!; +foreach my $vote (@allvotes) { + print VL "----------------------------------------\n"; + print VL "voter $vote->{Voter}\n"; + print VL "prefs ". (join " ", @{ $vote->{Prefs} }). "\n"; + print VL $_, "\n" foreach @{ $vote->{Log} }; +} +print VL "========================================\n"; +close VL; + print "done.\n";