Installing Perl and its module in Windows OS

This article covers straight-forward steps to install the Perl and modules. The MS Windows doesn't have Perl installed and needs to be setup. There are two widely available environmental flavors: -

  1. ActiveState Perl  (offers free community as well as commercial versions)
  2. Strawberry Perl (open-source)

Strawberry Perl 

My preferred Perl environment pick was the Strawberry distribution for below stated reasons: -

  • Strawberry Perl is Open-source
  • Closer to UNIX system environment
  • Loaded with so many external libraries
  • Database clients
  • CPAN (Comprehensive Perl Archive Network) direct access to use required modules which minimize the hurdles for looking the relevant binaries.

How to Install Strawberry Perl:

  1. Go to the website http://strawberryperl.com/ and download the Windows installer.
  2. Run the downloaded setup and complete the installation.
  3. Once installed, go to start menu and type 'perl'. It will show you the 'Perl (command line)', click on that.
  4. You will get the command line where you can run the Perl commands. To check the Perl version, type- 
    perl -v
    
  5. Next step is to install cpanm so that we can use it to install modules from CPAN. Type below command on the command-line: -
    cpan App::cpanminus
  6. Now, let's see how cpanm can be used to install needed modules:-
    cpanm Module::Name

We can use also install modules from shell as well using below commands: - 

perl -MCPAN -e shell

install Email::Send

install Math::Round

install Time::HiRes

 

Conclusion

Perl is a modern programming language and mostly being used in scripting and writing applications. It's environment setup in MS Windows for 32 as well as 64 bit can be done by choosing your suited environment like ActiveState and Strawberry. Strawberry is the open source, and facilitate an easy install of modules from CPAN.