I got two scripts (or one script at two points of developement) that are not working.

1) http://www.ecf.utoronto.ca/~goodi/check1.txt
Run it via http://www.ecf.utoronto.ca/~goodi/form1.html
It reads in the POST data from STDIN and displays the 'name' field.
printf ": $in{'name'} :";
It does display the name, but it does it twice.
Why twice?!
e.g. If you send it [NAME] it displays : [NAME] :: [NAME] :

2) http://www.ecf.utoronto.ca/~goodi/check.txt
Run it via http://www.ecf.utoronto.ca/~goodi/form.html
This one is supposed to read in the POSTed name, compare it to names stored on every other line of a text file to determine if the person is a member; if the person is a member it checks the next line to see if the person already voted.
Oddly enough, it seems to be reading the name from the file... different. The textfile contains, e.g. Isaac, but when the user sets name to Isaac it does not 'match' them.
If I manually set that the input value for one line is 'Isaac' it works. But it should be reading 'Isaac' itself!

$voted = 0 if ( @namesIn[$i + 1] eq '0');
$voted = 1 if ( @namesIn[$i + 1] eq '1');
$voted = @namesIn[$i + 1];
Please explain!