in reply to To CGI or not CGI, that is the question
No warnings? No strict? This is not educational, this is a bad B-movie!#!/usr/bin/perl print "Content-type:text/html\n\n"; # parse the form data. read(STDIN, $buffer, $ENV{'CONTENT_LENGTH'}); @pairs = split(/&/, $buffer); foreach $pair (@pairs) { ($name, $value) = split(/=/, $pair); $value =~ tr/+/ /; $value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg; $FORM{$name} = $value; } # where is the mail program? $mailprog = '/usr/sbin/sendmail'; # change this to your own email address $recipient = 'nullbox@cgi101.com'; # this opens an output stream and pipes it directly to the # sendmail program. If sendmail can't be found, abort nicely # by calling the dienice subroutine (see below) open (MAIL, "|$mailprog -t") or dienice("Can't access $mailprog!\n"); # ... (Continues)
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Re: To CGI or not CGI, that is the question
by davorg (Chancellor) on Mar 12, 2003 at 12:59 UTC |