On Wed, Oct 17, 2001 at 07:33:42AM +0100, Piers Cawley wrote:
> Or something else. I'm assuming something else, because there may be
> cases in which we want to define our own ternary operators. (Weird
> cases perhaps, but cases nevertheless...
>
> operator:??($)::($)
I'd expect that to be more like
operator:??::($$$)
Though I don't know how you'd get the contexts correct. It works okay
in my head if we've done this:
@foo = $a < 5 ?? @bar :: @baz;
but not if we've done this:
@foo = $a < 5 ?? (1,2,3) :: (4,5,6);
Larry said something about commas creating list objects, so I guess this
works out. Hmm ... does that mean that the parens are optional? Would
this work?
@foo = $a < 5 ?? 1,2,3 :: 4,5,6;
i.e., if ($a < 5) { @foo = (1,2,3); } else { @foo = (4,5,6); }
-Scott
--
Jonathan Scott Duff
[EMAIL PROTECTED]