Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Problem with this " print <<EOM; " function

Status
Not open for further replies.

bingoldsby

Technical User
Jan 24, 2002
68
0
0
US
print <<ENDHTML;
....your HTML code (or text) here.....
ENDHTML

I've tried the above function from tutorials (using cut and paste) and typing it several times on my own, and I have not once gotten it to work successfully.

Each time there is the error message: Can't find string terminator "ENDHTML" anywhere before EOF at C:/Apache2/cgi-bin - etc.

I clearly see it right there. Any hints about this behavior?

Thanks,

Brian
 
Maybe you indented the final ENDHTML, try providing a little more code as context.


----

In need of programming book recommendations.
 
ENDHTML must be preceded by a new line, and two following line breaks
Code:
  print <<ENDHTML
      blah
blah
ENDHTML
HTH
--Paul



Spend an hour a week on CPAN, helps cure all known programming ailments ;-)
 
Thanks, both of you. I did some experimenting.

The the final end statement needs to be on it's own line, no preceeding indents/tabs/spaces, and must be followed by at least one line break.

I didn't find any of those specifics in the tutorials I have been looking at.

Thanks, again.

Brian
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top