Lightning flashed, thunder crashed and Larry Wall <[EMAIL PROTECTED]> whispered:
| 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 $_",
| 
| It would be $FOO.next, but yes, that's the basic idea.  It's possible

Urr?  How often do you dup filehandles as opposed to reading filehandles?
I think we would be much better off with

        $thingy = $STDIN;

reading a line from $STDIN rather than duping it.  Otherwise, we'll be
constantly having to type five more characters (.next) for a very common
practice.

I'm also concerned about the confusion between C<$MARK.next> and C<next
$MARK> (of course, we haven't seen whether C<next> is going to change).
At the very least,  wouldn't C<$STDIN.read> be better and more orthagonal
with C<read(STDIN)>.

-spp

Reply via email to