>>>>> "Tillema," == Tillema, Glenn <[EMAIL PROTECTED]> writes:
>> There's never a "list assigned to $foo_count in a scalar context"...
>> the phrase doesn't even make sense to me. :) You can't assign a list
>> to $foo_count. It can never happen. Never. A list cannot exist in a
>> scalar context... the guts of Perl mandates that.
Tillema,> That's how it was phrased in the camel; "List assignment in scalar context
Tillema,> returns the number of elements produced by the expression on the _right_ side
Tillema,> of the assignment..." Your explanation certainly goes into much more detail,
Tillema,> however. Thanks!
Ahh, there's HUGE difference between
list assignment _in_ scalar context
and
list assigned _to_ [a scalar]
Let's draw that out. First is:
$foo_length = () = SOME_LIST
============== list assignment in
============= ______________ scalar context
Second might mean something like:
$foo_length = SOME_LIST # although this can't happen
========= list
= assigned to
=========== scalar
See the difference? And the latter can't happen.
--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<[EMAIL PROTECTED]> <URL:http://www.stonehenge.com/merlyn/>
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!