in reply to Re: List context or not?
in thread List context or not?

I have apparently been confused for quite some time. I used to think that a list and an array were the same. The Camel book says, however, that
@stuff = ("one", "two", "three");
assigns the entire list value to array @stuff, but:
$stuff = ("one", "two", "three");
assigns only the value three to variable $stuff.

So contrary to what I had thought a list is not an array. It is sort of a proto-array, a thingy that one might likely turn into an array but is not there yet.

There is also something called a reference to an anonymous array. One creates it using brackets as in:

$arrayref = ["one", "two", "three"];
Since lists are comma-separated lists of values the text inside the brackets above is an example of an anonymous array which is also a list. However, lists are not in general arrays, they have to be assigned to arrays.