On Mon, Dec 06, 2004 at 09:56:57AM -0800, Larry Wall wrote:
> On Mon, Dec 06, 2004 at 10:38:10AM -0500, Austin Hastings wrote:
> : Can we ditch C<for> in the examples in favor of C<while>, for a while? :)
> 
> Okay.  Have an example:
> 
>     while =$IN -> $line {...}
> 
> I think that works.  I'm back to thinking unary = in scalar context iterates
> like p5's <>

What would these do?

        while =$IN -> $l1,$l2 {...}
        while =$IN -> @x {...}

That first one seems particularly useful.  I'm not exactly sure what
the second one should do, but it seems like it should be similar to
{ my @x = $IN.slurp; ... }

Can it be that unary = in n-ary context iterates like p5's <> except
when n == Inf or n == 0 (which are list and void context I guess) ?

-Scott
-- 
Jonathan Scott Duff
[EMAIL PROTECTED]

Reply via email to