FutureQuest, Inc. FutureQuest, Inc. FutureQuest, Inc.

FutureQuest, Inc.
Go Back   FutureQuest Community > General Site Owner Support (All may read/respond) > General Coding/Development
User Name
Password  Lost PW

Reply
 
Thread Tools Search this Thread Display Modes
Old 09-28-1999, 03:20 AM   Postid: 17934
icrank
Site Owner

Forum Notability:
10 pts: User-friendly
[Post Feedback]
 
Join Date: Aug 1999
Location: houston, tx, usa
Posts: 24
printing multiple lines in perl

I'm having difficulty using:

print <<MULTILINES;

  -----a bunch of stuff here (html)----

MULTILINES

sometimes it works great and sometimes I get an error saying
&quot;Can't find string terminator &quot;MULTILINES&quot; anywhere before EOF at xxxxx.cgi line 99.&quot; Has anyone had a similar experience?  Is there some hidden sensitivity to this printing technique?????
 
icrank is offline   Reply With Quote
Old 09-28-1999, 08:21 AM   Postid: 17935
 Terra
CTO FutureQuest, Inc.
 
Terra's Avatar
 
Join Date: Jun 1998
Location: Z'ha'dum
Posts: 7,678
This method is called a 'Here Doc', and emulated from the various shells (Bash,Ash,Korn,etc)...

I've never had a problem with either flavor:

print <<HTML;
blah
blah
HTML

or

print <<'HTML';
blah
blah
HTML

Just make positive that the ending HTML has *no* spaces in front of it...  If it does, then the Here Doc mechanism won't find it...

--
Terra
--Deb and I just butted heads on Hydro Thunder--
FutureQuest
Terra is offline   Reply With Quote
Old 09-28-1999, 01:30 PM   Postid: 17936
Stephen
Site Owner
 
Stephen's Avatar

Forum Notability:
89 pts: Helpful Contributor
[Post Feedback]
 
Join Date: Feb 1999
Location: L.A.
Posts: 671
Probably won't work if there's a space at the end of the terminating line either
Stephen is offline   Reply With Quote
Old 09-28-1999, 05:46 PM   Postid: 17937
icrank
Site Owner

Forum Notability:
10 pts: User-friendly
[Post Feedback]
 
Join Date: Aug 1999
Location: houston, tx, usa
Posts: 24
You hit the nail on the head!  I never would have figured out the space sensitivity on my own. THANKS
icrank is offline   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 visitors)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -4. The time now is 01:05 PM.


Running on vBulletin®
Copyright © 2000 - 2013, Jelsoft Enterprises Ltd.
Hosted & Administrated by FutureQuest, Inc.
Images & content copyright © 1998-2013 FutureQuest, Inc.
FutureQuest, Inc.