diff options
author | Rafael Garcia-Suarez <rgarciasuarez@gmail.com> | 2009-06-15 16:16:17 +0200 |
---|---|---|
committer | Rafael Garcia-Suarez <rgarciasuarez@gmail.com> | 2009-06-15 16:18:11 +0200 |
commit | d947e7a211e365be90c523f5ad3b72b031e840c2 (patch) | |
tree | 514790acaec9b3c516d1df40b1620f266ca6e0fc /pod/perlfunc.pod | |
parent | c6757210fa44035178e0a2501e1022995a42b70d (diff) | |
download | perl-d947e7a211e365be90c523f5ad3b72b031e840c2.tar.gz |
Fix readline example in perlfunc
Only check $! if an error was encountered (that is, not at end of file)
Diffstat (limited to 'pod/perlfunc.pod')
-rw-r--r-- | pod/perlfunc.pod | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/pod/perlfunc.pod b/pod/perlfunc.pod index 826df27ef0..4593352f7c 100644 --- a/pod/perlfunc.pod +++ b/pod/perlfunc.pod @@ -4349,8 +4349,8 @@ steps to ensure that C<readline> was successful. for (;;) { undef $!; unless (defined( $line = <> )) { + last if eof; die $! if $!; - last; # reached EOF } # ... } |