in reply to Re: scalar value of list assignment
in thread scalar value of list assignment

You're absolutely right, I confused list with array. I was thinking of something more like this,
sub foo { my @a = qw(first second third); my ($a) = @a; };
In this case, "the number of elements produced by the expression on the right hand side of the assignment" is the the scalar-context value of the array, or 3.

Replies are listed 'Best First'.
Re^3: scalar value of list assignment
by JavaFan (Canon) on Jan 17, 2012 at 20:40 UTC
    In that case, $a will be "first". Now, if you'd remove the parens in the second assignment, the value of $a will be 3.