# New Ticket Created by  Ilya Belikin 
# Please include the string:  [perl #58816]
# in the subject line of all future correspondence about this issue. 
# <URL: http://rt.perl.org/rt3/Ticket/Display.html?id=58816 >


Hello there,
please, look at this (sorry I have tried to make it smaller):

grammar Test {
   token TOP   { ^ <chunk>+ $ };
   token chunk { \w+ <delim>? };
   regex delim { '/' | ':' };
}

"ab/" ~~ Test;

for $/<chunk> -> $c {
   say $c<delim> ~ 's';
}

that produce: 1s
expected: /s

and when I:

my %h = chunk => [{ delim => '/'}];
for %h<chunk> -> $c {
   say $c<delim> ~ 's';
}

I see: /s

if I just say $c<delim> in first example, I see /.

Argh. 8(


Add from Carl:
-------
Strange. What's even stranger, adding

say $/.perl;

before the for loop causes it to revert to the correct behaviour.
------

Ilya
Vladivostok.pm

Reply via email to