summaryrefslogtreecommitdiff
path: root/op.c
diff options
context:
space:
mode:
authorM. J. T. Guy <mjtg@cus.cam.ac.uk>2000-07-31 14:28:51 +0100
committerJarkko Hietaniemi <jhi@iki.fi>2000-08-01 00:55:05 +0000
commitd897a58d2e5e1e3d2a32d03885d609925ad305e4 (patch)
tree7eaedb9e5e602eecd497a74a279f3055942f2e50 /op.c
parent183968aae3318dd49f78ae56423591cbb37a918d (diff)
downloadperl-d897a58d2e5e1e3d2a32d03885d609925ad305e4.tar.gz
allow non-variable as lhs of non-updating tr///
Message-Id: <E13JEgd-0003fy-00@libra.cus.cam.ac.uk> (aka ID 20000730.002) p4raw-id: //depot/perl@6471
Diffstat (limited to 'op.c')
-rw-r--r--op.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/op.c b/op.c
index 14c557314d..86bd41967d 100644
--- a/op.c
+++ b/op.c
@@ -1988,7 +1988,9 @@ Perl_bind_match(pTHX_ I32 type, OP *left, OP *right)
right->op_type == OP_SUBST ||
right->op_type == OP_TRANS)) {
right->op_flags |= OPf_STACKED;
- if (right->op_type != OP_MATCH)
+ if (right->op_type != OP_MATCH &&
+ ! (right->op_type == OP_TRANS &&
+ right->op_private & OPpTRANS_IDENTICAL))
left = mod(left, right->op_type);
if (right->op_type == OP_TRANS)
o = newBINOP(OP_NULL, OPf_STACKED, scalar(left), right);