From bbc73fd9d4a79a3c013fa67ca4cec4c514c014f1 Mon Sep 17 00:00:00 2001 From: Johan Vromans Date: Tue, 24 May 2011 08:34:33 -0700 Subject: [PATCH] [perl #91508] __DATA__ starts reading on the next line In pod/perldata it is described that the DATA filehandle starts reading after the __DATA__ token. In reality, it starts reading on the line following the __DATA__ token. Example: print while ; __DATA__ foo bar This prints "bar", not "foo\nbar". The attached patch fixes the documentation in pod/perldata.pod. --- pod/perldata.pod | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pod/perldata.pod b/pod/perldata.pod index 77cd0c2..28e4ecc 100644 --- a/pod/perldata.pod +++ b/pod/perldata.pod @@ -417,7 +417,7 @@ end of file. Any following text is ignored. Text after __DATA__ may be read via the filehandle C, where C is the package that was current when the __DATA__ token was encountered. The filehandle is left open pointing to the -contents after __DATA__. It is the program's responsibility to +line after __DATA__. It is the program's responsibility to C when it is done reading from it. For compatibility with older scripts written before __DATA__ was introduced, __END__ behaves like __DATA__ in the top level script (but not in files loaded with -- 1.8.3.1