Re: 20001101.003 PDL
[p5sagit/p5-mst-13.2.git] / pod / perlrun.pod
index c131ad0..d532912 100644 (file)
@@ -569,9 +569,23 @@ the implicit loop, just as in B<awk>.
 =item B<-P>
 
 causes your program to be run through the C preprocessor before
-compilation by Perl.  (Because both comments and B<cpp> directives begin
+compilation by Perl.  Because both comments and B<cpp> directives begin
 with the # character, you should avoid starting comments with any words
-recognized by the C preprocessor such as "if", "else", or "define".)
+recognized by the C preprocessor such as C<"if">, C<"else">, or C<"define">.
+Also, in some platforms the C preprocessor knows too much: it knows
+about the C++ -style until-end-of-line comments starting with C<"//">.
+This will cause problems with common Perl constructs like
+
+    s/foo//;
+
+because after -P this will became illegal code
+
+    s/foo
+
+The workaround is to use some other quoting separator than C<"/">,
+like for example C<"!">:
+
+    s!foo!!;
 
 =item B<-s>