List interpolation
Scalar arrays do not interpolate:
my @x = 1,2,3; my $y = @x; say @x.elems; # 3 for @x { print "loop", $_ } # "loop1loop2loop3" say $y.elems; # 3 for $y { print "loop", $_ } # "loop1 2 3"
Perl 6 | Perl 6 Lists and Arrays vivified | #16 |
Scalar arrays do not interpolate:
my @x = 1,2,3; my $y = @x; say @x.elems; # 3 for @x { print "loop", $_ } # "loop1loop2loop3" say $y.elems; # 3 for $y { print "loop", $_ } # "loop1 2 3"
Copyright © 2012 http://www.pmichaud.com/2012/pres/ |