#!/usr/local/bin/perl
##############################################################################
# MODULE NAME ans.pl
# AUTHOR Ms. Priti Tangi
# DESCRIPTION The answered questions are shown
# SPECIAL NOTES Requires perl4 and higher version
# ASSUMPTIONS Executed as a backend so all CGI specs
# MODIFICATION LOG 11 April 1997
###############################################################################
print "Content-Type: text/html\n\n";
print "
ANSWERS";
print "\n";
print "The questions & answers
";
print "Click here for home page";
if(open(FILE, ";
close(FILE);
}
$a=@ques;
for ($i=0;$i<$a;$i++)
{
chop $ques[$i];
$chk = &trim($record{'Answer'});
if (($ques[$i] eq "###")&&($chk ne ""))
{
#print "answer=$record{'Answer'} , chk=$chk";
print<
| Date: | $record{'Date'}
|
|---|
| Email: | $record{'Email'}
|
|---|
| Question: | $record{'Question'}
|
|---|
| Answer: | $record{'Answer'}
|
|---|
TABLE
}
else
{
($name,$data) = split(/:/,$ques[$i],2);
$record{$name} = $data;
}
}
print "";
#############################
sub trim
{
$tmp2 = $_[0];
$tmp2 =~ s/ //g;
return $tmp2;
}