On Wed, Oct 4, 2017 at 7:06 PM, Andy Bach <[email protected]> wrote:
> perl6 -e 'my $y=("ab",12,"xx"); print "y=", $y.join(", "), "\n"'
> perl6 -e 'my @y=("ab",12,"xx");print "y=", @y.join(", "), "\n"'
>
This might be a good place to remind folks that perl6 allows
interpolation of method calls, so there's no need to split up your string
literal like that:
> my $y=("ab",12,"xx"); print "y=$y.join(", ")\n";
y=ab, 12, xx
True
> my @y=("ab",12,"xx"); print "[email protected](", ")\n";
y=ab, 12, xx
True
>
... or, you know ...
> my $y=<<ab 12 xx>>; say "y=$y.join(", ")";
y=ab, 12, xx
True
> my @y=<<ab 12 xx>>; say "[email protected](", ")";
y=ab, 12, xx
True
>
Eirik