Perl vs Python—while both languages have similarities, they are very different. If you’re wondering which language you should learn, you’ll need to know more about the languages themselves, what they’re frequently used for, and what their career outlooks are.

Both Perl and Python are popular programming languages that have been used for decades. But while Python is quickly becoming the most popular and sought-after language, Perl is actually in steep decline.

Let’s take a deeper look.

person in front of desktop screen

An introduction to programming in Perl

Larry Wall designed Perl in 1988. It was extensively used for web application development in the form of Perl/CGI throughout the ’90s and early ’00s. Since then, it’s largely been replaced by other technologies like Python, JavaScript, and PHP.

For a language that’s existed for three decades, Perl hasn’t experienced many significant changes. It’s a high-level, general-purpose language that’s easy to learn but difficult to master. Learning its syntax is relatively straightforward, but a lot of it leans on knowing optional libraries and structures. 

Perl is a dynamic, interpreted language. It’s frequently used for short scripting and smaller programs.

“Hello World” in Perl:

#!/user/bin/perl
use strict;
use warnings;

print(“Hello, world!”);
2022 Complete Python Bootcamp From Zero to Hero in Python

Last Updated March 2021

  • 155 lectures
  • All Levels
4.6 (422,586)

Learn Python like a Professional Start from the basics and go all the way to creating your own applications and games | By Jose Portilla

Explore Course

What is Perl 6/Raku?

As a quick aside, the current version of Perl is 5, which was released in 1998. Then, in 2015, “Perl 6” was released — later named “Raku.” Raku is an updated Perl-family language that is not fully compatible with existing Perl but is also built on it.

The goal of Raku was to modernize Perl while still maintaining the benefits of the language’s legacy. Raku is intended to be a modern language built on Perl’s foundation. 

Few people use Raku because it’s a Perl language, and Perl is considered a “dying” breed. But Raku is actually an excellent language for hobbyist programmers and those who are first learning to program. 

Because of its lack of support, Raku/Perl 6 isn’t likely to be one of the “best” languages for any professional programmer or developer to learn since it’s simply not well-adopted enough. Nonetheless, it’s a robust language that takes advantage of a lot of history and resolves at least some of the issues developers traditionally have with Perl.

For now, Raku can be considered a modernized fork of the Perl language that may be of more use to developers than Perl itself.

Python 101: what is Python used for?

Guido van Rossum developed Python in 1991, and it has been popular ever since. It’s heavily based on the C language family. Today, Python is an extremely popular general purpose interpreted language, known for being particularly easy to use. Python can be used for desktop, mobile, and web applications, but today it’s often used in data science and for machine learning.


As an interpreted language, Python isn’t the most resource-friendly language to use. It can have memory issues and is often a resource hog. It’s not used for lightweight applications such as IoT devices, though it maintains popularity in communities such as Raspberry Pi because it’s so simple and easy.

Even though Python has existed for about the same length of time as Perl, it has remained extremely relevant.

“Hello World” in Python:

print(“Hello, world!”)

(That’s not a typo; Python doesn’t require a semicolon to terminate the line. This can be one of the habits that confuse programmers the most when transitioning to and from Python.)

Perl vs Python: side-by-side comparison

PerlPython
Developed19881991
Lead DeveloperLarry WallGuido van Rossum
Ease of UseEasyEasy
Type of LanguageInterpretedInterpreted
Use CasesCGI Scripts, Web ApplicationsWeb Applications, Mobile Applications, Desktop Applications
Developers~500,000~8,000,000
Average Salary~US$118,000~US$115,000

Ease of use: is Perl or Python easier to learn?

Both Python and Perl are considered easy languages to learn, which is why new developers might wonder about whether they should learn Perl or Python. Programming in Perl is a little more complicated syntactically, but it’s still easy enough to pick up.

However, that doesn’t mean they’re both equally easy to use. As programming languages, the syntax and use of Python and Perl are fairly simple. But Perl has a lot of in-depth, unique knowledge required in terms of the libraries that you might need to use. Because Perl is no longer very popular, few people use it, and there are fewer people to learn from.

Both Python and Perl aren’t really difficult languages to learn. A programmer who wants to know more about programming history and older programming languages might want to learn both simply to increase their breadth of skill. On average, most programmers know three to four languages, and they will often learn more throughout their careers.

But what’s easier than Perl is PHP, which mostly replaced Perl, especially in the web arena.

Popularity: which language is more popular to use?

By leaps and bounds, Python is more popular than Perl. About 8.2 million Python programmers are out there. There isn’t a reliable index of how many Perl programmers there are, but it’s likely around half a million.

That Perl is a fading language is what contributes to only rough estimates regarding how many Perl programmers still exist. Perl’s popularity peaked decades ago, and many of the people who previously may have known Perl have since retired.

Popularity is important when it comes to programming for the following reasons:

Python is a unique case in terms of popularity because it’s so easy. Since it’s so easy, it’s one of the first languages taught in college. Many programmers who have gone through a bootcamp or a degree program will know Python by default, even if it’s not what they’re using in their day-to-day career.

But Perl is also sort of a unique case, especially when it comes to jobs, as we’ll discuss next.

