say $s.substr($_, 1) for 0..^$s.chars
is the shortest I can find. Can you golf it to a reasonable size and avoid the repetition?
Perl 5 is shorter: say for split /\b{g}/, $s
The comb
method without an argument will pick out every character, thus:
.say for $s.comb;
Will do what is desired (and is shorter than the Perl 5 version too :-)).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With