On 10/02/2017 01:18 PM, ToddAndMargo wrote:
Hi All,
I am writing up a keeper note on <<>> and such. This example
puzzles me. Why the space?
Example of <<>> (double quote and allow insertion of variables into
strings):
$ perl6 -e 'my $x="abc"; my $y=<<xyz{$x}def>>; say "\$x=$x \$y=$y";'
$x=abc $y=xyz abc def
Many thanks,
-T
Hi Guys,
I am trying to document for myself what the difference is
between "" and <<>>.
Maybe I should rephrase the question. Why are these
two different? Why the spaces when using <<>>?
$ perl6 -e 'my $x="abc"; my $y=<<xyz{$x}def>>; say "\$x=$x \$y=$y";'
$x=abc $y=xyz abc def
$ perl6 -e 'my $x="abc"; my $y="xyz{$x}def"; say "\$x=$x \$y=$y";'
$x=abc $y=xyzabcdef
-T