in reply to Re: Yet Another Split Question
in thread Yet Another Split Question

And here we have another fine example of the need for a whitespace dependency in the parsing of parentheses. Which is why the OP's code above will work correctly in Perl 6.

Replies are listed 'Best First'.
Re^3: Yet Another Split Question
by ysth (Canon) on Aug 12, 2004 at 04:05 UTC
    It's certainly a common enough error to warrant a warning (which, unsurprisingly, perl5 does give once the syntax error-producing [] is removed). But it's a only a warning, so that people with a whitespacy coding style can turn it off.
      Well, it's judgement call I have to make, but I think if you're going to go to the trouble of turning off a warning, it's just as easy to install a syntax warping pragma that lets you program all whitespacey without a warning. Meanwhile, for the vast majority of nonwhitespacey folks, Just Works beats a warning most any day, not to mention saving a whole lot of wear and tear on the FAQ.
        I'm concerned that the syntax will be complex enough that introducing such a pragma without undue effort will be difficult. Perhaps you can keep it in mind when thinking about how "syntax warping pragma"s will work.

        Anyway, I hope it all works out somehow.