On Thu, Nov 25, 2004 at 09:37:21PM +0100, Juerd wrote: : Larry Wall skribis 2004-11-25 9:39 (-0800): : > : How is <<'END' disambiguated from <<'qw' list>>, anyway? : > To get the qw// parse you must put a space between the << and the : > quote. This is no hardship semantically, since qw// has always thrown : > away initial and trailing whitespace. : > Under one way of looking at it, it's just kind of a longest token : > rule, since << as a term only ever means qw, and the heredoc tokens : > are actually just long opening quotes: <<', <<", <<q/, etc. that have : > to match a trailing quote. : : Is whitespace between q and the delimiters still valid? Would it be : after <<? Would that mean using q as the first element in a qw-list will : hurt? : : I hope the first answer is 'no' and all other questions are thus : rendered irrelevant. Not that I think getting rid of alphanumeric : delimiters is a good idea, though. I just fear complex parsing and : seemingly random syntax errors.
Whitespace is certainly not allowed after <<q. Whether that means a bare q should disallow whitespace is another matter. Certainly we've taken the step of disallowing whitespace between a sub name and its parentheses, so it's possible we could do it to q// as well, as long as it's still possible to put whitespace between a two-part quote: tr[a-z] [A-Z]; But allowing the first whitespace was just a matter of being consistent. I don't think it's a consistency we have to be consistent about, though. Larry