On Thu, 6 Sep 2001, John_Kennedy wrote:
> I have the following script (simplified)
>
> #!/path/to/perl -w
> open LIST,"/path/to/data" or die "/path/to/data: $!";
> open(SENDMAIL, "|/usr/lib/sendmail -oi -t") or die "Unable to fork: $!";
> format SENDMAIL=
> From: Me <[EMAIL PROTECTED]>
> To: You <[EMAIL PROTECTED]>
> Subj: Stuff
> blah blah blah
> Thank you,
> Me
> .
> write SENDMAIL ;
> close(SENDMAIL);
>
> I get the following error (no other info is given).
> # ./test.pl
> syntax error at ./test.pl line 6, near "To:"
> Execution of ./test.pl aborted due to compilation errors.
You should use a here doc, not a format:
print SENDMAIL <<"MAIL";
From: Me <[EMAIL PROTECTED]>
To: You <[EMAIL PROTECTED]>
Subj: Stuff
blah blah blah
Thank you,
Me
MAIL
http://www.chapelperilous.net/
------------------------------------------------------------------------
Mike: "The Fourth Dimension is a shambles?"
Bernie: "Nobody ever empties the ashtrays. People are SO inconsiderate."
-- Gary Trudeau, "Doonesbury"
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]