Hey, it's a holiday - this is a semi-mechanical conversion to CGI.pm :
Hope that helps.#!/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();
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
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |