in reply to Re^3: ... for (@_) x= 2; (scalar assignment)
in thread ... for (@_) x= 2;

Thanks :) . Now I catched it!
  • Comment on Re^4: ... for (@_) x= 2; (scalar assignment)

Replies are listed 'Best First'.
Re^5: ... for (@_) x= 2; (scalar assignment)
by LanX (Saint) on Dec 29, 2015 at 14:56 UTC
    It's one of these DWIM edge case implementations which make Perl less orthogonal. :-/

    Cheers Rolf
    (addicted to the Perl Programming Language and ☆☆☆☆ :)
    Je suis Charlie!

      It's not an edge case. It's consistent with all `OP=` operators.

      The reason is simple: You can't evaluate an expression as a boolean and as a list.

        > It's consistent with all `OP=` operators.

        You are missing the point, this sub-thread is talking about x not x=

        How many operators do you know which depend on the LHS being in brackets or not?

        Cheers Rolf
        (addicted to the Perl Programming Language and ☆☆☆☆ :)
        Je suis Charlie!