First page Back Continue Last page Image
- read(STDIN, $namevalues, $ENV{'CONTENT_LENGTH'});
- open (MAIL, "|$mailprog $yourmail") || die "Can't open $mailprog!\n";
- print MAIL ("To: $yourmail\n");
- print MAIL ("From: Internet User\n");
- print MAIL ("Subject: Form Response\n\n");
- # Process info from Fill in Form
- @namevalues = split(/&/, $namevalues);
- foreach $namevalue (@namevalues) {
- ($name, $value) = split(/=/, $namevalue);
- $name =~ tr/+/ /;
- $value =~ tr/+/ /;
- $name =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg;
- $value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg;
- $INPUT{$name} = $value;
- unless ($value eq "") {
- print MAIL ("$name: $value\n");
- }
- }