I am still fairly new to programming Perl, but I have EXHAUSTED ALL MY RESOURCES in figuring out why the following script wont work. (Please remember when you first started..and try to explain it to me as if I was 5 years old). PLEASE HELP ME!!

The following script is meant to give a basic "Contact Us" form action and EMAIL ME the visitor's info. they entered on my form. The script does run..but the info. entered into the form DOES NOT show up in my e-mail. I have a great e-mail with pretty titles, but the info. does not show up...ALSO, when I run my Perl checker this error comes up: Use of uninitalized value in concatenation (.) or string at # URL of my script # line 12.

Please email me with any recommendations or post them here. (webmaster@prowebdesigner.net) Here is the script:

#!/usr/bin/perl -w print "Content-type:text/html\n\n"; $to='webmaster@prowebdesigner.net'; $from='webmaster@prowebdesigner.net'; $subject='Web Site Design Request'; $name = $formdata{'name'}; $email = $formdata{'email'}; $address1 = $formdata{'address1'}; $address2 = $formdata{'address2'}; $city = $formdata{'city'}; $state = $formdata{'state'}; $zip = $formdata{'zip'}; $homephone = $formdata{'homephone'}; $workphone = $formdata{'workphone'}; $business = $formdata{'business'}; $goals = $formdata{'goals'}; $comments = $formdata{'comments'}; open(MAIL, "|/usr/sbin/sendmail -t"); print MAIL "To: $to\n"; print MAIL "From: $from\n"; print MAIL "Subject: $subject\n\n"; print MAIL "Name: $name\n"; print MAIL "EMail: $email\n"; print MAIL "Address_line_1: $address1\n"; print MAIL "Address_line_2: $address2\n"; print MAIL "City: $city\n"; print MAIL "State: $state\n"; print MAIL "Zip: $zip\n"; print MAIL "Home_Phone: $homephone\n"; print MAIL "Work_Phone: $workphone\n"; print MAIL "Type_of_Business: $business\n"; print MAIL "Goals: $goals\n"; print MAIL "Comments: $comments\n"; close(MAIL); print "<html><head><title>Perl</title></head>\n<body>\n"; <p> print "YOUR potential business is VERY IMPORTANT to PRO WEB DESIGN. W +e will respond as soon as we can."; print "</body></html>";

janitored by ybiC: Retitle from less-than-descriptive-or-serachable "New to Perl..Don't laugh..PLEAZE HELP!!!", also minor format tweaks for legibility.


In reply to Hand-rolled CGI mailto by prowebdesigner

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.