Q. How do I install a Perl module under Linux or UNIX like operating system?
A. Perl modules (a Perl module is a discrete component of software for the Perl programming language) can be installed using various methods under different Linux distributions.
Task: Install perl module
If you are using Red Hat Linux then use up2date command to install most common modules:
# up2date module-name
Use following command to list all supported modules:
# up2date --showall | grep -i 'perl'
OR use yum command under CentOS/RHEL 5/Fedora core:
# yum list available 'perl'
If you are using Debian Linux, try to use apt-get command to install common perl module. However following is the recommended way to install a perl module.
A) Start CPAN Shell:
# perl -MCPAN -e shell
B) Install a perl module:
At cpan> shell prompt install module using install module::Name command. For example install module called MIME::Lite:
# cpan> install MIME::Lite
Alternatively, try out the following command:
# cpan -i MIME::Lite
See also:
- Email FAQ to a friend
- Printable version
- Rss Feed
- Last Updated: 5-4-07

{ 0 comments… add one now }