note
clairudjinn
I wrote to Larry about this sort of thing once:<p>
me: 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 <i>right</i> side of the assignment:<p>
<code>$x = ( ($a, $b) = (7,7,7) ); #set $x to 3, not 2</code><p>
why. how.<p>
Larry on why: Because then you can use it for a boolean value:<p>
<code>while (($a,$b) = somefunc()) { ... }</code><p>
If it used the number of elements on the left, it would always be true.<p>
Larry on how: It counts them. :-)
232599
232599