summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKarl Williamson <public@khwilliamson.com>2011-04-01 22:15:04 -0600
committerKarl Williamson <public@khwilliamson.com>2011-04-01 22:21:44 -0600
commit72606c45fe94a8e6dfaf6ad8698f227ece152195 (patch)
tree4aad25dc05a9c224864538dc7ef9620ad4340529
parent1e2a213df405afd579850b5ecf53ab85e0bd0fbe (diff)
downloadperl-72606c45fe94a8e6dfaf6ad8698f227ece152195.tar.gz
perlrequick: /o no longer needed
This is wrong, and doesn't belong in an introductory document
-rw-r--r--pod/perlrequick.pod17
1 files changed, 1 insertions, 16 deletions
diff --git a/pod/perlrequick.pod b/pod/perlrequick.pod
index 62ea5330eb..d543389d48 100644
--- a/pod/perlrequick.pod
+++ b/pod/perlrequick.pod
@@ -370,22 +370,7 @@ no string left to it, so it matches 0 times.
=head2 More matching
There are a few more things you might want to know about matching
-operators. In the code
-
- $pattern = 'Seuss';
- while (<>) {
- print if /$pattern/;
- }
-
-Perl has to re-evaluate C<$pattern> each time through the loop. If
-C<$pattern> won't be changing, use the C<//o> modifier, to only
-perform variable substitutions once. If you don't want any
-substitutions at all, use the special delimiter C<m''>:
-
- @pattern = ('Seuss');
- m/@pattern/; # matches 'Seuss'
- m'@pattern'; # matches the literal string '@pattern'
-
+operators.
The global modifier C<//g> allows the matching operator to match
within a string as many times as possible. In scalar context,
successive matches against a string will have C<//g> jump from match