Introduction to Perl

Perl, a feature-rich computer programming language that runs on more than 100 computer platforms, is suitable for everything from mainfrings to portable devices, from rapid prototyping to large-scale scalable development.

In addition to CGI, Perl is used in graphics programming, system management, network programming, finance, biology, and more. Because of its flexibility, Perl is known as the Swiss Army Knife in the scripting language.


What is Perl?

Perl was designed by Larry Wall and is a programming language that he constantly updates and maintains.

Perl has the power and flexibility of high-level languages such as C. In fact, you'll see that many of its features are borrowed from the C language.

Perl, like the scripting language, doesn't need compilers and links to run code, all you have to do is write out the program and tell Perl to run it. This means that Perl is ideal for quick solutions to small programming problems and for creating prototypes for large events to test potential solutions.

Perl provides all the features of scripting languages, such as sed and awk, and many of the features they don't have. Perl also supports sed to Perl and awk to Perl translators.

In short, Perl is as powerful as C and as convenient as scripted description languages such as awk and sed.


Perl benefits

  • The Perl language provides more convenient programming elements such as generic variables, dynamic arrays, Hash tables, and more than "advanced" languages such as C and Pascal.
  • Perl offers a lot of redundant syntax by its powerful and flexible features of dynamic languages, and it also draws on syntax rules from C/C, Basic, Pascal and other languages.
  • Perl does a better job of unifying variable types and masking the details of operations than other high-level languages, such as Python.
  • By drawing heavily on syntax from other languages, programmers who move from other programming languages to perl can quickly get up to handwriting and complete tasks, making perl an easy language to use.
  • Perl is scalable, and we can find many of the modules we need in the central repository of CPAN (the "Comprehensive Perl Archive Network" comprehensive Perl Archive Network).
  • Perl's mod_perl module allows the Apache web server to use the Perl interpreter.


Perl disadvantages

It is precisely because of Perl's flexibility and "excessive" redundant syntax that perl has earned a "reputation" for writing only (write-only), because Perl programs can be written at will (for example, variables can be used directly without declaration), but may be written with fewer letters to get unexpected results (without error), many Perl program code is difficult to read, the length of the program code for the same function can vary ten times, This makes it difficult for the maintainer of the program, even the writer, to maintain it.

Similarly, because Perl's casual features can cause some Perl programmers to forget the syntax, they have to check perl manuals often.

The recommended workaround is to use the use of the use strict in the program; a nd the use of warnings; a nd unify the code style, using libraries instead of using "hard coding" yourself. Perl can also write code as elegantly as languages such as Python or Ruby.

Many times, perl .exe process takes up a lot of memory space, although only for a while, but it doesn't feel good.