This works for me when I add a couple of 'my's for $j and $k. So it
seems a bug to me. Environment details follow signature.
My usual plaint with the REPL is just that it is a REPL and so cannot
always behave like the compiler unless it gets an entire program in one
Read and has not polluted the Eval with state saved from a prior Loop.
Which is what makes it great for snippets; but allows the occasional
false failure.
Maybe worse is that it helps me be bad-lazy about typing ';'.
➜ ~ raku -v
Welcome to Rakudo™ v2022.03.
Implementing the Raku® Programming Language v6.d.
Built on MoarVM version 2022.03.
➜ ~ uname -a
Linux shrew 5.10.0-18-amd64 #1 SMP Debian 5.10.140-1 (2022-09-02) x86_64 GNU/Linux