$sendmail = "/usr/lib/sendmail -t"; open ADDRESS, "address.txt" or die "can't open file: $!"; @mail_to =
; open BODY, "message.txt" or die "can't open file: $!"; $content = ; foreach (@mail_to) { open(SENDMAIL, "|$sendmail") or die "Cannot open $sendmail: $!"; print SENDMAIL "To: $_ \n"; print SENDMAIL "From: csorensen\@uptimeresources.net \n"; print SENDMAIL "Subject: South African tourism survey \n"; print SENDMAIL "Content-type: text/plain \n\n"; print SENDMAIL $content; close(SENDMAIL); }