How To Install perl-Switch.noarch on Amazon Linux 2

In this tutorial we learn how to install perl-Switch.noarch in Amazon Linux 2. perl-Switch.noarch is A switch statement for Perl

Introduction

In this tutorial we learn how to install perl-Switch.noarch on Amazon Linux 2.

What is perl-Switch.noarch

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 to install perl-Switch.noarch on Amazon Linux 2. In this tutorial we discuss both methods but you only need to choose one of method to install perl-Switch.noarch.

Install perl-Switch.noarch on Amazon Linux 2 Using yum

Update yum database with yum using the following command.

sudo yum makecache --refresh

After updating yum database, We can install perl-Switch.noarch using yum by running the following command:

sudo yum -y install perl-Switch.noarch

How To Uninstall perl-Switch.noarch on Amazon Linux 2

To uninstall only the perl-Switch.noarch package we can use the following command:

sudo yum remove perl-Switch.noarch

perl-Switch.noarch Package Contents on Amazon Linux 2

/usr/share/doc/perl-Switch-2.16
/usr/share/doc/perl-Switch-2.16/Changes
/usr/share/doc/perl-Switch-2.16/README
/usr/share/man/man3/Switch.3pm.gz
/usr/share/perl5/vendor_perl/Switch.pm

References

Summary

In this tutorial we learn how to install perl-Switch.noarch on Amazon Linux 2 using yum.