On Friday, December 6, 2002, at 09:46  AM, Luke Palmer wrote:
3) allowing \qq[] in single-quoted here-docs.
PRO: it's consistent with single-quotes
CON: it contradicts the assertion that backslashes are not special in single quoted here-docs
The problem is, as Larry said, that heredocs are *exactly* where you most want to use \q and \qq. You have a big long hairy thing, and you want to treat only one-little-part of it differently, without escaping all the special characters throughout every other part of the doc.

By allowing \qq in single-quoted heredocs, we allow things like:

<<END
...big long text with $ chars $all$ $over$ $it$...
The value of $v is \qq[$v]
...$more$ $icky$ $text$...
END

 we need a quoting mechanism where NOTHING is special
Well, I suppose you could default something to a qq heredoc, and q all the non-qq parts. But that's significantly more awkward-looking, IMO.

Does \qq really come up in heredocs unless you explicitly mean it?

MikeL



Reply via email to