diff options
Diffstat (limited to 'toke.c')
-rw-r--r-- | toke.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -10720,7 +10720,9 @@ S_scan_subst(pTHX_ char *start) sv_catpv(repl, es ? "eval " : "do "); sv_catpvs(repl, "{"); sv_catsv(repl, PL_lex_repl); - sv_catpvs(repl, "\n}"); + if (strchr(SvPVX(PL_lex_repl), '#')) + sv_catpvs(repl, "\n"); + sv_catpvs(repl, "}"); SvEVALED_on(repl); SvREFCNT_dec(PL_lex_repl); PL_lex_repl = repl; |