Perl - Shell Subroutine

Posted on martedì 21 dicembre 2010 by Ivano Binetti

How to use Shell Subroutine to simply install CPAN module

The simplest and quickest method to install a CPAN module is to use the perl shell subroutine.
To run the shell subroutine from command-line, use:

# perl -MCPAN -e shell

This command runs Perl, loads the "CPAN" module into memory and runs the shell soubroutine.

So to install, for example, the WWW::Mechanize module you have to simply execute:

cpan> install WWW::Mechanize

and  the shell subroutine will connect to the internet cpan website and will download and automatically install your module.

0 Responses to "Perl - Shell Subroutine":