How To Install perl-Switch on CentOS 7
Introduction
In this tutorial we learn how to install perl-Switch
on CentOS 7.
What is perl-Switch
Switch.pm provides the syntax and semantics for an explicit case mechanism for Perl. The syntax is minimal, introducing only the keywords C
and C and conforming to the general pattern of existing Perl control structures. The semantics are particularly rich, allowing any one (or more) of nearly 30 forms of matching to be used when comparing a switch value with its various cases.
We can use yum
or dnf
to install perl-Switch
on CentOS 7. In this tutorial we discuss both methods but you only need to choose one of method to install perl-Switch.
Install perl-Switch on CentOS 7 Using yum
Update yum database with yum
using the following command.
sudo yum makecache
After updating yum database, We can install perl-Switch
using yum
by running the following command:
sudo yum -y install perl-Switch
Install perl-Switch on CentOS 7 Using dnf
If you don’t have dnf installed you can install DNF on CentOS 7 first.
Update yum database with dnf
using the following command.
sudo dnf makecache
After updating yum database, We can install perl-Switch
using dnf
by running the following command:
sudo dnf -y install perl-Switch
How To Uninstall perl-Switch on CentOS 7
To uninstall only the perl-Switch
package we can use the following command:
sudo dnf remove perl-Switch
References
Summary
In this tutorial we learn how to install perl-Switch
on CentOS 7 using yum
and dnf
.