On Thu, 21 Jun 2001, Timothy Kimball wrote:

> Randal L. Schwartz wrote:
> : ...
> : Second might mean something like:
> :
> : $foo_length = SOME_LIST # although this can't happen
> :               ========= list
> :             =           assigned to
> : ===========             scalar
> :
> : See the difference?  And the latter can't happen.
>
> Sure it can. Well, the list itself doesn't get assigned to the scalar,
> but an assignment does get made: The last element of SOME_LIST to
> $foo_length. So
>
> my $number_of_pets = ('dog','cat','iguana');
>
> sets $number_of_pets to 'iguana'.

It's still scalar to scalar assignment.  The list isn't getting assigned
to anything -- there's no list context so there is no list assignment.

-- Brett
                                   http://www.chapelperilous.net/btfwk/
------------------------------------------------------------------------
Syntactic sugar causes cancer of the semicolon.
                -- Epigrams in Programming, ACM SIGPLAN Sept. 1982

Reply via email to