Scalar arrays ("arrayrefs")
No special dereferencing syntax needed
> my $words = [ < orange lime cherry banana lemon > ]; > say $words[2] cherry > say $words[0,2,4] orange cherry lemon > say $words.elems 5
Perl 6 | Perl 6 Lists and Arrays vivified | #12 |
No special dereferencing syntax needed
> my $words = [ < orange lime cherry banana lemon > ]; > say $words[2] cherry > say $words[0,2,4] orange cherry lemon > say $words.elems 5
Copyright © 2012 http://www.pmichaud.com/2012/pres/ |