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.
>
> : @x[0,] = want(); # list context
> : @x[want(),] = $_; # list context
> : @x[wan
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 h
On Tue, Apr 26, 2005 at 03:56:37AM +0800, Autrijus Tang wrote:
: On Tue, Apr 26, 2005 at 03:33:44AM +0800, Autrijus Tang wrote:
: > Another quick check on expression context for indexed expressions.
: > Please sanity-check the return value of want() below:
: >
: > @x[0] = want(); # scalar cont
On Tue, Apr 26, 2005 at 03:33:44AM +0800, Autrijus Tang wrote:
: Another quick check on expression context for indexed expressions.
: Please sanity-check the return value of want() below:
:
: @x[0] = want(); # scalar context
Good.
: @x[want()] = $_; # scalar context
: @x[want()] =
On Tue, Apr 26, 2005 at 03:33:44AM +0800, Autrijus Tang wrote:
> Another quick check on expression context for indexed expressions.
> Please sanity-check the return value of want() below:
>
> @x[0] = want(); # scalar context
> @x[want()] = $_; # scalar context
> @x[want()] = @_; #
Another quick check on expression context for indexed expressions.
Please sanity-check the return value of want() below:
@x[0] = want(); # scalar context
@x[want()] = $_; # scalar context
@x[want()] = @_; # scalar context
@x[0,] = want(); # list context
@x[want(),] = $_; #