https://fluca1978.github.io/2024/01/15/PerlWeeklyChallenge252.html#task1