Categories: TutorialsUbuntu

How to Install Perl on Ubuntu 20.04

Introduction

Perl is a programming language that is responsible for creating different algorithms. It is used for administration, GUI development and Web development.

The Perl database interface also supports third-party databases such as Postgre, MySql, and Oracle. Markup languages like HTML also work with Perl.

And we will guide you on how to install Perl on Ubuntu 20.04 as we did below. Hope you understand.

Installing Perl

Step 1 – Update the package

Run:

$ sudo apt update

Output:

Sponsored

Step 2 – Install Perl

Run the apt command:

$ sudo apt install perl

Output:

Checking Perl’s list of installed packages

Run the following command:

$ apt list --installed | grep -i perl

Output:

Sponsored

You can check its version by:

$ perl -v

Output:

For example

Firstly, you create a file ending with *.pl. Here I will create a file named hello.pl:

$ nano hello.pl

Then type the following lines:

#!/usr/bin/perl

use warnings;

print("Hello World!")

Save and exit.

To run:

$ perl hello.pl

Output:

Conclusion

We have shown you how to install Perl on Ubuntu 20.04.

Thanks for referring!

Ubuntu Server Admin

Recent Posts

Canonical Releases Ubuntu 25.04 Plucky Puffin

The latest interim release of Ubuntu introduces “devpacks” for popular frameworks like Spring, along with…

3 days ago

Ubuntu 25.04 (Plucky Puffin) Released

Ubuntu 25.04, codenamed “Plucky Puffin”, is here. This release continues Ubuntu’s proud tradition of integrating…

3 days ago

Extended Security Maintenance for Ubuntu 20.04 (Focal Fossa) begins May 29, 2025

Ubuntu released its 20.04 (Focal Fossa) release 5 years ago, on March 23, 2020. As…

4 days ago

Ubuntu 20.04 LTS End Of Life – activate ESM to keep your fleet of devices secure and operational

Focal Fossa will reach the End of Standard Support in May 2025, also known as…

5 days ago

Ubuntu MATE 25.04 Release Notes

Ubuntu MATE 25.04 is ready to soar! 🪽 Celebrating our 10th anniversary as an official…

5 days ago

Ubuntu Weekly Newsletter Issue 887

Welcome to the Ubuntu Weekly Newsletter, Issue 887 for the week of April 6 –…

6 days ago