Upgrading Perl on MacOS Mojave
MacOS Mojave, which is from 2018, comes with a version of Perl (5.18) from 2013.
To update to a newer version of Perl, install Homebrew. Then run the command:
brew install perl
And when that's done run the command:
brew install cpanm
In that order. If you install cpanm first, it will latch onto Perl 5.18 and install modules to
/Library/Perl/5.18
instead of to
/usr/local/Cellar/perl/5.36.0/lib/perl5/site_perl/5.36/
And then Perl will be unable to locate the module.
Can't locate ... in @INC