The following outline is provided as an overview of and topical guide to the Perl programming language:

Perl – high-level, general-purpose, interpreted, multi-paradigm, dynamic programming language. Perl was originally developed by Larry Wall in 1987 as a general-purpose Unix scripting language to make report processing easier. Since then, it has undergone many changes and revisions and become widely popular amongst programmers. Larry Wall continues to oversee development of Raku. Note that Perl and Raku are receiving ongoing development, therefore making Perl a family of programming languages. It stands for Practical Extraction and Reporting Language which processes data using pattern matching technique.

What type of thing is Perl?

Perl can be described as all of the following types of things: Family of programming languages – a programming language is an artificial language designed to communicate instructions to a machine, particularly a computer. Programming languages can be used to create programs that control the behavior of a machine and/or to express algorithms precisely. Both Perl and Raku are each considered a: General-purpose programming language – programming language designed to be used for writing software in a wide variety of application domains. High-level programming language – programming language with strong abstraction from the details of the computer. While low-level programming languages are very cryptic, a higher-level programming language may use natural language elements, be easier to use, making the process of developing a program simpler and more understandable with respect to a low-level language. Interpreted language – programming language in which programs are 'indirectly' executed ("interpreted") by an interpreter program. This can be contrasted with a compiled language which is converted into machine code and then 'directly' executed by the host CPU. Scripting language – programming language that supports the writing of scripts, programs written for a software environment that automate the execution of tasks which could alternatively be executed one by one by a human operator. Glue language – programming language (usually a scripting language) used for writing programs or scripts that activate other scripts and programs (thus "gluing" them together). Dynamic programming language – high-level programming language that executes many common behaviors while running that other languages might perform during compilation, if at all. These behaviors could include extension of the program, by adding new code, by extending objects and definitions, or by modifying the type system, all during program execution. Dynamically typed programming language – A programming language is said to be dynamically typed when most of its data type checking (for example numerical vs. non-numerical) is performed at run time in contrast to at compile time. Therefore, the type for a given variable or value is not locked in. In dynamic typing values have types, but variables do not; that is, a variable can refer to a value of any type. Free and open-source software – software that is both free software and open source. It is liberally licensed to grant users the right to use, copy, study, change, and improve its design through the availability of its source code. Both Perl and Raku are free and open-source. Free software – software that can be used, studied, and modified without restriction, and which can be copied and redistributed in modified or unmodified form either without restriction, or with restrictions that only ensure that further recipients have the same rights under which it was obtained and that manufacturers of consumer products incorporating free software provide the software as source code. In addition to this, Perl is available for free (i.e., at no cost). Open-source software – computer software that is available in source code form: the source code and certain other rights normally reserved for copyright holders are provided under an open-source license that permits users to study, change, improve and at times also to distribute the software. Open source software is very often developed in a public, collaborative manner. Perl is developed and supported by a large international community of volunteers.

Other names for Perl Backronyms that describe Perl while treating it as an acronym: PERL = Practical Extraction and Report Language PERL = Pathologically Eclectic Rubbish Lister Other descriptions Duct tape for the Internet Tim O'Reilly quoting Hassan Schroeder, Sun's first webmaster] Swiss Army chainsaw of scripting languages

Aspects of Perl

Strengths of Perl Flexibility – Perl is feature rich, and has borrowed from many other programming languages. This is reflected in the motto "There's more than one way to do it". There are also many extension modules available to expand the language. Cross-platform implementation – Perl programs work on many types of computers, usually without the need to modify the source code. Perl interpreters have been developed for most operating systems (platforms), taking into account the idiosyncrasies of each, so all such platforms can theoretically run the same code. Text manipulation – anything from spell checking, to search and replace operations using regex, to natural language processing. Pattern matching – regex is integrated into Perl. Stream editing – Database manipulation – Shell scripting – Perl is good for writing programs in the form of a series of commands to be run by the Unix shell, a command line interpreter. Such programs are called "scripts". In this regard, Perl is considered to be a scripting language. Typical operations performed by shell scripts include program execution, printing text, and file manipulation (copying, renaming, deleting, etc.). Being an interpreted language, Perl has the following advantages: Platform independence Reflective programming (reflection) and reflective use of the evaluator (e.g. a first-order eval function) Smaller executable program size (since implementations have flexibility to choose the instruction code) Dynamic typing Dynamic scoping

