On 27 Aug 2000 19:23:51 -0000, Perl6 RFC Librarian wrote:

>Further it should ignore any whitespace (and comments) that follow the
>terminator.

>      All of these should work:

>      print <<EOL ;
>EOL     # this is the end of the here doc

But currently, I like using:

        print <<"#EOT#2";
blah blah blah
#EOT#2

For some silly reasons, I grant you. A: The leading "#" makes the whole
thing look like a comment to my simple-minded syntax highlighting
editor. It makes it stand out.

And B: the "2" at the end makes the end-of-here-doc identifier unique,
so that a small error somewhere in may script doesn't allow a
<<"something" doesn't slurp in a too large a part of my script.

I like the "#" between "EOT" and "2" because it stands out visually.

In short: your "up to but excluding the comment" would disallow both.

I don't see the use for the comment on the same line as the
end-of-here-doc marker. Why simply not put the comment on the next line?

-- 
        Bart.

Reply via email to