[10] Perl was developed by Larry Wall in 1987[11] as a general-purpose Unix scripting language to make report processing easier.
[1] It provides text processing facilities without the arbitrary data-length limits of many contemporary Unix command line tools.
[17][18] Perl gained widespread popularity in the mid-1990s as a CGI scripting language, in part due to its powerful regular expression and string parsing abilities.
[19][20][21][22] In addition to CGI, Perl 5 is used for system administration, network programming, finance, bioinformatics, and other applications, such as for graphical user interfaces (GUIs).
[26][11] The name is occasionally expanded as a backronym: Practical Extraction and Report Language[27] and Wall's own Pathologically Eclectic Rubbish Lister, which is in the manual page for perl.
[39] It was a nearly complete rewrite of the interpreter, and it added many new features to the language, including objects, references, lexical (my) variables, and modules.
This allowed the core interpreter to stabilize, even as it enabled ordinary Perl programmers to add new language features.
Notable new features include subroutine signatures, hash slices/new slice syntax, postfix dereferencing (experimental), Unicode 6.3, and a rand() function using a consistent random number generator.
As of January 2011[update], the developing specification of Perl 6 was encapsulated in design documents called Synopses – numbered to correspond to Apocalypses.
[74] Thesis work by Bradley M. Kuhn, overseen by Wall, considered the possible use of the Java virtual machine as a runtime for Perl.
The Pugs project spawned an active Perl/Haskell cross-language community centered around the Libera Chat #raku IRC channel.
These include automatic memory management; dynamic typing; strings, lists, and hashes; regular expressions; introspection; and an eval() function.
Examples include Huffman coding (common constructions should be short), good end-weighting (the important information should come first), and a large collection of language primitives.
[citation needed] Perl 5 added features that support complex data structures, first-class functions (that is, closures as values), and an object-oriented programming model.
These include references, packages, class-based method dispatch, and lexically scoped variables, along with compiler directives (for example, the strict pragma).
[97] The Perl overview document perlintro states that the names of built-in "magic" scalar variables "look like punctuation or line noise".
The Perl API can be bewildering to the uninitiated, but its entry points follow a consistent naming scheme, which provides guidance to those who use it.
Instead, the interpreter implements its own lexer, which coordinates with a modified GNU bison parser to resolve ambiguities in the language.
Because the Perl interpreter can simulate a Turing machine during its compile phase, it would need to decide the halting problem in order to complete parsing in every case.
Perl makes the unusual choice of giving the user access to its full programming power in its own compile phase.
[111] Because of unusual changes required for the classic Mac OS environment, a special port called MacPerl was shipped independently.
[112] The Comprehensive Perl Archive Network carries a complete list of supported platforms with links to the distributions available on each.
[118] The submitted Perl implementations typically perform toward the high end of the memory-usage spectrum and give varied speed results.
The first such tool was Apache's mod_perl, which sought to address one of the most-common reasons that small Perl programs were invoked rapidly: CGI Web development.
[124] The most critical routines can be written in other languages (such as C), which can be connected to Perl via simple Inline modules or the more complex, but flexible, XS mechanism.
It is also an optional component of the popular LAMP technology stack for Web development, in lieu of PHP or Python.
Perl's text-handling capabilities can be used for generating SQL queries; arrays, hashes, and automatic memory management make it easy to collect and process the returned data.
[134] DBI provides caching for database handles and queries, which can greatly improve performance in long-lived execution environments such as mod_perl,[135] helping high-volume systems avert load spikes as in the Slashdot effect.
In the spirit of the original concept, these programs are moderately obfuscated and short enough to fit into the signature of an email or Usenet message.
The phrase's first use[144] emphasized the difference between pedestrian code meant to teach a newcomer and terse hacks likely to amuse experienced Perl programmers, an example of the latter being JAPHs that were already used in signatures in Usenet postings and elsewhere.