> I was sorta going under the assumption that <<< would cause leading and
> trailing whitespace to be ignored (not stripped) when looking for the
> end-of-here-doc indicator. Because whitespace is ignored, I was then
> proposing some new syntax for stripping whatever one likes from the contents
> of the here-doc.
I think there's two ideas here in the RFC, one great, the other
debateable:
1. Ignore leading/trailing whitespace in here string terminators.
All of these should work:
EOL
EOL
EOL # this is the end of the here doc
I don't think a special syntax is needed just for this. Make
this the default (so "print <<EOL" does this automatically).
If this makes you nervous, use 'This_is_the_end_of_the_string'
or some other suitably long EOL marker.
2. That leading whitespace should be stripped off here docs. I
am personally against this, for all the reasons everyone has
mentioned. It's too specific a "special case". And there's
already an extremely easy way to do this (I think TomC posted
it again) in Perl 5.
That's my($.02). I think #2 should be axed from the proposal. Just focus
on #1, because it's a simple yet gracious thing to do, and there's
enough edge cases to be considered as-is.
-Nate