diff options
author | Mark-Jason Dominus <mjd@plover.com> | 2002-04-01 08:22:01 -0500 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2002-04-01 17:56:27 +0000 |
commit | f34840d8d697d9f8be532dea1352cc0aeefc696b (patch) | |
tree | b4c94b880655adcbe36cfa7ce857f896f3c13831 /op.c | |
parent | e6763d176db5d14f6f7be1cd3c07c1d13323c7ec (diff) | |
download | perl-f34840d8d697d9f8be532dea1352cc0aeefc696b.tar.gz |
warning for split(/.../g, ...);
Message-ID: <20020401182201.21189.qmail@plover.com>
p4raw-id: //depot/perl@15663
Diffstat (limited to 'op.c')
-rw-r--r-- | op.c | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -6658,6 +6658,10 @@ Perl_ck_split(pTHX_ OP *o) 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()); |