https://fluca1978.github.io/2024/03/19/PerlWeeklyChallenge261.html#task2