On Fri, Apr 29, 2005 at 06:22:57AM -0700, Larry Wall wrote: > : @x[want()] = $_; # scalar context > : @x[want()] = @_; # scalar context > > Maybe "unknown" context, which defaults to list.
I think allowing unknown LHS index expression to default to
scalar context is a bit more useful here. Since we have:
@x[0] = @y; # scalar
@x[0,] = @y; # list
This may be more intuitive:
@x[idx()] = @y; # scalar
@x[idx(),] = @y; # list
Than this:
@x[+idx()] = @y; # scalar
@x[idx()] = @y; # list
But I don't really feel strongly one way or another, as long
as it is specced down. :)
Thanks,
/Autrijus/
pgpQVFZNKCIEY.pgp
Description: PGP signature
