Click Here!
Click Here!

Perl Primer Four Assignment
A Possible Answer

     My additions are in bold. I added another line to the header set to Cc: and pointed at the email address offered by the person who filled out the form.

     At the end, I added an extra new line and then a new print line that thanked the user by name using $FORM{name}.


open (MESSAGE,"| /usr/lib/sendmail -t");

print MESSAGE "To: $FORM{submitaddress}\n";
print MESSAGE "From: $FORM{name}\n";
print MESSAGE "Reply-To: $FORM{email}\n";
print MESSAGE "Cc: $FORM{email}\n";

print MESSAGE "Subject: Feedback from $FORM{name} at $ENV{'REMOTE_HOST'}\n\n";
print MESSAGE "The user wrote:\n\n";
print MESSAGE "$FORM{feedback}\n\n";
print MESSAGE "Thank you $FORM{name} for writing.\n";
close (MESSAGE);

&thank_you;





Close this window to return to the Primer