https://fluca1978.github.io/2024/04/08/PerlWeeklyChallenge264.html#task1plperl