in reply to seeking sendmail enlightenment

You could add code to check whether the openand the close succeed (when you output to a pipe the open might succeed but the close will fail if the process down the pipe fails):

open (SENDMAIL, "| $sendmailpath -t") or die "error opening SENDMAIL (senmailpath is $sendmailpath): $!"; ... close (SENDMAIL) or die "error when closing SENDMAIL: $!";

You can then look at the httpd logs, or use use CGI::Carp qw(fatalsToBrowser); to output the errors directly to the browser (just don't leave this in the real live code!).