[inseparable changes from match from perl-5.003_92 to perl-5.003_93]
[p5sagit/p5-mst-13.2.git] / pod / perldiag.pod
index c21e28a..24b1612 100644 (file)
@@ -180,6 +180,15 @@ the return value of your socket() call?  See L<perlfunc/accept>.
 
 (F) You can't allocate more than 2^31+"small amount" bytes.
 
+=item Applying %s to %s will act on scalar(%s)
+
+(W) The pattern match (//), substitution (s///), and translation (tr///)
+operators work on scalar values.  If you apply one of them to an array
+or a hash, it will convert the array or hash to a scalar value -- the
+length of an array, or the population info of a hash -- and then work on
+that scalar value.  This is probably not what you meant to do.  See
+L<perlfunc/grep> and L<perlfunc/map> for alternatives.
+
 =item Arg too short for msgsnd
 
 (F) msgsnd() requires a string at least as long as sizeof(long).