Jeff 'Japhy' Pinyan wrote:
> On Feb 6, Jamie Risk said:
>
>> ... without encapsulating each line in double quotes? I've seen
>> this, and don't know where.
>
> With a here-doc:
>
> print << "END OF BLOCK";
> stuff
> END OF BLOCK

Note that the quotes around the end marker string affect how the
body of text is interpolated. If you have double quotes like this
then the block is in double-quote context and variables will be
interpolated. if the marker is in single quotes then, likewise,
the context is a single-quote one and all variable names will
remain intact.

You can leave out the quotes altogether, when the context
is a double-quote one but there can be no spaces in the
initial statement, either in the marker or after the <<,
like this:

print <<ENDOFBLOCK;
stuff
ENDOFBLOCK

Cheers,

Rob




-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to