What is this all about?

$ p6 'my $x="abc"; my $y="def"; say "$x::$y";'
===SORRY!=== Error while compiling -e
Malformed lookup of ::$y; please use ::('$y'), ::{'$y'}, or ::<$y>
at -e:1
------> my $x="abc"; my $y="def"; say "$x⏏::$y";

$ p6 'my $x="abc"; my $y="def"; say "$x\::$y";'
abc::def

$ p6 'say "abc::def";'
abc::def

What does the compiler think `::$y` is?

Many thanks,
-T

Reply via email to