To install a specific module using CPAN, you can use the following command:
perl -MCPAN -e ‘install Module’
For example:
perl -MCPAN -e ‘install HTML::Template’
If you plan on installing multiple modules, you can use the following command to be brought to the cpan> prompt to install various modules manually.
perl -e shell -MCPAN
After entering the command above, you will be brought to the cpan> prompt where you can enter in the commands you’d like. Below is how you would install the Mail::Internet module.
cpan[1]> install Mail::Internet