I've been wondering if there is any logic to my "no CPAN" requirements that I have been putting up for 13 years on PerlMonks.
If you are seeking wisdom in the form of Perl code, then it is illogical to require "no CPAN". Why would you expect code posted into a PerlMonks node as a response to your question to be better in any way than the code on CPAN? Even if you don't want to install code from CPAN, you could copy-n-paste it from CPAN, just as you would copy-n-paste it from PerlMonks (provided it's pure Perl). Or, you could just look at the source code on CPAN and write your own code based on the algorithm of the code you see.