How To Install libiterator-perl on Ubuntu 18.04

In this tutorial we learn how to install libiterator-perl on Ubuntu 18.04. libiterator-perl is Perl implementation of iterators

Introduction

In this tutorial we learn how to install libiterator-perl on Ubuntu 18.04.

What is libiterator-perl

libiterator-perl is:

Iterator is meant to be the definitive implementation of iterators, as popularized by Mark Jason Dominus’s lectures and recent book (Higher Order Perl, Morgan Kauffman, 2005).

An “iterator” is an object, represented as a code block that generates the “next value” of a sequence, and generally implemented as a closure. When you need a value to operate on, you pull it from the iterator. If it depends on other iterators, it pulls values from them when it needs to. Iterators can be chained together (see Iterator::Util for functions that help you do just that), queueing up work to be done but not actually doing it until a value is needed at the front end of the chain. At that time, one data value is pulled through the chain.

There are three methods to install libiterator-perl on Ubuntu 18.04. We can use apt-get, apt and aptitude. In the following sections we will describe each method. You can choose one of them.

Install libiterator-perl Using apt-get

Update apt database with apt-get using the following command.

sudo apt-get update

After updating apt database, We can install libiterator-perl using apt-get by running the following command:

sudo apt-get -y install libiterator-perl

Install libiterator-perl Using apt

Update apt database with apt using the following command.

sudo apt update

After updating apt database, We can install libiterator-perl using apt by running the following command:

sudo apt -y install libiterator-perl

Install libiterator-perl Using aptitude

If you want to follow this method, you might need to install aptitude first since aptitude is usually not installed by default on Ubuntu. Update apt database with aptitude using the following command.

sudo aptitude update

After updating apt database, We can install libiterator-perl using aptitude by running the following command:

sudo aptitude -y install libiterator-perl

How To Uninstall libiterator-perl on Ubuntu 18.04

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

sudo apt-get remove libiterator-perl

Uninstall libiterator-perl And Its Dependencies

To uninstall libiterator-perl and its dependencies that are no longer needed by Ubuntu 18.04, we can use the command below:

sudo apt-get -y autoremove libiterator-perl

Remove libiterator-perl Configurations and Data

To remove libiterator-perl configuration and data from Ubuntu 18.04 we can use the following command:

sudo apt-get -y purge libiterator-perl

Remove libiterator-perl configuration, data, and all of its dependencies

We can use the following command to remove libiterator-perl configurations, data and all of its dependencies, we can use the following command:

sudo apt-get -y autoremove --purge libiterator-perl

References

Summary

In this tutorial we learn how to install libiterator-perl package on Ubuntu 18.04 using different package management tools: apt, apt-get and aptitude.