On Monday 01 July 2002 02:30 pm, Uri Guttman wrote:
> >>>>> "AW" == Ashley Winters <[EMAIL PROTECTED]> writes:
>
>   AW> Also, where does $() come in? Is statement scalarification ever
>   AW> useful outside a string?
>
> it is the same as scalar() in perl5. it provides scalar context if used
> outside a string.

If the parallel is so close, I assume these 'context' constructs also work?

*(squish())
&(@lazy)

@x = *(@foo, @bar, @baz) => concatenate
@x := &(foo(), @bar, baz()) => very lazy
@x = *(*@baz) => squash a 2d array down to 1d?

Perhaps it's enough to list these coercive functions/operators? 
bit($arg)
int($arg)
num($arg)
str($arg)
obj($arg), $scalar, %hash, @array, &foo, \$ref
scalar($arg), $($arg), $arg
list($arg), ($arg)
flat(@arg), *(@arg), *@arg
lazy(@arg), &(@arg), &@arg

That could make sigil handling pretty easy. $$$$foo would mean $($($($foo))) 
and so forth. Perhaps that's too much?

Ashley Winters

Reply via email to