#!/usr/bin/perl -wT print "Content-type: text/html\n\n"; use CGI; #Import CGI module. use CGI::Carp qw( fatalsToBrowser ); use strict; #Use the strict pragma. #Declare variables. my ( @array,$f_name, $f_reason, $f_email, $f_areacode, $f_exchange,$f_ +pnumber,$f_response,$f_urgent,$f_textarea ); my $q = new CGI; #Create new object reference for CGI. $f_name = $q->param("f_name"); #Assign form vars to variables. $f_reason = $q->param("f_reason"); $f_email = $q->param("f_email"); $f_areacode = $q->param("f_areacode"); $f_exchange = $q->param("f_exchange"); $f_pnumber = $q->param("f_pnumber"); $f_response = $q->param("f_response"); $f_urgent = $q->param("f_urgent"); $f_textarea = $q->param("f_textarea"); #Place form data in an array. @array = ("$f_name", "$f_reason", "$f_email", "$f_areacode $f_exchange + $f_pnumber", "$f_response", "$f_urgent", "$f_textarea", "\n"); #Open the file feedback.txt for appending. open(FH, ">>feedback.txt") or die "Couldn't open file: $!\n"; foreach (@array) #Iterate over the array printing all field in the fil +e. { print FH "$_\n"; } close FH; #Close the file. print <<EOF; #Beginning of 'here' document. Displays message to custo +mer. <HTML> <HEAD> <TITLE> </TITLE> </HEAD> <BODY> <H4>Thank You. You will be contacted by $f_response shortly.</H4> </BODY> </HTML> EOF #End of 'here' document.

In reply to Simple Feedback form. by DigitalKitty

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.