From: Karl Williamson Date: Sat, 2 Apr 2011 04:15:04 +0000 (-0600) Subject: perlrequick: /o no longer needed X-Git-Tag: accepted/trunk/20130322.191538~4505 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=72606c45fe94a8e6dfaf6ad8698f227ece152195;p=platform%2Fupstream%2Fperl.git perlrequick: /o no longer needed This is wrong, and doesn't belong in an introductory document --- diff --git a/pod/perlrequick.pod b/pod/perlrequick.pod index 62ea533..d543389 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 modifier, to only -perform variable substitutions once. If you don't want any -substitutions at all, use the special delimiter C: - - @pattern = ('Seuss'); - m/@pattern/; # matches 'Seuss' - m'@pattern'; # matches the literal string '@pattern' - +operators. The global modifier C 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 jump from match