diff options
author | Rafael Garcia-Suarez <rgarciasuarez@gmail.com> | 2001-12-06 11:06:01 +0000 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2001-12-06 14:23:06 +0000 |
commit | c35ba56d0568c1f3444c4bf4a401227442dc193f (patch) | |
tree | 1f4072484e2b579bda57c76388083a357ad9d1c6 /op.c | |
parent | d816c1805b681ac3d7f15aed7127d03d660d5db4 (diff) | |
download | perl-c35ba56d0568c1f3444c4bf4a401227442dc193f.tar.gz |
Re: counting tr thinks it's modifying
Message-Id: <slrna0ukap.kbt.rgarciasuarez@rafael.kazibao.net>
p4raw-id: //depot/perl@13486
Diffstat (limited to 'op.c')
-rw-r--r-- | op.c | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -2936,6 +2936,9 @@ Perl_pmtrans(pTHX_ OP *o, OP *expr, OP *repl) if (!squash) o->op_private |= OPpTRANS_IDENTICAL; } + else if (!squash && rlen == tlen && memEQ((char*)t, (char*)r, tlen)) { + o->op_private |= OPpTRANS_IDENTICAL; + } for (i = 0; i < 256; i++) tbl[i] = -1; for (i = 0, j = 0; i < tlen; i++,j++) { |