#!/usr/bin/perl

$|=1;
srand();
my $votefile = sprintf("vote%08x.txt", time());
print "Content-type: text/plain\r\n\r\n";
print "Thanks!  Please record this ID: $votefile\n";
my $inline = <>;
my @votes = split(/&/, $inline);
open(VOTE, ">$votefile") || print "Failed to open file $!";
for(@votes) {
    print VOTE "$_\n";
}
close(VOTE);
