How To Install libarray-group-perl on Ubuntu 18.04

In this tutorial we learn how to install libarray-group-perl on Ubuntu 18.04. libarray-group-perl is module that converts an array into array of arrayrefs of uniform size N

Introduction

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

What is libarray-group-perl

libarray-group-perl is:

Array::Group is a module for converting a list into a list of arrayrefs of the same size. It exports two methods:

The ngroup method reformats a list into a list of arrayrefs. It is often used for formatting data into HTML tables, amongst other things.

dissect() returns a list of lists where the first element of each sublist will be one of the first elements of the source list, and the last element will be one of the last. This behaviour is much more useful when the input list is sorted.

The key difference between the two methods is that dissect() takes elements from the start of the list provided and pushes them onto each of the subarrays sequentially, rather than simply dividing the list into discrete chunks.

There are three methods to install libarray-group-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 libarray-group-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 libarray-group-perl using apt-get by running the following command:

sudo apt-get -y install libarray-group-perl

Install libarray-group-perl Using apt

Update apt database with apt using the following command.

sudo apt update

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

sudo apt -y install libarray-group-perl

Install libarray-group-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 libarray-group-perl using aptitude by running the following command:

sudo aptitude -y install libarray-group-perl

How To Uninstall libarray-group-perl on Ubuntu 18.04

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

sudo apt-get remove libarray-group-perl

Uninstall libarray-group-perl And Its Dependencies

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

sudo apt-get -y autoremove libarray-group-perl

Remove libarray-group-perl Configurations and Data

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

sudo apt-get -y purge libarray-group-perl

Remove libarray-group-perl configuration, data, and all of its dependencies

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

sudo apt-get -y autoremove --purge libarray-group-perl

References

Summary

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