Before installing a CPAN Module it is important to check your system to see if it already exists. In my case I wanted to install the Syntax::Highlight::HTML module . First I run the following command to see if it exists on my system:
$ perl -MSyntax::Highlight::HTML -e 1
If I do not receive an error then the module is already installed. If I receive an error that looks something like this:
Can’t locate Syntax/Highlight/HTML.pm in @INC ….
This could mean that the module is not installed or the module is not in the @INC path.
To install the module type:
$ sudo cpan -i Syntax::Highlight::HTML
Now the module is installed and ready to use. For more information about installing perl modules type:
$ perldoc perlmodinstall
or try this website
http://theoryx5.uwinnipeg.ca/CPAN/perl/pod/perlmodinstall.html
Troy