← Back to Perl Course | Chapter 1: Introduction | Lesson 1 of 7

What is Perl

Perl is a flexible scripting language that is especially good at chewing through text.

In this page:

  1. What is Perl

What is Perl

Perl is a general-purpose, interpreted programming language created by Larry Wall in 1987. It is best known for text processing, regular expressions, system administration scripts and glue code between programs. Its motto is "There's more than one way to do it", so the same task can often be written in several styles.

Note: Perl 5 is the version this course covers; Perl 6 was renamed Raku and is a separate language.

Example: What is Perl

perl
use strict;
use warnings;

my %facts = (
    creator => "Larry Wall",
    first_release => 1987,
    good_at => "text processing",
);

for my $key (sort keys %facts) {
    print "$key: $facts{$key}\n";
}

# Output:
# creator: Larry Wall
# first_release: 1987
# good_at: text processing
Common Mistakes
  1. Confusing Perl 5 with Raku (formerly Perl 6)
  2. Thinking Perl is only for old-fashioned scripts
  3. Assuming there is only one correct way to write a Perl program
Chapter Summary
  • Perl is an interpreted general-purpose language
  • It excels at text processing and regular expressions
  • Perl 5 and Raku are different languages
  • TIMTOWTDI means there is more than one way to do it
🔒

Chapter Quiz — Complete all 7 topics to unlock

0/7 topics done

Complete these topics first:

Login to run this code

C/C++/Java/PHP execution requires a free account. Your code is saved — you'll land right back in the editor after logging in.