summaryrefslogtreecommitdiff
path: root/pod
diff options
context:
space:
mode:
authorRafael Garcia-Suarez <rgarciasuarez@gmail.com>2003-05-09 19:47:49 +0000
committerRafael Garcia-Suarez <rgarciasuarez@gmail.com>2003-05-09 19:47:49 +0000
commit6ac88b1311e2597698c7c3c44bd5af0b603f8aa5 (patch)
treed2afa09a5603ff6b76743a2c4333c06346419bba /pod
parent418272e4394459ff8d3580f3ac6ed7225c26fa9a (diff)
downloadperl-6ac88b1311e2597698c7c3c44bd5af0b603f8aa5.tar.gz
Fix for doc bug #8602 : clarify eof() example comments
p4raw-id: //depot/perl@19465
Diffstat (limited to 'pod')
-rw-r--r--pod/perlfunc.pod5
1 files changed, 2 insertions, 3 deletions
diff --git a/pod/perlfunc.pod b/pod/perlfunc.pod
index b7c1aafba2..44a6f286bf 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<eof> in Perl, because the