Hey, it's a holiday - this is a semi-mechanical conversion to CGI.pm :

#!/usr/local/bin/perl -wT use strict; use CGI qw(:standard); use CGI::Carp qw(fatalsToBrowser); print header(), start_html( -title => "It's been sent"); print <<EOHTML; <H2 ALIGN=center>It's been sent!</H2> <HR ALIGN=center> <IMG SRC="http://www.iupui.edu/~webtrain/Graphics/Photos/bora_bora.jpg +"> <HR ALIGN=center> <H2 ALIGN=center>Thanks!</H2> <A HREF="http://www.iupui.edu/~webtrain/home.html">Back to Cindy's hom +e page </A> EOHTML my $name = param('name'); my $email = param('email'); my $status = param('status'); my $entry = param('entry'); my $cindy = param('cindy'); my $talk = param('talk'); my $surf = param('surf'); my $url = param('url'); my $whaturl = param('whaturl'); my $suggestion = param('suggestion'); my $explain = param('explain'); open (MAIL, qq%| mailx -s "Web mail!" cholling\@iupui.edu%) || die "Couldn't send mail - $!\n"; print MAIL <<EOMAIL; Sender: $name Email address: $email Status: $status, $explain Type of Message: $entry How Did You Find Me: $cindy $talk $surf $url If URL, what URL? $whaturl Message: $suggestion EOMAIL print end_html();
Hope that helps.

Update: Removed $email from the subject line passed to mailx as this is a security risk.

/J\


In reply to Re: porting a script from cgi_handlers.pl to CGI.pm (was : use CGI.pm) by gellyfish
in thread porting a script from cgi_handlers.pl to CGI.pm (was : use CGI.pm) by Anonymous Monk

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.