


* 

Why is your program so much slower than all the others?
(Except west2.pl  and west3.pl.)

Beceause  you forgot to excise the mail headers from the others.


* 

# Rommel's quiz


#!/usr/bin/perl
# Bonus program for QOTW #8: Run a quiz using the files 'questions'
# and 'answers'.

for (`cat questions`) {
   chomp; push @questions, $_;
}
for (`cat answers`) {
   chomp; push @answers, $_;
}

$n = @questions;

while (1) {
   $r = int rand $n;
   print $questions[$r], "\n  ==>";
   $ans = <STDIN>;
   chomp $ans;
   last  if $ans =~ /^[qQ]$/;
   if ($ans eq $answers[$r]) {
      print "Correct!\n\n";
   } else {
      print "*** Sorry. The correct answer was '$answers[$r]'.\n\n";
   }
}




* Georgep's system(sort)
