diff --git a/toke.c b/toke.c index c14dc0d477..32fe3cf97b 100644 --- a/toke.c +++ b/toke.c @@ -12500,8 +12500,16 @@ Perl_scan_num(pTHX_ const char *start, YYSTYPE* lvalp) /* We use the first character to decide what type of number this is */ switch (*s) { - default: - croak("panic: scan_num, *s=%d", *s); + /* if it starts with a v, it could be a v-string */ + case 'v': + vstring: + sv = newSV(5); /* preallocate storage space */ + ENTER_with_name("scan_vstring"); + SAVEFREESV(sv); + s = scan_vstring(s, PL_bufend, sv); + SvREFCNT_inc_simple_void_NN(sv); + LEAVE_with_name("scan_vstring"); + break; /* if it starts with a 0, it could be an octal number, a decimal in 0.13 disguise, or a hexadecimal number, or a binary number. */ @@ -13074,16 +13082,8 @@ Perl_scan_num(pTHX_ const char *start, YYSTYPE* lvalp) } break; - /* if it starts with a v, it could be a v-string */ - case 'v': - vstring: - sv = newSV(5); /* preallocate storage space */ - ENTER_with_name("scan_vstring"); - SAVEFREESV(sv); - s = scan_vstring(s, PL_bufend, sv); - SvREFCNT_inc_simple_void_NN(sv); - LEAVE_with_name("scan_vstring"); - break; + default: + croak("panic: scan_num, *s=%c", *s); } /* make the op for the constant and return */