if (not defined $params{tally_fh}) {
$params{tally_fh} = \*STDIN;
}
+ # header been output?
+ my $header_output = 0;
# This is where we get our input data from
while (defined ($_ = $params{tally_fh}->getline)) {
for my $opt (@options) {
$vote .= exists $option_rank{$opt->{key}} ? $number_to_option{$option_rank{$opt->{key}}} : '-';
}
+ if (not $header_output) {
+ print {$RESULTS} "/--".join("",map {$_->{key}} @options)."\n";
+ $header_output = 1;
+ }
print {$RESULTS} "V: $vote $voter\n";
} else {