According to Larry Wall:
> On Sat, 5 Oct 2002, Chip Salzenberg wrote:
> : I rather like Perl 5's scalar comma operator.
>
> Most of the uses of which are actually in void context [...]
I didn't realize you were distinguishing scalar from void in this, uh,
context. I agree that scalar comma is expendable if void comma can be
rescued. However:
> ... where it doesn't matter if we technically build a list and throw
> it away, or throw away all but the last value, then throw that one
> away too.
Except that it would impose list context on the values; and if the
values to be thrown away are no longer in void context, unnecessary
work may be done to evaluate them fully. This is a bad thing.
(Or are you rescinding the rule that void context is a special kind of
scalar context?)
> If you really want the last value, you can always use
> (LIST)[-1]
If scalar comma goes away, I'd be inclined to replace it with
do { E1; E2; E3 }
which evaluates E1 and E2 in void context.
--
Chip Salzenberg - a.k.a. - <[EMAIL PROTECTED]>
"It furthers one to have somewhere to go."