kid->op_type = OP_PUSHRE;
kid->op_ppaddr = PL_ppaddr[OP_PUSHRE];
scalar(kid);
+ if (ckWARN(WARN_REGEXP) && ((PMOP *)kid)->op_pmflags & PMf_GLOBAL) {
+ Perl_warner(aTHX_ packWARN(WARN_REGEXP),
+ "Use of /g modifier is meaningless in split");
+ }
if (!kid->op_sibling)
append_elem(OP_SPLIT, o, newDEFSVOP());
Use of the C</c> match modifier without an accompanying C</g> modifier
elicits a new warning: C<Use of /c modifier is meaningless without /g>.
+
Use of C</c> in substitutions, even with C</g>, elicits
-C<Use of /c modifier is meaningless in s///>.
+C<Use of /c modifier is meaningless in s///>.
+
+Use of C</g> with C<split> elicits <Use of /g modifier is meaningless
+in split>.
=back
use the /g modifier. Currently, /c is meaningful only when /g is
used. (This may change in the future.)
+=item Use of /g modifier is meaningless in split
+
+(W regexp) You used the /g modifier on the pattern for a C<split>
+operator. Since C<split> always tries to match the pattern
+repeatedly, the C</g> has no effect.
+
=item Use of *glob{FILEHANDLE} is deprecated
(D deprecated) You are now encouraged to use the shorter *glob{IO} form
Package `%s' not found (did you use the incorrect case?)
+ Use of /g modifier is meaningless in split
+
Mandatory Warnings
------------------
Prototype mismatch: [cv_ckproto]
Use of "package" with no arguments is deprecated at - line 3.
Global symbol "BEGIN" requires explicit package name at - line 4.
BEGIN not safe after errors--compilation aborted at - line 4.
+########
+# op.c
+# 20020401 mjd@plover.com at suggestion of jfriedl@yahoo.com
+use warnings 'regexp';
+split /blah/g, "blah";
+no warnings 'regexp';
+split /blah/g, "blah";
+EXPECT
+Use of /g modifier is meaningless in split at - line 4.