Bookmarks

Yahoo Gmail Google Facebook Delicious Twitter Reddit Stumpleupon Myspace Digg

Search queries

Www.xxxcon., %s wwwxxxcon, %s wwwxxxcon, www.xxxcon, xxxxdup, bitlord outgoing port settings, ckowwwxxx, 192.168.1.41:8000/nor-482.html, php.ini "Unable to initialize module", sendmail add footer to all messages

Links

XODOX
Impressum

#1: EOF not found

Posted on 2007-08-24 03:22:26 by George

I an trying to use the following text in a CGI perl script; but I keep
getting an error:

print sMail <<"EOMsg";
From: test\@test.net
To: test\@test.net
Subject: Data
Soon to hold data.
EOMsg
close(sMail);

The error is: Can't find string terminator "EOMsg" anywhere before EOF.

I am editing the cgi file from a Windows system but "use UNIX Line
endings" is turned on, so it should not be a line termination issue.
Just to be sure I transfered the file by ASCII mode to the server and
still receive the same issue.

Thanks

Report this message

#2: Re: EOF not found

Posted on 2007-08-24 04:15:22 by Gunnar Hjalmarsson

George wrote:
> I an trying to use the following text in a CGI perl script; but I keep
> getting an error:
>
> print sMail <<"EOMsg";
> From: test\@test.net
> To: test\@test.net
> Subject: Data
> Soon to hold data.
> EOMsg
> close(sMail);

Note that you need a blank line between the headers and the body of the
message.

> The error is: Can't find string terminator "EOMsg" anywhere before EOF.
>
> I am editing the cgi file from a Windows system but "use UNIX Line
> endings" is turned on, so it should not be a line termination issue.
> Just to be sure I transfered the file by ASCII mode to the server and
> still receive the same issue.

Maybe an extra space character?

http://perldoc.perl.org/perlop.html#%3c%3cEOF-here-doc-hered oc-here-document-%3c%3c


--
Gunnar Hjalmarsson
Email: http://www.gunnar.cc/cgi-bin/contact.pl

Report this message

#3: Re: EOF not found

Posted on 2007-09-23 15:41:46 by banesong

On Aug 23, 9:22 pm, George <romans...@earthlink.net> wrote:
> I an trying to use the following text in a CGI perl script; but I keep
> getting an error:
>
> print sMail <<"EOMsg";
> From: test\@test.net
> To: test\@test.net
> Subject: Data
> Soon to hold data.
> EOMsg
> close(sMail);
>
> The error is: Can't find string terminator "EOMsg" anywhere before EOF.
>
> I am editing the cgi file from a Windows system but "use UNIX Line
> endings" is turned on, so it should not be a line termination issue.
> Just to be sure I transfered the file by ASCII mode to the server and
> still receive the same issue.
>
> Thanks

I would also recommend changing your print statement to remove the
quotes:

print sMail <<EOMsg;

My experience has been that unless the termination string matches
exactly with the indicator after the <<, it will not be seen.

Thomas

Report this message

#4: Re: EOF not found

Posted on 2007-09-24 23:18:31 by Jim Gibson

In article <1190554906.383356.187150@g4g2000hsf.googlegroups.com>,
banesong <banesong@gmail.com> wrote:

> On Aug 23, 9:22 pm, George <romans...@earthlink.net> wrote:
> > I an trying to use the following text in a CGI perl script; but I keep
> > getting an error:
> >
> > print sMail <<"EOMsg";
> > From: test\@test.net
> > To: test\@test.net
> > Subject: Data
> > Soon to hold data.
> > EOMsg
> > close(sMail);
> >
> > The error is: Can't find string terminator "EOMsg" anywhere before EOF.
> >
> > I am editing the cgi file from a Windows system but "use UNIX Line
> > endings" is turned on, so it should not be a line termination issue.
> > Just to be sure I transfered the file by ASCII mode to the server and
> > still receive the same issue.
> >
> > Thanks
>
> I would also recommend changing your print statement to remove the
> quotes:
>
> print sMail <<EOMsg;

There should be no difference between 'print sMail <<EOMsg;' and 'print
sMail"EOMsg";' Double-quote context is the default for Here documents.
>
> My experience has been that unless the termination string matches
> exactly with the indicator after the <<, it will not be seen.

That is correct, but has nothing to do with the presence or absence of
quotes. However, the quotes let you see better what the termination
string is. For that reason, I would recommend leaving in the double
quotes.

--
Jim Gibson

Posted Via Usenet.com Premium Usenet Newsgroup Services
----------------------------------------------------------
** SPEED ** RETENTION ** COMPLETION ** ANONYMITY **
----------------------------------------------------------
http://www.usenet.com

Report this message

#5: Re: EOF not found

Posted on 2007-09-25 01:09:57 by Jim Gibson

In article <240920071418316126%jgibson@mail.arc.nasa.gov>, Jim Gibson
<jgibson@mail.arc.nasa.gov> wrote:

> In article <1190554906.383356.187150@g4g2000hsf.googlegroups.com>,
> banesong <banesong@gmail.com> wrote:
>
> > On Aug 23, 9:22 pm, George <romans...@earthlink.net> wrote:
> > > I an trying to use the following text in a CGI perl script; but I keep
> > > getting an error:
> > >
> > > print sMail <<"EOMsg";
> > > From: test\@test.net
> > > To: test\@test.net
> > > Subject: Data
> > > Soon to hold data.
> > > EOMsg
> > > close(sMail);
> > >
> > > The error is: Can't find string terminator "EOMsg" anywhere before EOF.
> > >
> > > I am editing the cgi file from a Windows system but "use UNIX Line
> > > endings" is turned on, so it should not be a line termination issue.
> > > Just to be sure I transfered the file by ASCII mode to the server and
> > > still receive the same issue.
> > >
> > > Thanks
> >
> > I would also recommend changing your print statement to remove the
> > quotes:
> >
> > print sMail <<EOMsg;
>
> There should be no difference between 'print sMail <<EOMsg;' and 'print
> sMail"EOMsg";' Double-quote context is the default for Here documents.

Sorry, meant 'print sMail <<"EOMsg";', of course.

> >
> > My experience has been that unless the termination string matches
> > exactly with the indicator after the <<, it will not be seen.
>
> That is correct, but has nothing to do with the presence or absence of
> quotes. However, the quotes let you see better what the termination
> string is. For that reason, I would recommend leaving in the double
> quotes.

--
Jim Gibson

Posted Via Usenet.com Premium Usenet Newsgroup Services
----------------------------------------------------------
** SPEED ** RETENTION ** COMPLETION ** ANONYMITY **
----------------------------------------------------------
http://www.usenet.com

Report this message