On Wed, Jun 29, 2005 at 11:39:32PM +0100, Dave Mitchell wrote: > On Wed, Jun 29, 2005 at 10:47:45AM -0500, Steve Peters wrote: > > This works like <$io> described in L<perlop/"I/O Operators"> > > except that it's more readable and can be safely called in a > > -list context but still returns just one line. > > +list context but still returns just one line. If used within a > > +conditional statement, however, you will need to emulate the > ^^^^^^^^^^^^^^^^^^^^^ > > +functionality of <$io> with C<defined($_ = $io->getline)>. > > not within any old conditional statement, only as the sole contents of a > *while* condition.
Or the conditional in a C-style for loop, I believe. Ronald