https://blogs.perl.org/users/laurent_r/2024/05/perl-weekly-challenge-271-sort-by-1-bits.html