|
|
|
|
|
by b2gills
2183 days ago
|
|
Raku allows strings inside of strings.
Of course it does this by way of embedded closures. "abc{ "def" }"
Which allows it to be arbitrarily deep. "a{ "b{ "c{ "d{ "e{ "f" }g" }h" }i" }j" }k"
→ "abcdefghijk"
This can be handy to generate the correct string. my $count = 3;
"I went to $count place{ "s" if $count ≠ 1 } today"
|
|
And that example reminds me that Bash can do something similar: