#! e:/perl/bin/perl.exe 

# FREQUENT SOURCES of ERROR:
# 1. Error 500 
#    a. Syntax error in script. Run it from UNIX commandline and check.
#    b. The 'perl' pathname is wrong. Try a 'whereis perl' from UNIX prompt.
# 3. Error 403 - Insufficient privilege
#    a. Set the protection on the CGI by 'chmod 755 cgifile'
# 4. Method not implemented
#    a. The extension, '.cgi', is not recognized. Try '.pl'
#    b. Ask your sysadmin for the exact file extension for the CGI
# -------------------------------------------------------------------------
# Start of the Perl script:


# Main body of the script
sub do_main
{

   # Return HTML page

   print "Content-type: text/html\n\n";

   ($sec,$min,$hour,$mday,$mon,$year,$wday) = (localtime(time))[0,1,2,3,4,5,6];
   $sec %= 9;
   if ($sec == 0) { $file = 'dqiz-01.html'; }
   if ($sec == 1) { $file = 'dqiz-02.html'; }
   if ($sec == 2) { $file = 'dqiz-03.html'; }
   if ($sec == 3) { $file = 'dqiz-04.html'; }
   if ($sec == 4) { $file = 'dqiz-05.html'; }
   if ($sec == 5) { $file = 'dqiz-06.html'; }
   if ($sec == 6) { $file = 'dqiz-07.html'; }
   if ($sec == 7) { $file = 'dqiz-08.html'; }
   if ($sec == 8) { $file = 'dqiz-09.html'; }

   open (SFILE, $file);
   @lines = <SFILE>;
   print @lines;
   close (SFILE);

}

$ProcessTime = `/bin/date`; $ProcessTime =~ s/\n//g ;
$|=1;
&do_main;
sleep(1);

# ***** End of the Perl Script file. *****

