Re: Can't find string terminator "EOM" - beginner question
- From: Fabian Pilkowski <pilkowsk@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Thu, 30 Jun 2005 21:27:58 +0200
* Sisyphus schrieb:
> <humphrey.c.chan@xxxxxxxxx> wrote
>>
>> Can't find string terminator "EOM" anywhere before EOF at ./my-prog.pl
>> line 107.
>>
>> Here's my program excerpt -->>
>>
>> :
>> :
>> 105 open (MAIL, "| /usr/lib/sendmail -oi -t");
>> 106 select(MAIL);
>> 107 print <<EOM;
>> 108 From: sa@xxxxxxxxxxx
>> 109 To: user1@xxxxxxxxxxx
>> 110
>> 111 Subject: Alert !! Alert !!
As default here-docs do interpolate the string. That means, here you're
looking for any occurence of $scalars/@arrays/%hashes and replace it by
its current (stringified) value. Please escape that "@"-sign by writing
"sa\@bonjour.com".
Second, the Subject is part of the header. You have to delete line 110
if that "Subject:"-line should set the subject of this mail.
>> 112
>> 113
>> 114 Please check the system
>> 115 at your earliest convenience......
>> 116
>> 117 PS: You know who you arev !!
>> 118
>> 119
>> 120 EOM
>
> Looks to me that there's one or more spaces before EOM on line 120. Change
> it so that EOM occurs at the very start of the line and see if that helps.
And, in front of line 105 you marked with ":" that there are more lines.
Are there more lines after line 120 too? Make sure that there is also a
newline behind "EOM".
regards,
fabian
.
- References:
- Can't find string terminator "EOM" - beginner question
- From: humphrey . c . chan
- Re: Can't find string terminator "EOM" - beginner question
- From: Sisyphus
- Can't find string terminator "EOM" - beginner question
- Prev by Date: Failing to install IPTables::IPv4 perl module
- Next by Date: [ANNOUNCE] wxPerl 0.23
- Previous by thread: Re: Can't find string terminator "EOM" - beginner question
- Next by thread: Erlang traffic models B and C
- Index(es):