On Mon, Dec 06, 2004 at 10:59:18AM -0800, Larry Wall wrote:
> On Mon, Dec 06, 2004 at 12:45:18PM -0600, Jonathan Scott Duff wrote:
> : 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; ... }
> 
> The C<while> statement is not an arbiter of lists.  

Okie.

> In any event, I don't think C<while> is ever going to provide an n-ary
> context to whatever it wants a boolean value from.  That's what C<for>
> is for.

Somehow I knew you were going to say that.  I'm just being reluctant
to use C<for> for something I've been using C<while> for all this time.

-Scott
-- 
Jonathan Scott Duff
[EMAIL PROTECTED]

Reply via email to