Re: "Secret" operators

[email protected] (José Castro)
Newsgroups perl.fwp
Message-ID <[email protected]>
* Quantum Mechanic ([email protected]) wrote:
> $foo = ($bar) = (9,8,7);
> 
>     RHS list
>     ($bar) array
>     $bar <- 7 (rest discarded)

No, no, no.

      $bar <- 9

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 :-)

jac

--
Jose Alves de Castro <[email protected]>
      http://jose-castro.org/
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.