=head2 perl -P and //
-In HP-UX perl is compiled with flags that will cause problems if the
+In HP-UX Perl is compiled with flags that will cause problems if the
-P flag of Perl (preprocess Perl code with the C preprocessor before
perl sees it) is used. The problem is that C<//>, being a C++-style
until-end-of-line comment, will disappear along with the remainder
of the line. This means that common Perl constructs like
- s/foo//;
+ s/foo//;
will turn into illegal code
- s/foo
+ s/foo
-The workaround is to use some other quoting characters than /,
-like for example !
+The workaround is to use some other quoting separator than C<"/">,
+like for example C<"!">:
- s!foo!!;
+ s!foo!!;
=head1 AUTHOR
=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>