How do I restore default perl in macOS Mojave? Is there a way to restore default perl5 and cpan modules in Mojave without rebuilding the OS?
Standard binaries are protected by SIP and can‘t easily be removed nor replaced. Booting into recovery and reinstalling macOS only is the easiest way to solve this. You may need to manually reinstall any user-installed CPAN modules again afterwards.