Thank you. That helped get the script to compile. Neither file is being opened, but that me be a permissions issue. I've expanded the code out a bit (and made a correction to the if/then statement):
my $EmailAddress = $to; if ($EmailAddress =~ (/^\w+\@aol\.com$/i)) { my $msg = "/www/docs/sips_mar02aol.txt"; my $ContentType = "Content-Type: text/x-aol\n\n"; } else { my $msg = "/www/docs/sips_mar02.html"; my $ContentType = "Content-Type: text/html\n\n"; } open(MSG, "$msg") or die "Can't open $msg: $!\n"; print MAIL "To: $to\n"; print MAIL "From: $fromaddr\n"; print MAIL "Reply-to: $replyaddr\n" if $replyaddr; print MAIL "X-Mailer: Perl Mailer\n"; print MAIL "Subject: $subject\n"; print MAIL "$ContentType"; while (my $text = <MSG>){ print MAIL "$text"; } print MAIL "\n.\n"; close(MSG); The purpose of the program is to email the contents of one of the files to a requestor. Aol has particular formatting needs if the email is being sent other than text from outside their network. Anyway, I'm certain why the the script is failing to send the email. I'm sure its something simple. Eric -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]