# New Ticket Created by "Carl Mäsak"
# Please include the string: [perl #66782]
# in the subject line of all future correspondence about this issue.
# <URL: http://rt.perl.org/rt3/Ticket/Display.html?id=66782 >
<masak> rakudo: $_ = 1; .say; .=subst(/(.) $0*/, { $/.chars ~ $0 }, :g); .say
<p6eval> rakudo 1b06df: OUTPUT«1Use of uninitialized valueUse of
uninitialized value0»
<masak> I expected that one to say '11' the second time.
<masak> what am I missing?
<pmichaud> I'm not sure.
<masak> rakudo: $_ = "foo"; say .subst(/o/, { ~$/ }, :g)
<p6eval> rakudo 1b06df: OUTPUT«foo»
<masak> rakudo: $_ = "foo"; say .=subst(/o/, { ~$/ }, :g)
<p6eval> rakudo 1b06df: OUTPUT«Use of uninitialized valueUse of
uninitialized valuef»
* masak submits rakudobug
<TimToady> {} has its own $/ maybe?
<masak> some strange interaction between .= and $/
<masak> TimToady: that doesn't explain why .subst works above.
<pmichaud> it might be an odd interaction with $_ . Or perhaps with
the way .= has been implemented.