Regen perltoc.
[p5sagit/p5-mst-13.2.git] / pod / perldiag.pod
index b55c7df..8a37588 100644 (file)
@@ -182,6 +182,11 @@ spots.  This is now heavily deprecated.
 must either both be scalars or both be lists.  Otherwise Perl won't
 know which context to supply to the right side.
 
+=item Assigning to negative offset in vec
+
+(F) The second argument to vec() must refer to an actual element of
+the string if you wish to assign to it.
+
 =item Attempt to bless into a reference
 
 (F) The CLASSNAME argument to the bless() operator is expected to be
@@ -1865,6 +1870,14 @@ catches that.  But an easy way to do the same thing is:
 
 Another way is to assign to a substr() that's off the end of the string.
 
+Yet another way is to assign to a C<foreach> loop I<VAR> when I<VAR>
+is aliased to a constant in the look I<LIST>:
+
+        $x = 1;
+        foreach my $n ($x, 2) {
+            $n *= 2; # modifies the $x, but fails on attempt to modify the 2
+        } 
+
 =item Modification of non-creatable array value attempted, %s
 
 (F) You tried to make an array value spring into existence, and the