#!/afs/athena/contrib/perl/p

$score = 0;
$|=1;
open(TEST, "/afs/athena/user/m/a/macoiley/humor/Tests/purity100.male");
$ans = $answer;
print("<form action=\"http://www.mit.edu:8001/purity\">\n");
print("<dl>\n");
while(<TEST>)
{
	if($_ =~ /\d\)/)
	{
	    if($prev =~ /\?/){
		$i++;
		print("<li>$prev\n<input type=\"radio\" name=\"$i\" value=\"yes\">Yes\n<input type=\"radio\" name = \"$i\" value=\"no\">No\n");
		$prev="";
	}
$prev .= $_;

	}
}
if($prev =~ /\?/){
		print($prev);
		$answer = (<STDIN>);
		chop($answer);
		if($answer =~ "y"){ $score++;}
		$prev = "";}
print("Foo. $score\n");
($score = 100-$score) unless $ans == 1;
print("Score: $score\n");
