How to Install Various Perl and Switching Different Version?
How to install various Perl and switching different version?¶
Introduction
If you want to install various Perl versions into your Linux (Ubuntu) system, the Switch. pm Perl module will now be available for you to use in your scripts, there are two methods of installing it:
- Install it through the Ubuntu repositories.
- Install the '.pm' through CPAN.
Equipment
Operation System: Ubuntu 14.04 LTS
Usage
Installing 'Switch.pm' using the Ubuntu repositories:
1.. Open terminal (Ctrl+Alt+T in Ubuntu). From the command-line, the installation can be completed by running the following command from the terminal.
$ sudo apt-get install libswitch-perl
2.. If you had Synaptic package management, you would search to 'libswitch-perl' package, select Mark for installation, then click on the Apply button.
3.. Normally, using the Ubuntu Software Center (USC), search for the phrase 'libswitch-perl', highlight the package and select install.
Installing 'Switch.pm' using CPAN
If you would rather install this via CPAN, you can follow these instructions:
1.. Open a terminal (Ctrl+Alt+T).
2.. Enter the command 'cpan'.
3.. At the prompt 'cpan[1]>', type 'install Switch'.
4.. Once completed, Type 'exit'.
Exception
$ cpan
Sorry, we have to rerun the configuration dialog for ‘CPAN.pm’ due to some missing parameters. Configuration will be written to
<</home/username/.cap/CPAN/Myconfig.pm>>
‘CPAN.pm’ requires configuration, but most of it can be done automatically. If you answer 'no' below, you will enter an interactive dialog for each configuration option instead.
Would you like to configure as much as possible automatically? [yes]
Acknowledge
Thank you (Ask Ubuntu) very much for this fantastic solution.