diff options
author | Jeff Pinyan <japhy@pobox.com> | 2001-06-01 06:33:55 -0400 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2001-06-01 15:39:52 +0000 |
commit | 9d1d55b5374182f02a1e09f458fc91bfe389e6cc (patch) | |
tree | 6afa881945b2caee16f8928d754c95bd4297d400 /pod | |
parent | 1b96318cf20a01b551ac8519bf1ee01be2296d37 (diff) | |
download | perl-9d1d55b5374182f02a1e09f458fc91bfe389e6cc.tar.gz |
Re: [PATCHES] regcomp.c, pod/perldiag.pod, t/op/pat.t
Message-ID: <Pine.GSO.4.21.0106011032080.21027-100000@crusoe.crusoe.net>
p4raw-id: //depot/perl@10376
Diffstat (limited to 'pod')
-rw-r--r-- | pod/perldiag.pod | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/pod/perldiag.pod b/pod/perldiag.pod index afcc2ccade..17b4b1bad9 100644 --- a/pod/perldiag.pod +++ b/pod/perldiag.pod @@ -3706,6 +3706,34 @@ earlier in the line, and you really meant a "less than". (W untie) A copy of the object returned from C<tie> (or C<tied>) was still valid when C<untie> was called. +=item Useless (?%s) - use /%s modifier in regex; marked by <-- HERE in m/%s/ + +(W regexp) You have used an internal modifier such as (?o) that has no +meaning unless applied to the entire regexp: + + if ($string =~ /(?o)$pattern/) { ... } + +must be written as + + if ($string =~ /$pattern/o) { ... } + +The <-- HERE shows in the regular expression about +where the problem was discovered. See L<perlre>. + +=item Useless (?-%s) - don't use /%s modifier in regex; marked by <-- HERE in m/%s/ + +(W regexp) You have used an internal modifier such as (?-o) that has no +meaning unless removed from the entire regexp: + + if ($string =~ /(?-o)$pattern/o) { ... } + +must be written as + + if ($string =~ /$pattern/) { ... } + +The <-- HERE shows in the regular expression about +where the problem was discovered. See L<perlre>. + =item Useless use of %s in void context (W void) You did something without a side effect in a context that does |