\n";
}
print RESULTS "$ebq $ebq $ebq $ebq $ebq $ebq\n";
print RESULTS "\n";
close(RESULTS);
}
sub email {
$mail="/usr/lib/sendmail";
open(MAIL, "|/usr/lib/sendmail -t") || &errormsg;
print MAIL "To: thestark\@verizon.net \nFrom: The Men's Club\n";
print MAIL "Subject: Desert Island Disc Received from $name\n";
print MAIL "$name ($email), using $ENV{'HTTP_USER_AGENT'} browser/platform,
has submitted a desert island disc!\n";
if ($preference eq "yes") {&ordered;}
if ($preference eq "no") {&unordered;}
sub ordered {
print MAIL "\n";
foreach $song (@songs) {
print MAIL "
$song
by $music{$song}\n";
}
print MAIL "\n";
}
sub unordered {
print MAIL "
Here are your picks for your Desert Island Mix CD:
HTML code
if ($preference eq "yes") {&ordered2;}
if ($preference eq "no") {&unordered2;}
sub ordered2 {
print "";
foreach $song (@songs) {
print "
$song
by $music{$song}";
}
print "";
}
sub unordered2 {
print "
";
foreach $song (@songs) {
print "
$song
by $music{$song}";
}
print "
";
}
print "Thanks for your submission, $name! Your tracklisting will now also be posted
here!";
}
sub error1 {
print "Content-type: text/html \n\n";
print <<"HTML code";
You didn't select your preference!
Go back and choose whether or not your choices are in order.
HTML code
}
sub error2 {
print "Content-type: text/html \n\n";
print <<"HTML code";
You didn't put your name!
Go back and enter your name.
HTML code
}
sub error3 {
print "Content-type: text/html \n\n";
print <<"HTML code";
You didn't put any songs!
Go back and please put at least one song and artist.
HTML code
}
exit;