Re: "Secret" operators

Quantum Mechanic <[email protected]>
Newsgroups gmane.comp.lang.perl.fun
Message-ID <[email protected]>
--- José Castro <[email protected]> wrote:

> * Quantum Mechanic ([email protected])
> wrote:
> > $foo = ($bar) = (9,8,7);
> > 
> >     RHS list
> >     ($bar) array
> >     $bar <- 7 (rest discarded)
> 
> No, no, no.
> 
>       $bar <- 9
> 

Yes, that was a typo -- thanks.

> It's the same as
> 
>   $foo = ($bar, undef, undef) = (9, 8, 7);
> 
> Now the funny thing is that the result from
> 
>   $foo = ($bar, undef, undef, undef) = (9, 8, 7);
> 
> is still the same :-)

Ah, but that supports my theory. It's not the LHS of
the ($bar,...)= assignment that generates the data for
$foo -- it's the RHS. The LHS of the ($bar,...)=
assignment determines the *context* of the $foo=
assignment.

Q.E.D. The quantity of elements on the LHS don't
matter, but the quality of the LHS does.

-QM

=====
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Quantum Mechanics: The dreams stuff is made of


		
__________________________________ 
Do you Yahoo!? 
Yahoo! Mail - now with 250MB free storage. Learn more.
http://info.mail.yahoo.com/mail_250
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.