Regarding your second example
It may <->not have worked in Rakudo Perl, but has been fixed in later versions. (This is due to the deep parsing issue that required a better long token matching algorithm than at the time.)
Regarding your third example
Statement
my $list = <a b c d e f>;
creates $listas a data type Seq, and elements Seqare considered immutable. Do you really want to $listbecome Arraylike in:
my $list = [<a b c d e f>];
, :
pmichaud@orange:~/rakudo$ cat x.p6
use v6;
my $longest = 3;
my $list = [<a b c d e f>];
for $list.list -> $element is rw {
$element = sprintf "%*.*s", $longest, $longest, $element;
$element.say;
}
pmichaud@orange:~/rakudo$ ./perl6 x.p6
a
b
c
d
e
f
pmichaud@orange:~/rakudo$
, !