# Does STV according to
# http://www.rosenstiel.co.uk/stvrules/av/index.htm
+# Usage:
+# ./stv [TIEBREAK ...] PLACES [INPUT-FILES ...]
+#
+# PLACES is the number of seats to be filled
+#
+# INPUT-FILES are in the format:
+# VOTER PQRST
+# where P, Q, R, etc. are candidates. Candidates
+# must be single letters.
+#
+# Each TIEBREAK is
+# P,Q,...
+
use strict;
use utf8;
use autodie;
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";