summaryrefslogtreecommitdiff
path: root/pod/perlop.pod
diff options
context:
space:
mode:
Diffstat (limited to 'pod/perlop.pod')
-rw-r--r--pod/perlop.pod14
1 files changed, 12 insertions, 2 deletions
diff --git a/pod/perlop.pod b/pod/perlop.pod
index 56859029bf..17728df9d3 100644
--- a/pod/perlop.pod
+++ b/pod/perlop.pod
@@ -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.