https://fluca1978.github.io/2023/08/09/PerlWeeklyChallenge229.html#task2