How To Install perl-Array-Unique on AlmaLinux 8

In this tutorial we learn how to install perl-Array-Unique in AlmaLinux 8. perl-Array-Unique is Tie-able array that allows only unique values

Introduction

In this tutorial we learn how to install perl-Array-Unique on AlmaLinux 8.

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 AlmaLinux 8. 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 AlmaLinux 8 Using dnf

Update yum database with dnf using the following command.

sudo dnf makecache --refresh

After updating yum database, We can install perl-Array-Unique using dnf by running the following command:

sudo dnf -y install perl-Array-Unique

Install perl-Array-Unique on AlmaLinux 8 Using yum

Update yum database with yum using the following command.

sudo yum makecache --refresh

After updating yum database, We can install perl-Array-Unique using yum by running the following command:

sudo yum -y install perl-Array-Unique

How To Uninstall perl-Array-Unique on AlmaLinux 8

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 AlmaLinux 8 using yum and dnf.