According to Larry Wall:
> I suppose we could make comma merely puke in scalar context rather
> than DWIM, at least optionally.
I rather like Perl 5's scalar comma operator.
> : $a = (); # $a is a list reference with 0 elements
> : $a = (10); # $a is the scalar 10
> : $a = (10, 20); # $a is a list reference with 2 elements
>
> I don't think that's an important inconsistency.
What if $a and $b are both array refs, and maintenance programmer
changes:
for $a, $b { print }
to:
for $a { print }
Will that end up iterating across @$a? The equivalent of that gotcha
was forever bugging me in Python (gack).
--
Chip Salzenberg - a.k.a. - <[EMAIL PROTECTED]>
"It furthers one to have somewhere to go."