From: Rafael Garcia-Suarez Date: Mon, 15 Jun 2009 14:16:17 +0000 (+0200) Subject: Fix readline example in perlfunc X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=d947e7a211e365be90c523f5ad3b72b031e840c2;p=p5sagit%2Fp5-mst-13.2.git Fix readline example in perlfunc Only check $! if an error was encountered (that is, not at end of file) --- diff --git a/pod/perlfunc.pod b/pod/perlfunc.pod index 826df27..4593352 100644 --- a/pod/perlfunc.pod +++ b/pod/perlfunc.pod @@ -4349,8 +4349,8 @@ steps to ensure that C was successful. for (;;) { undef $!; unless (defined( $line = <> )) { + last if eof; die $! if $!; - last; # reached EOF } # ... }