How To Install perl-Array-Unique on CentOS 7
Introduction
In this tutorial we learn how to install perl-Array-Unique
on CentOS 7.
What is perl-Array-Unique
This package lets you create an array which will allow only one occurrence of any value. In other words, no matter how many times you put in 42 it will keep only the first occurrence and the rest will be dropped. You use the module via tie and once you tied your array to this module it will behave correctly. Uniqueness is checked with the ’eq’ operator so among other things it is case sensitive. As a side effect the module does not allow undef as a value in the array.
We can use yum
or dnf
to install perl-Array-Unique
on CentOS 7. In this tutorial we discuss both methods but you only need to choose one of method to install perl-Array-Unique.
Install perl-Array-Unique 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-Array-Unique
using yum
by running the following command:
sudo yum -y install perl-Array-Unique
Install perl-Array-Unique 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-Array-Unique
using dnf
by running the following command:
sudo dnf -y install perl-Array-Unique
How To Uninstall perl-Array-Unique on CentOS 7
To uninstall only the perl-Array-Unique
package we can use the following command:
sudo dnf remove perl-Array-Unique
References
Summary
In this tutorial we learn how to install perl-Array-Unique
on CentOS 7 using yum
and dnf
.