diff options
author | M. J. T. Guy <mjtg@cus.cam.ac.uk> | 2000-07-31 14:28:51 +0100 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2000-08-01 00:55:05 +0000 |
commit | d897a58d2e5e1e3d2a32d03885d609925ad305e4 (patch) | |
tree | 7eaedb9e5e602eecd497a74a279f3055942f2e50 /op.c | |
parent | 183968aae3318dd49f78ae56423591cbb37a918d (diff) | |
download | perl-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.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -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); |