You can use cpan
to install modules directly from the command line:
cpan install DBI
This would be followed by possibly many pages of output describing exactly what it is doing to install the module. Depending on the modules being installed, it may pause and ask you questions.
You can also enter a "shell" thus:
perl -MCPAN -e "shell"
It will produce output as below:
Terminal does not support AddHistory.
cpan shell -- CPAN exploration and modules installation (v2.00)
Enter 'h' for help.
cpan[1]>
Then you can install the modules which you want by the easy command install <module>
.
Example: cpan[1]>
install DBI
After installing successfully, type exit
to quit.