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

Stop Wallpaper Moving when Switching Workspace in Ubuntu 24.04

For GNOME users who don’t like the default workspace switch animation, here’s an extension that…

10 hours ago

Warzone 2100 Released 4.6.0 with Spectator Host Mode

Warzone 2100, the free open-source 3D real-time strategy game, released new major 4.6.0 version few…

1 day ago

What our users make with Ubuntu Pro – Episode 2

How Vaultara achieved FedRAMP compliance with Ubuntu Pro Ubuntu Pro helps businesses worldwide to innovate…

2 days ago

How To Install Zabbix Server 7.4 On Ubuntu 22.04

Zabbix is smart monitoring system on your network. This software written by php mysql. So…

2 days ago

How To Install Zabbix Server 7.2 On Ubuntu 22.04

Zabbix is smart monitoring system on your network. This software written by php mysql. So…

2 days ago

SuperTuxKart 1.5 RC2 added GUI option to Choose Vulkan or DirectX 9

SuperTuxKart, the 3D kart racing game, announced the second release candidate for the next 1.5…

2 days ago