This isn't specific to the REPL:

$ raku -e 'say 1 ... /9/; say $/'
(1 2 3 4 5 6 7 8 9)
Nil

I can only assume that the sequence has its own scope for $/, and thus isn't 
visible outside of it.


Liz

> On 28 Dec 2022, at 16:47, Sean McAfee <eef...@gmail.com> wrote:
> 
> In a fresh 2022.12 Raku REPL, when the endpoint of a sequence is a Regex, the 
> $/ variable seems not to be set:
> 
> [0] > 1 ... /9/
> (1 2 3 4 5 6 7 8 9)
> [1] > $/
> Nil
> 
> If I match more explicitly using a WhateverCode, it works:
> 
> [2] > 1 ... * ~~ /9/
> (1 2 3 4 5 6 7 8 9)
> [3] > $/
> 「9」
> 
> Is this the intended behavior, or a bug?
> 

Reply via email to