Hey people, I'm having trouble here with Perl, CGI. It's an email address only.
The form spits out to the url [email protected]
Once i click on the submit button a error page comes back saying that i have a malformed header..
Heres my CGI code..
#!/usr/local/bin/perl
read(STDIN, $buffer, $ENV{'COTENT_LENGTH'});
@pairs = split (/&/, $buffer);
foreach $pair (@pairs)
{
($name, $value) = split (/=/, $pair);
$email{$name} = $value;
}
$emailFile = "newsletter.txt";
open (FILE, ">>$emailFile");
print FILE "$email{'txtEmail'}";
close (FILE);
i know something is wrong.. im kinda new to this and learning.. Have bought a book called "Perl, CGI, and JavaScript" it's an OK book but it's not helping.. I got this code from the book and it resembles a lot of others codes out there on the web... SO....
Thanks,
Hogtied
The form spits out to the url [email protected]
Once i click on the submit button a error page comes back saying that i have a malformed header..
Heres my CGI code..
#!/usr/local/bin/perl
read(STDIN, $buffer, $ENV{'COTENT_LENGTH'});
@pairs = split (/&/, $buffer);
foreach $pair (@pairs)
{
($name, $value) = split (/=/, $pair);
$email{$name} = $value;
}
$emailFile = "newsletter.txt";
open (FILE, ">>$emailFile");
print FILE "$email{'txtEmail'}";
close (FILE);
i know something is wrong.. im kinda new to this and learning.. Have bought a book called "Perl, CGI, and JavaScript" it's an OK book but it's not helping.. I got this code from the book and it resembles a lot of others codes out there on the web... SO....
Thanks,
Hogtied

Comment