develooper Front page | perl.perl6.users | Postings from October 2017

<<>> question

Thread Next
From:
ToddAndMargo
Date:
October 2, 2017 20:20
Subject:
<<>> question
Message ID:
2976f09a-cce1-eae3-bdef-329d0ef13e83@zoho.com
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

Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About