On Fri, 22 Jun 2001, iansmith wrote:
> Perhaps that should be added to the POD docs for scalar(). Until
> it was pointed out to me, I didn't realise how little sense
> the reverse was. It should be obvious, but from the number of
> times it gets talked about, it isn't. You can upgrade a ship into a
> fleey, but how do you turn a fleet into a ship? (Other than sink
> all but one of them:)
Actually, it is in the docs for scalar:
There is no equivalent operator to force an
expression to be interpolated in list context
because in practice, this is never needed. If you
really wanted to do so, however, you could use the
construction "@{[ (some expression) ]}", but
usually a simple "(some expression)" suffices.
Because "scalar" is unary operator, if you
accidentally use for EXPR a parenthesized list,
this behaves as a scalar comma expression,
evaluating all but the last element in void
context and returning the final element evaluated
in scalar context. This is seldom what you want.
-- Brett
http://www.chapelperilous.net/btfwk/
------------------------------------------------------------------------
How sharper than a hound's tooth it is to have a thankless serpent.