It was Friday, May 09, 2003 when Rafael Garcia-Suarez took the soap box, saying: : Casey West wrote: : > --- perl-current.orig/pod/perlfunc.pod Fri May 9 00:58:19 2003 : > +++ perl-current/pod/perlfunc.pod Fri May 9 07:35:51 2003 : > @@ -1326,9 +1326,9 @@ : > : > # insert dashes just before last line of last file : > while (<>) { : > - if (eof()) { # check for end of current file : > + if (eof()) { # check for end of last file : > print "--------------\n"; : > - close(ARGV); # close or last; is needed if we : > + close(ARGV); # either close or last is needed if we : > # are reading from the terminal : : I disagree with that 2nd change. : I don't see the point of closing ARGV is we don't read from STDIN, because : $. isn't used. And if reading from STDIN, exiting the loop should be : done after the C<print> : : : > } : > print; : : I propose : : : while (<>) { : if (eof()) { # check for end of last file : print "--------------\n"; : } : print; : last if eof(); # needed if we're reading from the terminal : } I accept. Casey West -- "Windows NT 3.5 is not designed to route packets. . .so your Internet Service Provider cannot be a Windows NT 3.5 box." -- Microsoft, 1995, on Win NT RASThread Previous | Thread Next