Simon Cozens writes:
: On Fri, May 04, 2001 at 04:42:07PM -0700, Nathan Wiger wrote:
: > :      while ($STDIN) { ... }
: > I'm wondering what this will do?
: >    $thingy = $STDIN;
: > This seems to have two possibilities:
: >    1. Make a copy of $STDIN
: 
: This one. I see a filehandle in *boolean* context meaning "read to $_",
: just like the current "while (<FOO>)" magic we all know and occasionally
: love. I'd expect $FOO.readln (or something less Pascalish) to do an
: explicit readline to a variable other than $_

It would be $FOO.next, but yes, that's the basic idea.  It's possible
that iterator variables should be more syntactically distinquished than
that.  One could, I suppose, make up something about $<FOO or $<FOO>
meaning the same thing thing as $FOO.next, for people who are homesick
for the angles, but I haven't thought that out, and don't even dare to
mention it here for fear someone will take it as a promise.  Er, oops...

Larry

Reply via email to