On Wed, Aug 16, 2000 at 03:05:23PM -0000, Perl6 RFC Librarian wrote:
> =head1 ABSTRACT
>
> With a here doc print <<ZZZ; the ZZZ has to be at the start of a line and
> the text of the here doc, is processed verbatum. This results in Here Docs
> that either stick out in the code, or result in unwanted leading whitespace.
> There are several FAQs that relate to this problem. This proposal tidies
> this up.
>
> =head1 DESCRIPTION
>
> Suggested syntax:
>
> print <<<xxx, <<<"xxx", print <<<'yyy', or print <<<`zzz`.
shell does something similar with
<<-xxx;
<<[-] word
The shell input is read up to a line that is the
same as word, or to an end-of-file. No parameter
substitution, command substitution or filename gen
eration is performed on word. The resulting docu
ment, called a here-document, becomes the standard
input. If any character of word is quoted with
single or double quotes or a \, no interpretation
is placed upon the characters of the document.
Otherwise, parameter and command substitution
occurs, \ followed by a newline is removed, and \
must be used to quote the characters \, $, `, and
the first character of word. If <<- is used, then
all leading tabs are stripped from word and from
the document.
Graham.