develooper Front page | perl.fwp | Postings from February 2005

Re: "Secret" operators

Thread Previous | Thread Next
From:
José Castro
Date:
February 1, 2005 11:59
Subject:
Re: "Secret" operators
Message ID:
20050201195928.GB29322@natura.di.uminho.pt
* Quantum Mechanic (quantum_mechanic_1964@yahoo.com) 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 <cog@cpan.org>
      http://jose-castro.org/

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About