The Weekly Challenge - 365 #Perl #RakuLang
Task 1: Alphabet Index Digit Sum
Task 2: Valid Token Counter
https://theweeklychallenge.org/blog/perl-weekly-challenge-365
The Weekly Challenge - 365

The Weekly Challenge - 365

The Weekly Challenge

@manwar Again, #RakuLang offers some #OneLiner solutions to the challenge:

Alphabet Index Digit Sum: ```
( $str.trans(['a'..'z'] => [1..26]), *.comb.sum ... * )[$k]
```

Valid Token Counter: ```
.words.grep(/^ <:Ll>+ [ \- <:Ll>+ ]? <[,.!]>? $/).elems
```