#!/bin/perl
# Modified Feb 8 by agw to ask user to repeat e-mail address
# to confirm triviaq.pl --> creates question form for trivia contest
$date = `/bin/date`;
@date = split(/ +/,$date); # note the + after the space delimiter
# with a single-digit day, UNIX prints Fri Dec 1 10:43:57 CST 1995
# which has an extra space in front of the day. That would create
# an empty field unless multiple consecutive delimitors were treated
# as one
# note that the elements of @date are:
# 0. Day of Week (ie Wed)
# 1. Month (ie Nov)
# 2. Number of day (ie 29)
# 3. Time (ie 11:50:01)
# 4. Time Zone (ie EST)
# 5. Year (ie 1995)
$qnum = $date[2];
$month = $date[1];
$displaydate = "$date[2] $date[1] $date[5]";
open(QFILE,"../data/nmc/nmctrivia/$month.txt") || die "Cannot read nmc/nmctrivia/$month.txt";
$inline =
Question for $displaydate
E-mail address:
Please type your e-mail address a second time to confirm:
E-mail address:
EndPrn close (QFILE);