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!

Karim Buzdar holds a degree in telecommunication engineering and holds several sysadmin certifications including CCNA RS, SCP, and ACE. As an IT engineer and technical author, he writes for various websites.

Ubuntu Server Admin

Recent Posts

Canonical announces 12 year Kubernetes LTS

Canonical’s Kubernetes LTS (Long Term Support) will support FedRAMP compliance and receive at least 12…

2 hours ago

Ubuntu Weekly Newsletter Issue 878

Welcome to the Ubuntu Weekly Newsletter, Issue 878 for the week of February 2 –…

21 hours ago

How your feedback shapes the way we support open source software

At Canonical, we firmly believe that delivering an outstanding, customer-centric support experience is impossible without…

1 day ago

How To Install osTicket v1.14 On Ubuntu 20.04

I want to share how to install osTicket v1.14 for Ubuntu 20.04 server. osTicket written…

2 days ago

How To Install WordPress On Ubuntu 20.04

Now I want to share how to install WordPress on ubuntu 20.04 server. WordPress is…

2 days ago

How To Install DNS Server (Bind9) On Ubuntu 20.04

Now I want to share the DNS server installation process on your Ubuntu 20.04 server.…

2 days ago