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, Arrays, and Hashes vivified | #15 |
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 © 2011 http://www.pmichaud.com/2011/pres/ |