in reply to scalar value of list assignment
Mini-Tutorial: Scalar vs List Assignment Operator covers this topic in detail.
So it seems like the value of a list assignment in scalar context is the scalar-context value of the list on the right-hand side of the assignment
No.
>perl -E"say scalar( (4,5,6) )" 6 >perl -E"say scalar( ($x,$y)=(4,5,6) )" 3
List assignment in scalar context evaluates to the number of values to which its RHS evaluates.
the value of the list assignment in list context is the list-context value of list on the left-hand side of the assignment.
Yes.
List assignment in list context evaluates to the values to which its LHS evaluates (as lvalues).
|
|---|