in reply to Re: Re: Re: Re: A list returns its last, an array returns its weight
in thread A list returns its last, an array returns its weight

The line my @foo = "one", "two", "three"; has three things going on. The first is an assignment to an array (in list context), and the other two are constant strings (in void context).

"," is an operator. It has a lower precedence than "=". So the expressions "one", "two", "three" aren't in list context.

_____________________________________________________
Jeff[japhy]Pinyan: Perl, regex, and perl hacker, who'd like a job (NYC-area)
s++=END;++y(;-P)}y js++=;shajsj<++y(p-q)}?print:??;

  • Comment on Re: Re: Re: Re: Re: A list returns its last, an array returns its weight