#!/usr/common/bin/perl -wT use CGI; use CGI::Carp qw(fatalsToBrowser); require './symbify.pl'; $query=new CGI; $numqs=$query->param('num_questions'); print $query->header; print "\n"; print "
\n"; print "Question $q: Translate \"$question\"\n";
print "
You answered: $ans\n";
if ($correct eq &mylc($ans))
{
print " - correct.\n";
$score++;
} else {
print "
The correct answer is $correct.\n";
}
}
print "
Your score: $score/$numqs\n"; print "
Use your browser's BACK button for another go\n"; print "\n"; print "\n"; sub mylc { my ($x) = @_; my ($y); $y=lc($x); $y =~ tr/ΡΑΙΝΣΪ/ραινσϊ/; $y; }