This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
pp_formline: split FF_LINEGLOB into two blocks
[perl5.git] / pp_ctl.c
index 3304eac..271ab05 100644 (file)
--- a/pp_ctl.c
+++ b/pp_ctl.c
@@ -892,7 +892,6 @@ PP(pp_formline)
                const bool oneline = fpc[-1] == FF_LINESNGL;
                const char *s = item = SvPV_const(sv, len);
                const char *const send = s + len;
-               U8 *tmp = NULL;
 
                item_is_utf8 = DO_UTF8(sv);
                itemsize = len;
@@ -917,6 +916,10 @@ PP(pp_formline)
                        }
                    }
                }
+           }
+
+           {
+               U8 *tmp = NULL;
                if (targ_is_utf8 && !item_is_utf8) {
                    source = tmp = bytes_to_utf8(source, &to_copy);
                    SvCUR_set(PL_formtarget,