This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Flatten vstrings modified in place
[perl5.git] / doop.c
diff --git a/doop.c b/doop.c
index 1593d19..bfcdef5 100644 (file)
--- a/doop.c
+++ b/doop.c
@@ -641,7 +641,7 @@ Perl_do_trans(pTHX_ SV *sv)
     if (!len)
        return 0;
     if (!(PL_op->op_private & OPpTRANS_IDENTICAL)) {
-       if (!SvPOKp(sv))
+       if (!SvPOKp(sv) || SvTHINKFIRST(sv))
            (void)SvPV_force_nomg(sv, len);
        (void)SvPOK_only_UTF8(sv);
     }