On Tue May 26 16:24:25 2009, jn...@jnthn.net wrote: > 01:21 <@jnthn> rakudo: my %h = B => 2; my $x = "ABC"; $x .= > subst(/(<[BD]>)/, > {%h{$0}},:global); say $x; > 01:21 < p6eval> rakudo 695300: OUTPUT«A2C» > 01:21 <@jnthn> rakudo: my %h = B => 2; my $x = "ABC"; $x.=subst(/(<[BD]>)/, > {%h{$0}},:global); say $x; > 01:21 < p6eval> rakudo 695300: OUTPUT«Use of uninitialized valueUse of > uninitialized valueAC» > 01:21 <@jnthn> Nailed it. > 01:21 < DanielC> spaces? > 01:22 <@jnthn> DanielC: Bit more to it than that. Those two actually parse > differently. > 01:22 <@jnthn> But should be behaviourly equivalent. > 01:22 <@jnthn> So, Rakudo bug.
At this point, $/ doesn't work well in subst-closures. However, the real cause for the RT ticket has been fixed: $ perl6 -e 'my %h = B => 2; my $x = "ABC"; $x .= subst(/(<[BD]>)/, %h<B>, :global); say $x;' A2C $ perl6 -e 'my %h = B => 2; my $x = "ABC"; $x.=subst(/(<[BD]>)/, %h<B>, :global); say $x;' A2C Resolving ticket.