Perl library locations, and System Integrity Protection
A couple ideas:


Examine the manifest in the latest High Sierra installer or do a clean install on spare disk and compare it to your system
Check the dates on the various directories


A couple comments:


When I do a 10.x upgrade, i.e from Sierra to High Sierra, I always do a clean install consisting of backing up my home dir, reformatting the drive, then installing OS and reinstalling apps and restoring my files. Removes the crud from previous versions.
For any development work (perl, python, java, shell scripts, etc.) on my Mac I never use the Apple supplied versions - I always use something like MacPorts or install and compile my own if necessary - that way you can manage the versions you use and also escape Apple's redesign of standard locations for libraries, include files, etc. Take it one step further and use docker and docker-compose if you really want to avoid this problem.