SPUG: basic array question
DeRykus, Charles E
charles.e.derykus at boeing.com
Wed May 11 13:56:37 PDT 2005
> @a on line 2 has the value (1, 2, 3, 'a', 9), which makes sense. The
> right hand side is evaluated in a list context because the variable on
> the left hand side is an array.
>> Wrong: right hand side is a _list_ which is _coerced_ into an
>> array due to the LHS definition.
Great explanations. The answer above may be correct too but
saying that a literal list doesn't exist in list context but
rather is "coerced into an array due to the LHS" seems like
purely semantic hair-splitting to me. For instance, <$fh>
is in a list context in the expression @x = <$fh>, so why
couldn't a literal list on the RHS be regarded as in list
context as well ...?
(The mythical "list in scalar context" is another matter
More information about the spug-list