Weaknesses of Perl Slow – being an interpreted language, Perl code generally runs slower than compiled code. It would not be well suited for writing state-of-the-art video games, for example. Software maintenance – source code may be cryptic (much like C), making it difficult to maintain code or fix bugs in code written by somebody else, unless adequate remarks are included.

Components of Perl

Perl documentation Perl Programming Documentation – name of the user manual for the Perl 5 programming language, available online and for offline use.

Perl language structure Perl language structure Perl data types – classifications identifying various types of data, that determine the possible values for each type; the operations that can be done on values of each type; the meaning of the data; and the way values of each type can be stored.Shaffer, C.A. Data Structures and Algorithms, 1.2 The main data types in Perl are: Scalars Arrays Hashes Filehandles Subroutines Typeglobs Perl modules – modular extensions of the Perl language. The following modules (and module groups) and many more, including support for them (manuals, etc.) can be found on CPAN.org, using its search box: Webpage-related modules – for creating, serving, fetching, and parsing web pages CGI.pm Library for WWW in Perl (LWP) WebFetch URI HTML Graphics-related modules – for manipulating graphics and images GD Graphics Image Image-Pngslimmer CTPP DBIx::Class Gtk2-Perl Mason Moose Perl Data Language (PDL) Perl DBI Perl Object Environment Template Toolkit Tk – for building Perl programs with a graphical user interface

Elements of a Perl script #!/usr/bin/env perl – called the "shebang line", after the hash symbol (#) and ! (bang) at the line start. It is also known as the interpreter directive. # – the number sign, also called the hash symbol. In Perl, the # indicates the comment start. It instructs Perl to ignore the rest of the line and not execute it as script code. Main structure (derived from C) Variables Expressions Assignment statements Brace-delimited Blocks Control structures Subroutines

Programming tools

Text editors that support Perl scripting Notepad++ – supports syntax highlighting and code folding for over 50 programming, scripting, and markup languages, including Perl. gedit – free open source text editor for the GNOME desktop environment, macOS and Microsoft Windows. Designed as a general purpose text editor, gedit emphasizes simplicity and ease of use. It includes tools to edit source code and structured text such as markup languages. It has configurable syntax highlighting for various languages including Perl. UltraEdit – commercial text editor for Microsoft Windows, Linux and macOS (Intel) created in 1994 by Ian D. Mead. The editor contains tools for programmers, including macros, configurable syntax highlighting, code folding, file type conversions, project management, Perl Compatible Regular Expressions for search-and-replace, a column-edit mode, remote editing of files via FTP, interfaces for APIs or command lines of choice and more. Vim – free and open-source text editor based on vi, designed for use both from a command line interface and as a standalone application in a graphical user interface. Includes a scripting interface for Perl. Visual Studio Code – is a free source-code editor from Microsoft, and available for Windows, Linux and macOS. Includes syntax highlighting for Perl and the ability to run and debug Perl code directly within the editor.

Perl support

CPAN – the Comprehensive Perl Archive Network, a repository of over 250,000 software modules and accompanying documentation for 39,000 distributions, written in the Perl programming language by over 12,000 contributors.

Websites PerlMonks

Publications about Perl Books about Perl Programming Perl (aka the Camel Book) Learning Perl (aka the Llama Book) Intermediate Perl Mastering Perl by brian d foy Advanced Perl Programming Effective Perl Programming Higher-Order Perl Perl Best Practices Perl Cookbook Perl Design Patterns Book Object Oriented Perl Perl Hacks

Magazines about Perl The Perl Review

History of Perl History of Perl

Versions of Perl Perl Raku

Perl was derived from

AWK – interpreted programming language designed for text processing and typically used as a data extraction and reporting tool. It is a standard feature of most Unix-like operating systems. AWK is named using the initials from the last name of each of its 3 authors. Bourne shell (sh) – a command-line shell for Unix. C – widely used language. Many later languages have borrowed directly or indirectly from C, including C++, D, Go, Rust, Java, JavaScript, Limbo, LPC, C#, Objective-C, Perl, PHP, Python, Verilog (hardware description language), and Unix's C shell. These languages have drawn many of their control structures and other basic features from C. Most of them (with Python being the most common exception) are also very syntactically similar to C in general, and tend to combine the recognizable expression and statement syntax of C with underlying type systems, data models, and semantics that can be radically different. grep (Global Regular Expression Print) – a command-line utility for searching plain-text data sets for lines matching a regular expression. Grep was first developed for the Unix operating system, but is available today for all Unix-like systems.