This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
perldiag: copy/paste error
authorFather Chrysostomos <sprout@cpan.org>
Sun, 13 Feb 2011 22:12:53 +0000 (14:12 -0800)
committerFather Chrysostomos <sprout@cpan.org>
Sun, 13 Feb 2011 22:12:53 +0000 (14:12 -0800)
When the ‘Filehandle opened only for output’ message is displayed, the user is trying to read from the handle, so saying ‘instead of "<" or nothing’ does not make sense, as it would not have produced the error.

pod/perldiag.pod

index 35104fd..52f4583 100644 (file)
@@ -1821,10 +1821,10 @@ write the file, use ">" or ">>".  See L<perlfunc/open>.
 
 (W io) You tried to read from a filehandle opened only for writing, If
 you intended it to be a read/write filehandle, you needed to open it
-with "+<" or "+>" or "+>>" instead of with "<" or nothing.  If you
-intended only to read from the file, use "<".  See L<perlfunc/open>.
-Another possibility is that you attempted to open filedescriptor 0
-(also known as STDIN) for output (maybe you closed STDIN earlier?).
+with "+<" or "+>" or "+>>" instead of with ">".  If you intended only to
+read from the file, use "<".  See L<perlfunc/open>.  Another possibility
+is that you attempted to open filedescriptor 0 (also known as STDIN) for
+output (maybe you closed STDIN earlier?).
 
 =item Filehandle %s reopened as %s only for input