On Wednesday 03 July 2002 06:39 pm, Larry Wall wrote:
> On Wed, 3 Jul 2002, Damian Conway wrote:
> : Date: Wed, 03 Jul 2002 19:33:33 -0400
> : From: Damian Conway <[EMAIL PROTECTED]>
> : To: "[EMAIL PROTECTED]" <[EMAIL PROTECTED]>
> : Subject: Re: what's new continued
> :
> : Comments (otherwise you have things pretty much right):
>
> I didn't see the original here.
>
> : > we can even have hyper-assignment :
> : >
> : > my ($a, $b) ^= new Foo;
> :
> : This is unlikely to do what you wanted. It creates a new Foo object and
> : then assigns a reference to that one object to both $a and $b. It doesn't
> : create two Foo objects. (But maybe one object referenced twice is what
> : you wanted).
>
> It *might* possibly work to hyper the constructor:
>
>     my ($a, $b) = ^new Foo

Would prefix ^ always return 'wanted' number of repetitions? Like a smart
C<x Inf>?

@x = qw(foo bar baz); @y = (one);
for @x, ^"unseen"; @y, ^"too high" -> $x; $y {
    # foo, one
    # bar, too high
    # baz, too high
}

Ashley Winters

Reply via email to