Re: Rephrase the list literal question

2002-10-10 Thread Peter Scott
The most useful application of this semantic is in a construct like while (my ($key, $value) = each %hash) or if (my ($x, $y) = /(...)(...)/) If anything is assigned to the list of variables, the result of the assignment will be at least 1 (or more likely 2, in the cases

Rephrase the list literal question

2002-10-09 Thread nkuipers
The following is from page 75 in the Camel: List assignment in scalar context returns the number of elements produced by the expression on the iright/i side of the assignment: $x = ( ($a, $b) = (7,7,7) ); #set $x to 3, not 2 why. how. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For

Re: Rephrase the list literal question

2002-10-09 Thread david
Nkuipers wrote: The following is from page 75 in the Camel: List assignment in scalar context returns the number of elements produced by the expression on the iright/i side of the assignment: $x = ( ($a, $b) = (7,7,7) ); #set $x to 3, not 2 can you guess what $x is now: $x = ($a,$b)

Re: Rephrase the list literal question

2002-10-09 Thread Paul Johnson
On Wed, Oct 09, 2002 at 03:22:20PM -0700, nkuipers wrote: The following is from page 75 in the Camel: List assignment in scalar context returns the number of elements produced by the expression on the iright/i side of the assignment: $x = ( ($a, $b) = (7,7,7) ); #set $x to 3, not 2