- or download this
die if @ref / 3;
- or download this
my %out = map { $ref[$_] => [ @ref[$_+1..$_+2] ] }
grep { not $_ % 3 }
0 .. $#ref;
- or download this
for @ref -> $key, $val1, $val2 {
%out{$key} = [ $val1, $val2 ];
}
- or download this
my %out = map -> $k, $v, $w {
$k => [ $v, $w ];
}, @ref;