#!/usr/bin/perl use strict; use CGI; use CGI::Carp 'fatalsToBrowser'; my $q = new CGI; print $q->header; &parsing; ########### Configure this section my $adminmail = "sulfericacid\@qwest.net"; my $subject = "enter subject here"; my $sendmail = "/usr/sbin/sendmail"; my %formdata; ########### End configurations. Unless you know what you are doing, do not edit below open (MAIL, $sendmail) or die "cannot open sendmail"; print MAIL "To: $adminmail\n"; print MAIL "From: admin\@everydayteens.net\n"; print MAIL "subject: $subject\n\n"; print MAIL "Name: $formdata{'name'}\n"; #### ERROR IS ON/NEAR THIS LINE print MAIL "email: $formdata{'email'}\n"; print MAIL "message: $formdata{'message'}\n"; close(MAIL); sub parsing { my @fields = $q->param; foreach my $field (@fields){ $formdata{$field} = $q->param($field); } } print "Location: thanks.html" or die "cannot locate thanks.html";