Perl (Practical Extraction and Reporting Language) is interpreted programming language, which was created by Larry Wall in 1987. During that, as the internet evolved, the Pearl became significantly popular tool for the CGI scripts produce.
Perl was originally script language, which should replace AWK and interpreter sh. The largest expansion happened in the 4th version from the year 1991. Next version came especially with powerful data structures and the option of object programming. Currently, Perl is popular even e. g. in bioinformatics.
When creating the language, Larry Wall went with the saying, that “there’s more than one way to do it”. Therefore, Perl enables to write simply and fast short programs and does not prevent the creation of the difficult ones. One of the ways of writing is often very brief, that is why Perl got a reputation of language, in which is created incomprehensible and unmaintainable code.
Advantages of using Perl
Fast development. Interpreted language allows fast development without the need of compilation or linking. Program is compiled after every execution and whenever is possible to add another code. Before the compilation is possible to perform a part of a code, which sets the constants, with the help of which we can better the optimization part of compilation.
High availability of modules. Exists about 18 thousand freely available modules by third parties in Comprehensive Perl Archive Network CPAN. The installation of modules, its naming, categorization, documentation and testing are standardized. Modules then make almost every available interfaces and libraries accessible.
The work with memory. Work with memory runs automatically, it is no need to allocate it explicitly or to release it.
Advanced data types. Allows e. g. associative fields or hash, linear lists and binary trees are not needed then.
Effective programming. For programs, which are not in direct dependence of the running speed, is maximally suitable language, which requires the line as minimum of a code.
Security. In comparison to languages that are compiled, it has better security options during the run of code.
Simple interconnecting of finished components. As with Delphi, Visual Basic of PowerBuilder, it is easy to interconnect finished components.
Various paradigms. Perl allows procedural programming, functional programming and object-oriented programming.
Disadvantages of using Perl
The risk of readability. Less disciplined programmer can, according to high benevolence of writing, extremely easily create a code, which is completely incomprehensible.
Absence of parser. Perl 5 syntax is so complicated, that there does not exists formal definition of the language syntax, not even independent parser. The only parser is the individual Perl interpret, not even specialized programs as Vim or Emacs can correctly highlight syntax for Perl.
The circular reference problematics. When using reference counting of garbage collector, it is necessary to use destructors, which disrupt the circle, or the weak reference, which does not increase the value of the reference counter.
It is not suitable for education. To start with Perl is risky, because the beginner programmer gets easily used to the fact, that there is no need to take care of many things and then it is difficult to transfer to another language.
Ineffectiveness. In some applications can show ineffectiveness of the dynamically typed language in comparison to statically typed languages. Problematical is especially the memory consumption.
When to use Perl
Perl is often compared to Python. One of the advantages of Python in contrast to Perl is readability of code. Perl is being used for system administration, computer network programming, financial applications, bioinformatics and other applications like GUI.