use strict; open(SENDMAIL, "| /usr/lib/sendmail -oi -t -fReport_Master") || die "Can't fork for sendmail: $!\n"; print SENDMAIL <<"EOF"; To: help@perlmonks.org Subject: Report Submitted by: $name Email: $email Phone: $phone_number Project: $project Date: $submitted Duration of stay: $duration Collaborators: $collaborators EOF ; close(SENDMAIL) || die "Error on close of pipe to mailer: $?";