This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Allow my \$a
[perl5.git] / toke.c
diff --git a/toke.c b/toke.c
index f26c211..efb8348 100644 (file)
--- a/toke.c
+++ b/toke.c
@@ -7554,7 +7554,7 @@ Perl_yylex(pTHX)
                    p = scan_word(p, PL_tokenbuf, sizeof PL_tokenbuf, TRUE, &len);
                    p = skipspace(p);
                }
-               if (*p != '$')
+               if (*p != '$' && *p != '\\')
                    Perl_croak(aTHX_ "Missing $ on loop variable");
            }
            OPERATOR(FOR);