From: Rafael Garcia-Suarez Date: Fri, 9 May 2003 19:47:49 +0000 (+0000) Subject: Fix for doc bug #8602 : clarify eof() example comments X-Git-Tag: accepted/trunk/20130322.191538~24233 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=6ac88b1311e2597698c7c3c44bd5af0b603f8aa5;p=platform%2Fupstream%2Fperl.git Fix for doc bug #8602 : clarify eof() example comments p4raw-id: //depot/perl@19465 --- diff --git a/pod/perlfunc.pod b/pod/perlfunc.pod index b7c1aaf..44a6f28 100644 --- a/pod/perlfunc.pod +++ b/pod/perlfunc.pod @@ -1329,12 +1329,11 @@ last file. Examples: # 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 - # are reading from the terminal } print; + last if eof(); # needed if we're reading from a terminal } Practical hint: you almost never need to use C in Perl, because the