develooper Front page | perl.perl6.users | Postings from December 2022

$/ not always set after a regex match?

Thread Previous | Thread Next
From:
Sean McAfee
Date:
December 28, 2022 15:47
Subject:
$/ not always set after a regex match?
Message ID:
CANan03bEnxASj7vX2-k5-t4V7qMaj_XQPdUwqp6UJsDsBvBXdw@mail.gmail.com
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?

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About