Code Comments

Programming Forum and web based access to our favorite programming groups.
For Programmers: Free Programming Magazines | New: Database administration forum
Registration is free! Edit your profileCalendarFind other membersFrequently Asked QuestionsSearch -> 
Post New Thread











Thread
Author

print problem? (CGI)
The following code doesn't run.. I don't know what's wrong with it, can some
one help me?

print << START_HERE;
<p>Thanks a thousand times... ^_^ </p>
START_HERE

thx...



Report this thread to moderator Post Follow-up to this message
Old Post
Ben Wan
03-19-04 06:24 PM


Re: print problem? (CGI)
In article <UKSmb.59582$3f.36505@twister01.bloor.is.net.cable.rogers.com>, Ben Wan wrote:[c
olor=darkred]
>The following code doesn't run.. I don't know what's wrong with it, can som
eone help me?
>
>print << START_HERE;
><p>Thanks a thousand times... ^_^ </p>
>START_HERE[/color]

print << 'START_HERE';

You need to quote the bareword identifier for the end of the "here" block.
Note that if you want  variable substitution, you should use "START_HERE"
instead.  (Double-quotes to indicate interpolation.)

--
Vorxion - Member of The Vortexa Elite

Report this thread to moderator Post Follow-up to this message
Old Post
Vorxion
03-19-04 06:24 PM


Re: print problem? (CGI)
sorry, but can you tell me what is variable substitution? and does it do any
thing on "START_HERE"?
Thx...

"Vorxion" <vorxion@fairlite.com> ¼¶¼g©ó¶l¥ó·s»D:3f9c0236$1_1@news.iglou.com...
> In article <UKSmb.59582$3f.36505@twister01.bloor.is.net.cable.rogers.com>,
 Ben Wan wrote: 
>
> print << 'START_HERE';
>
> You need to quote the bareword identifier for the end of the "here" block.
> Note that if you want  variable substitution, you should use "START_HERE"
> instead.  (Double-quotes to indicate interpolation.)
>
> --
> Vorxion - Member of The Vortexa Elite



Report this thread to moderator Post Follow-up to this message
Old Post
Ben Wan
03-19-04 06:24 PM


Re: print problem? (CGI)
In article <axUmb.16068$7B1.9748@news04.bloor.is.net.cable.rogers.com>, Ben Wan wrote:[colo
r=darkred]
>sorry, but can you tell me what is variable substitution? and does it do an
ything on "START_HERE"?
>Thx...[/color]

First, don't top-post.  It's annoying and confusing.

And to answer your question, if you do:

print << 'END_HERE';
Some $nice text.
END_HERE

It will print:
Some $nice text.

If you do:

$nice = 'substituted';
print << "END_HERE";
Some $nice text.
END_HERE

It will print:
Some substituted text.

Get the idea?  Look up the difference between interpolated and
non-interpolated quoting mechanisms.  Apply it to 'here' blocks.

--
Vorxion - Member of The Vortexa Elite

Report this thread to moderator Post Follow-up to this message
Old Post
Vorxion
03-19-04 06:25 PM


Sponsored Links




Last Thread Next Thread Next
Search this forum -> 
Post New Thread

PERL CGI Freelance archive

Show a Printable Version Send to friend Email This Page to Someone! subscribe to this thread Receive updates to this thread
Computer Consultants
Programming Jobs
Visual Basic Controls
SQL Server Programming
Webservices
Java Security
Visual Studio
C# Programming
Visual J++
Software engineering
Open source Software
Perl Programming
PHP Programming
ASP Programming
ASP .NET Programming
Visual Basic Programming
Windows Scripting Host
Java Programming
Java Help
Java Beans
VBScript
Cobol
MAC Applications
Unix Programming
Forum Jump:
All times are GMT. The time now is 05:52 AM.

 
Free MCSE Braindumps | Real Estate Topics

Programming forum archive

Copyrights CodeComments.com 2004 - 2006

Powered by vBulletin Copyright 2000-2006 Jelsoft Enterprises Limited.