This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
[inseparable changes from patch to perl 5.004_04]
[perl5.git] / pod / perlop.pod
index 5685902..17728df 100644 (file)
@@ -567,6 +567,15 @@ the same character fore and aft, but the 4 sorts of brackets
                 s{}{}   Substitution      yes
                tr{}{}   Translation       no
 
+Note that there can be whitespace between the operator and the quoting
+characters, except when C<#> is being used as the quoting character.
+C<q#foo#> is parsed as being the string C<foo>, which C<q #foo#> is the
+operator C<q> followed by a comment. Its argument will be taken from the
+next line. This allows you to write:
+
+    s {foo}  # Replace foo
+      {bar}  # with bar.
+
 For constructs that do interpolation, variables beginning with "C<$>" or "C<@>"
 are interpolated, as are the following sequences:
 
@@ -619,9 +628,9 @@ patterns local to the current package are reset.
 This usage is vaguely deprecated, and may be removed in some future
 version of Perl.
 
-=item m/PATTERN/gimosx
+=item m/PATTERN/cgimosx
 
-=item /PATTERN/gimosx
+=item /PATTERN/cgimosx
 
 Searches a string for a pattern match, and in a scalar context returns
 true (1) or false ('').  If no string is specified via the C<=~> or
@@ -634,6 +643,7 @@ when C<use locale> is in effect.
 
 Options are:
 
+    c  Do not reset search position on a failed match when /g is in effect.
     g  Match globally, i.e., find all occurrences.
     i  Do case-insensitive pattern matching.
     m  Treat string as multiple lines.