Re: PATCH: S04 - unary C<=> is not slurpy
by Damian Conway other posts by this author
Jun 15 2005 4:10PM messages near this date
Re: PATCH: S04 - unary C<=> is not slurpy
|
Lvalue Str::words iterator
Autrijus asked:
> On Wed, Jun 15, 2005 at 05:37:18PM -0500, Patrick R. Michaud wrote:
>
> >Based on an off-list discussion, it turns out that unary C<=>
> >is not slurpy as mentioned in S04. The following patch to S04
> >corrects this; I've already applied the patch but thought I'd
> >pass it by p6l for review/comments/reactions.
>
>
> Does it mean that it's a synonym to "&readline"?
No. It's the general-purpose "iterate this..." operator.
Applied to a filehandle, it iterates the filehandle (which *is* equivalent to
calling C<readline> ).
But it can also be applied to any other iterator object, in which case it
calls that object's C<.next> method.
Damian
Thread:
Patrick R. Michaud
Autrijus Tang
Damian Conway
|