How To Install perl-lexical-underscore on Fedora 36

In this tutorial we learn how to install perl-lexical-underscore in Fedora 36. perl-lexical-underscore is Access your caller’s lexical underscore

Introduction

In this tutorial we learn how to install perl-lexical-underscore on Fedora 36.

What is perl-lexical-underscore

Starting with Perl 5.10, it is possible to create a lexical version of the Perl default variable $. It is occasionally useful for a subroutine to be able to access its caller’s $ variable regardless of whether it was lexical or not. The “()” sub prototype is the official way to do so, however there are sometimes disadvantages to this. The “lexical a lexical $ variable somewhere up the call stack (using PadWalker magic), or to the global $_ if there was no lexical version.

We can use yum or dnf to install perl-lexical-underscore on Fedora 36. In this tutorial we discuss both methods but you only need to choose one of method to install perl-lexical-underscore.

Install perl-lexical-underscore on Fedora 36 Using dnf

Update yum database with dnf using the following command.

sudo dnf makecache --refresh

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

sudo dnf -y install perl-lexical-underscore

Install perl-lexical-underscore on Fedora 36 Using yum

Update yum database with yum using the following command.

sudo yum makecache --refresh

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

sudo yum -y install perl-lexical-underscore

How To Uninstall perl-lexical-underscore on Fedora 36

To uninstall only the perl-lexical-underscore package we can use the following command:

sudo dnf remove perl-lexical-underscore

perl-lexical-underscore Package Contents on Fedora 36

/usr/share/doc/perl-lexical-underscore
/usr/share/doc/perl-lexical-underscore/COPYRIGHT
/usr/share/doc/perl-lexical-underscore/CREDITS
/usr/share/doc/perl-lexical-underscore/Changes
/usr/share/doc/perl-lexical-underscore/README
/usr/share/licenses/perl-lexical-underscore
/usr/share/licenses/perl-lexical-underscore/LICENSE
/usr/share/man/man3/lexical::underscore.3pm.gz
/usr/share/perl5/vendor_perl/lexical
/usr/share/perl5/vendor_perl/lexical/underscore.pm

References

Summary

In this tutorial we learn how to install perl-lexical-underscore on Fedora 36 using yum and [dnf]((/fedora/36/dnf/).