January 2021 Archives

Perl weekly challenge 096 - Raku

This is a Raku answer for the 096 Perl Weekly Challenge


Exercise 1

The first task consists in writing a script to reverse the order of words without leading/trailing spaces. These are the examples:

Example 1:
Input: $S = "The Weekly Challenge"
Output: "Challenge Weekly The"

Example 2:
Input: $S = " Perl and Raku are part of the same family "
Output: "family same the of part are Raku and Perl"

This is easy to implement in Raku due to the many routin…

About Joan Mimosinnet

user-pic I teach on Social Psychology and have fun in my spare time coding in Raku. "The past is written, the future is left for us to code"