A new fatal error :
[p5sagit/p5-mst-13.2.git] / pod / perldiag.pod
index af771f1..3baec3a 100644 (file)
@@ -44,7 +44,7 @@ letter.
 
 =over 4
 
-=item A thread exited while %d other threads were still running
+=item A thread exited while %d threads were running
 
 (W) When using threaded Perl, a thread (not necessarily the main
 thread) exited while there were still other threads running.
@@ -64,7 +64,7 @@ L<perlfunc/accept>.
 
 =item '!' allowed only after types %s
 
-(F) The '!' is allowed in pack() or unpack(9 only after certain types.
+(F) The '!' is allowed in pack() or unpack() only after certain types.
 See L<perlfunc/pack>.
 
 =item Ambiguous call resolved as CORE::%s(), qualify as such or use &
@@ -4225,6 +4225,18 @@ defined B<awk> feature.  Use an explicit printf() or sprintf() instead.
 generally because there's a better way to do it, and also because the
 old way has bad side effects.
 
+=item Use of freed value in iteration (perhaps you modified the iterated array within the loop?)
+
+(F) This is typically caused by code like the following:
+
+    @a = (3,4);
+    @a = () for (1,2,@a);
+
+You are not supposed to modify arrays while they are being iterated over.
+For speed and efficiency reasons, Perl internally does not do full
+reference-counting of iterated items, hence deleting such an item in the
+middle of an iteration causes Perl to see a freed value.
+
 =item Use of reference "%s" as array index
 
 (W misc) You tried to use a reference as an array index; this probably