thanks... here's the whole thing...comment shows where it fails. when i write to an output file (http) instead of exiting, it works,
++++++++++++++++++++
#!/usr/local/bin/perl -w
read(STDIN, $buffer, $ENV{'CONTENT_LENGTH'});
#read input
@pairs = split(/&/, $buffer);
#split input up
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;
}
#input separated
$mailprog = 'bin/sendmail';
#specify mail address
$recipient = 'adam@hermes-grp.com';
#specify email address
$subject = 'Form Submission';
#specify subject
$redirect = '
#specify URL to go to once mail has been sent
@days = ('Sunday','Monday','Tuesday','Wednesday','Thursday','Friday','Saturday');
@months = ('January','February','March','April','May','June','July',
'August','September','October','November','December');
#create array with months and days for later use in mail
($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime(time);
if ($hour < 10)
{ $hour = "0$hour"; }
if ($min < 10)
{ $min = "0$min"; }
if ($sec < 10)
{ $sec = "0$sec"; }
$date = "$days[$wday], $months[$mon] $mday, 19$year at $hour\:$min\:$sec";
#specify time and date
open (MAIL, "|$mailprog -t"

or &dienice("Can't access $mailprog!\n"

;
#start email
print MAIL "To: $recipient\n";
#print recipient
print MAIL "Reply-to: $FORM{'email'} ($FORM{'name'})\n";
#print reply to information
print MAIL "Subject: $subject\n\n";
#print subject
print MAIL "\n";
#print blank line
print MAIL " The following form was sent by: $FORM{'name'}\n";
#print sent from
print MAIL " on $date\n\n";
#print date
print MAIL "\n\n";
#print 2 blank lines
foreach $key (keys(%FORM)) {
print MAIL "$key : $FORM{$key}\n\n";
}
#fails below, sends mail but yields server config error
close(MAIL);
exit;
#close(send) email
#error handle code:
sub dienice {
($errmsg) = @_;
print "<center><h2>There was an ERROR sending this form</h2></center>\n";
print "$errmsg<p>\n";
print "</body></html>\n";
exit;
}