https://fluca1978.github.io/2022/06/13/PerlWeeklyChallenge169.html#task1plperl