in reply to Re^2: Unexpected parsing
in thread Unexpected parsing

Is there any unified list of officially undefined things?

That's the only one that comes to mind. It's documented (too specifically) in perlsyn under statement modifiers (my ... if ...;).

I know, for example, by luck, that $i++ + ++$i can officially do whatever it wants

That one's simply undocumented.

I wonder if it might be appropriate for the precedence table to mention this unexpected (by me) interaction?

I don't see why not, although I don't think it'll ever be an issue in legit code (but my brain is too slow to make sure of that right now). Maybe as a warning in the doc for the cond op.

Replies are listed 'Best First'.
Re^4: Unexpected parsing
by JadeNB (Chaplain) on Dec 16, 2009 at 17:41 UTC
    That one's simply undocumented.
    From Auto increment and Auto decrement:
    Note that just as in C, Perl doesn't define when the variable is incremented or decremented. You just know it will be done sometime before or after the value is returned. This also means that modifying a variable twice in the same statement will lead to undefined behaviour.
    (with the specific example I mentioned listed under “Don't do that”).