for 1 { say "foo".subst: /(foo)/, {$/[0] ~ "o"}; } #gives # Use of Nil in string context in block at :1 # o