#!/usr/local/bin/perl
require ("/usr/local/etc/httpd/cgi-bin/cgi-lib.pl");
&ReadParse;
print "Content-type: text/html\n\n";
print "\n
Your Score\n";
print "\nTest 1 Score
\n";
$score=0;
$no_questions=7;
if ($in{'q1'} eq "Malaysia") { $score+=1; }
if ($in{'q2a'} eq "English") { $score+=1; }
if (!$in{'q2b'}) { $score+=1; }
if ($in{'q2c'} eq "Dutch") { $score+=1; }
if (!$in{'q2d'}) { $score+=1; }
$q3=$in{'q3'};
$q3=~ tr/A-Z/a-z/;
if (($q3 eq "beras") || ($q3 eq "nasi")) { $score+=1; }
if ($in{'q4'} eq "ayam-ayam") { $score+=1; }
$score=100/7 * $score;
print "Your score was $score\n
\n\n\n";
exit 0;