The easiest way to install Perl modules is by installing them through “shell”. Let us say that you are trying to install very common module called: LWP
You can test to see if you have LWP installed by typing:
perl -MLWP -le "print(LWP->VERSION)"
If you get something like: Can’t locate LWP.pm in @INC means that you don’t have it installed. To install LWP, type:
perl -MCPAN -eshell
NOTE: most times it is okey for you to accept default answers to questions cpan asks.
You can read through cpan help by typing “h” without the quotes at cpan> prompt.
To continue installing LWP, type:
After few questions, and some text scrolling, you will have LWP installed. If for some reason you don’t want to do it this way, you can always obtain source for the module you are trying to install and build it from source files. You can obtain these files from CPAN site