#!/usr/bin/perl -wT use strict; use CGI qw( :standard ); use CGI::Carp qw( fatalsToBrowser ); print "Content-type: text/html\n\n"; my ( $question_one, $question_two, $question_three, $question_four, $question_five, $question_six, $question_seven, $question_eight, $question_nine, $question_ten ); my $total = 10; my $score; my $final_score; $question_one = param( "Q1" ); $question_two = param( "Q2" ); $question_three = param( "Q3" ); $question_four = param( "Q4" ); $question_five = param( "Q5" ); $question_six = param( "Q6" ); $question_seven = param( "Q7" ); $question_eight = param( "Q8" ); $question_nine = param( "Q9" ); $question_ten = param( "Q10" ); if( $question_one eq "Larry Wall" ) { print "1). You answered: $question_one Correct!
"; $score++; } else { print "1). You answered: $question_one Incorrect
"; } if( $question_two eq "Unix administrators" ) { print "2). You answered: $question_two Correct!
"; $score++; } else { print "2). You answered: $question_two Incorrect
"; } if( $question_three eq "Text processing" ) { print "3). You answered: $question_three Correct!
"; $score++; } else { print "3). You answered: $question_three Incorrect
"; } if( $question_four eq "Glue" ) { print "4). You answered: $question_four Correct!
"; $score++; } else { print "4). You answered: $question_four Incorrect
"; } if( $question_five eq "Operating system utilities and services" ) { print "5). You answered: $question_five Correct!
"; $score++; } else { print "5). You answered: $question_five Incorrect
"; } if( $question_six eq "True" ) { print "6). You answered: $question_six Correct!
"; $score++; } else { print "6). You answered: $question_six Incorrect
"; } if( $question_seven eq "Regular expressions" ) { print "7). You answered: $question_seven Correct!
"; $score++; } else { print "7). You answered: $question_seven Incorrect
"; } if( $question_eight eq "Open source" ) { print "8). You answered: $question_eight Correct!
"; $score++; } else { print "8). You answered: $question_eight Incorrect
"; } if( $question_nine eq "TCL" ) { print "9). You answered: $question_nine Correct!
"; $score++; } else { print "9). You answered: $question_nine Incorrect
"; } if( $question_ten eq "Marc Andreessen" ) { print "10). You answered: $question_ten Correct!
"; $score++; } else { print "10). You answered: $question_ten Incorrect
"; } $final_score = ( $score * 10 ); print < Total questions: $totalTotal answered correctly: $scoreYour final score: $final_score\% EOF