配列の長さ

配列の長さの求め方。プログラミングPerlにまとまっていたのでメモ。

use Perl6::Say;
my @array = qw( hoge foo var );
say @array + 0;
say $#array + 1;
say scalar(@array);