projects
/
platform
/
upstream
/
perl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
418272e
)
Fix for doc bug #8602 : clarify eof() example comments
author
Rafael Garcia-Suarez
<rgarciasuarez@gmail.com>
Fri, 9 May 2003 19:47:49 +0000
(19:47 +0000)
committer
Rafael Garcia-Suarez
<rgarciasuarez@gmail.com>
Fri, 9 May 2003 19:47:49 +0000
(19:47 +0000)
p4raw-id: //depot/perl@19465
pod/perlfunc.pod
patch
|
blob
|
history
diff --git
a/pod/perlfunc.pod
b/pod/perlfunc.pod
index
b7c1aaf
..
44a6f28
100644
(file)
--- 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
curren
t file
+ if (eof()) { # check for end of
las
t 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