Careers: which language pays more?

This is an interesting question. Though Python is by far more popular, Perl can pay competitive salaries. Few people understand Perl code or write code in Perl. That makes the people who actually are Perl experts more marketable.

On ZipRecruiter, Perl developers average US$118,335 a year. But what says more is that a significant portion of Perl developers make slightly more than that, at US$137,000 a year. Compare this to Python developers, who average US$115,066 a year. But few Python developers actually make that average: a larger chunk of developers make US$80,000 to US$95,000, with another big chunk making US$160,000+.

So, there’s more variance when it comes to Python development, and that’s because Python jobs differ. If you’re using Python for machine learning, you will likely make more than if you’re using Python to develop simple mobile applications. 

When it comes to programming, it’s important to understand that languages never really “die.” Today, huge banking and government systems are running on COBOL, an ancient language that has entirely exited popular, modern use.

Because legacy and antique systems exist, some companies will always need someone specialized in Perl. They cannot renew or change their systems (at least, not frequently), and they still need someone to maintain the existing code base. So, while you may not be hired to create an all-new web application in Perl/CGI, you may find work maintaining one.

Use cases: what are Perl and Python used for?

Despite both being high-level general purpose programming languages, they’re actually used for very different things. Perl and Python can both technically be used for anything as an interpreted language. They just need to be appropriately packaged.

However, Perl is primarily used for CGI scripts, short codes, and web development. Python is used for web development, desktop development, mobile development, data science, and machine learning.

A large part of this has to do with adoption. Both are open-source utilities supported by their communities. The Perl community is currently small, so there are fewer development kits actively supported. The Python community is very large, leading to a larger body of development kits, code snippets, frameworks, and platforms.

Perl has very specific use cases. But Python and Perl’s use cases actually overlap. Python is also a great language for short scripts and web development, and it’s generally better supported than Perl. While a great Perl programmer should be able to do anything a great Python programmer can do, it will be more difficult for them because fewer tools and utilities are available.

When might you want to use Perl rather than Python? Largely if the system is already designed around using Perl. If a system, for instance, relies on code snippets in Perl, it may be that you start using Perl.

Companies: who uses Python vs Perl?

Google, Facebook, Spotify, Instagram, and Netflix all use Python. Amazon, MIT, Venmo, Klarna, and SendGrid use Perl. While the biggest apps in the world use Python, Perl is used by inarguably one of the biggest companies in the world—Amazon. 

Because major companies use Perl, Perl is not likely to go away entirely for a long time. Legacy systems will be able to provide support, and programmers will be needed to support them. Because Perl isn’t that difficult to learn (though it is harder to master), it may not be a bad idea for a developer to pick up a little Perl as they go.

So, should you learn Perl or Python?

For most programmers today, it’s not even a question. Python makes more sense. Python is the fastest-growing language in the world. It’s likely beat in terms of popularity only by Javascript, HTML, and CSS. Python developers are highly in-demand and command very high salaries. So, if you’re going through computer science and looking to pick up object-oriented programming, Python programming just makes sense.

With that said, the rarity of Perl programmers means a very good one can set their price. There are many Python code experts and very few Perl code experts.

However, it’s not that there are significant disadvantages to Perl, either. Being interpreted languages, both Python and Perl are relatively inefficient, so you don’t gain a significant amount of performance value by switching to Python. If you already know some Perl, learning more won’t hurt.

Either way, you will find a place within the market. Python and Perl are general purpose languages, and although they are interpreted languages, they can work for everything from app development to web development. 

To take your next steps in deciding Python vs Perl, consider taking a class in Perl or Python, looking at Perl- or Python-focused Github accounts, or going through some Perl or Python programming exercises.

Page Last Updated: March 2022

Top courses in Python

Programming Numerical Methods in Python
Murad Elarbi
4.6 (670)
Bestseller
Python Network Programming for Network Engineers (Python 3)
David Bombal, Experts with David Bombal
4.7 (7,624)
Python for Data Science and Machine Learning Bootcamp
Jose Portilla
4.7 (116,723)
Bestseller
Machine Learning A-Z™: Hands-On Python & R In Data Science
Kirill Eremenko, Hadelin de Ponteves, Ligency I Team, Ligency Team
4.6 (159,895)
Spark and Python for Big Data with PySpark
Jose Portilla
4.5 (18,772)
Bestseller
Learn Python & Ethical Hacking From Scratch
Zaid Sabih, z Security
4.7 (15,873)
The Complete Python Course | Learn Python by Doing in 2022
Codestars by Rob Percival, Jose Salvatierra, Rob Percival, Teclado by Jose Salvatierra
4.6 (17,302)
Natural Language Processing with Deep Learning in Python
Lazy Programmer Team, Lazy Programmer Inc.
4.6 (6,992)
Data Analysis with Pandas and Python
Boris Paskhaver
4.7 (17,067)
Bestseller
Bayesian Machine Learning in Python: A/B Testing
Lazy Programmer Inc.
4.6 (5,383)
Bestseller

More Python Courses

Python students also learn

Empower your team. Lead the industry.

Get a subscription to a library of online courses and digital learning tools for your organization with Udemy for Business.

Request a demo