[differences between cumulative patch application and perl5.004_01]
[p5sagit/p5-mst-13.2.git] / pod / perldata.pod
index 0dbb92a..dc2975a 100644 (file)
@@ -196,7 +196,7 @@ You can truncate an array down to nothing by assigning the null list ()
 to it.  The following are equivalent:
 
     @whatever = ();
-    $#whatever = $[ - 1;
+    $#whatever = -1;
 
 If you evaluate a named array in a scalar context, it returns the length of
 the array.  (Note that this is not true of lists, which return the
@@ -296,7 +296,10 @@ ignored, but may be read via a DATA filehandle: main::DATA for __END__,
 or PACKNAME::DATA (where PACKNAME is the current package) for __DATA__.
 The two control characters ^D and ^Z are synonyms for __END__ (or
 __DATA__ in a module).  See L<SelfLoader> for more description of
-__DATA__, and an example of its use.
+__DATA__, and an example of its use.  Note that you cannot read from the
+DATA filehandle in a BEGIN block: the BEGIN block is executed as soon as
+it is seen (during compilation), at which point the corresponding
+__DATA__ (or __END__) token has not yet been seen.
 
 A word that has no other interpretation in the grammar will
 be treated as if it were a quoted string.  These are known as