https://fluca1978.github.io/2023/09/25/PerlWeeklyChallenge236.html#task2