develooper Front page | perl.perl6.language | Postings from November 2004

Re: Angle quotes and pointy brackets

From:
Larry Wall
Date:
November 30, 2004 17:48
Subject:
Re: Angle quotes and pointy brackets
Message ID:
20041201014755.GC4494@wall.org
On Tue, Nov 30, 2004 at 03:03:38PM -0800, Jon Ericson wrote:
: Larry Wall <larry@wall.org> writes:
: 
: > The p5-to-p6 translator will turn any
: >
: >     while (<handle>) {...}
: >
: > into
: >
: >     for @$handle {...}
: 
: Including:
: 
:   while(<>) {...}
: 
: to
: 
:   for @$ {...}
: 
: ?

You left out the most important phrase:

    "or whatever we decide is the correctest idiom."

So if, as has been pointed out, @$handle is too much role shear, then we
probably go with something like

    for *$handle {...}

in which case, if there's no handle, it seems to degrade to

    for * {...}

which seems amazingly something or other.

Larry



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