develooper Front page | perl.perl6.language | Postings from June 2005

Re: PATCH: S04 - unary C<=> is not slurpy

Thread Previous
From:
Damian Conway
Date:
June 15, 2005 16:10
Subject:
Re: PATCH: S04 - unary C<=> is not slurpy
Message ID:
42B0B555.6060304@conway.org
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 Previous


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About