in reply to Say it isn't so, -MO=Deparse!
I haven't used O before, but it sure looks like a bug in Deparse to me. In its version, the assignment to $x is a scalar assignment, but in your original version it's a list assignment. The difference is in the fact that a list assignment in scalar context returns the length of the RHS list (which is 3), whereas a scalar assignment evaluates the RHS in scalar context, and the scalar comma operator always returns its right operand, so you end up with 6.
In a nutshell, Deparse seems not to have picked up on the fact that your parentheses around the $x changed the context of the assignment, so it dropped them. Update: that last sentence is backwards. What I meant was that Deparse failed to add the extra parentheses around $x needed to signify a list assignment to a single scalar variable.
|
|---|