#!perl6
use v6;
my $list = 'a' .. 'f';
sub my_function( $list ) {
for ^$list.elems -> $e {
$list[$e].say;
}
}
my_function( $list );
First I tried this in perl5-style, but it didn't work:
for @$list -> $e {
$e.say;
}
# Non-declarative sigil is missing its name at line ..., near "@$list -> "
How could I do this in perl6?