Bart Lateur wrote:
>
> $\ = "\n"; print $a = () = qw(a b c);
> -->
> 3
>
> All those who expected that the list would be evaluated in array (not
> list!) context, raise your hands.
this illustrates why the whole subject is, or can be, so confusing.
That qw() list was NOT evaluated in "array" context. It was
eval'd in list context, just like we expect. The $a=3 comes from
the overloaded behavior of the = assigning a list of values, but
in a scalar context.
And now it bothers me that I can't find this documented anywhere.
It certainly isn't under the "=" entry in perlop.
But I thought it was common knowledge...
--
John Porter
We're building the house of the future together.