# New Ticket Created by Aleks-Daniel Jakimenko-Aleksejev # Please include the string: [perl #132168] # in the subject line of all future correspondence about this issue. # <URL: https://rt.perl.org/Ticket/Display.html?id=132168 >
Code: say "foo'; my $x = 42; Result: ===SORRY!=== Error while compiling -e Variable '$x' is not declared at -e:2 ------> my ⏏$x = 42; The error message is of course very confusing. I think that any “not declared” error message that happen within interpolating quotes should say something like: Variable '$x' is not declared (in double quotes started at line 1) I think this would give enough clues to figure out the actual problem. Related, but different ticket: https://rt.perl.org/Ticket/Display.html?id=130261 See also this discussion on perl6.users: https://www.nntp.perl.org/group/perl.perl6.users/2017/09/msg4348.html