require TripodCGI;
$CGI=new TripodCGI;
$firstName=$CGI->param('firstName');
$Age=$CGI->param('Age');
print "Content-type: text/html\n\n";
print "
Conditionals test
";
if ($Age < 13) && ($Age > 0))
{
print "What are you doing here, $firstName? This Web
site is strictly PG-13. Shame on you for being so
naughty as to come here!";
}
elsif ($Age < 18) && ($Age > 12))
{
print "Not to long ago, we’d have have chased you away
from our Web site. But now that you’re a teenager and
mature enough for PG-13 materials, we’re glad to see
you $firstName.";
}
elsif ($Age < 30) && ($Age > 17))
{
print "If you’re viewing this Web site on your work
computer, you should be aware that the materials
presented on this Web site are, in their own way,
as inflammatory as pornography. You could get in
a lot of trouble, $firstName.";
}
elsif ($Age < 40) && ($Age > 29))
{
print "Congratulations, $firstName, you’re on longer
a callow youth. Never trust anyone under 30; that’s
what we say!";
}
elsif ($Age < 60) && ($Age > 39))
{
print "You’re getting on in years, $firstName. It’s
time to start thinking about establishing retirement
savings.";
}
else
{
print "So you’re still dirt poor, $firstName? Oh
well, guess you always will be. Those are the
breaks, oldster.";
}
print "