Code Comments
Programming Forum and web based access to our favorite programming groups.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...
Post Follow-up to this messageIn 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
Post Follow-up to this messagesorry, 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
Post Follow-up to this messageIn 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
Post Follow-up to this message
Show a Printable Version
Email This Page to Someone!
Receive updates to this thread
Powered by vBulletin
Copyright 2000-2006 Jelsoft Enterprises Limited.