Perl Variables  «Prev 

Perl Language Elements

When it is necessary to use language elements that have not yet been thoroughly explained, you will usually find a comment telling you that this concept will be covered later.
With that in mind, remember that the order of the lessons has been carefully chosen to give you the foundation for each lesson before it is presented. Sometimes that's a very difficult thing to do, because it's hard to explain arrays without explaining scalars first, and yet there are distinctions in scalars that require arrays to explain.

Perl is a dynamic programming language created by Larry Wall and first released in 1987.
Perl borrows features from a variety of other languages including C, shell scripting (sh), AWK, sed and Lisp. Structurally, Perl is based on the brace-delimited block style of AWK and C, and was widely adopted for its strengths in string processing and lack of the arbitrary limitations of many scripting languages at the time.


Why was Perl created?

There are no shortage of computer languages, especially in 2018 where languages come and go fairly rapidly?
But, at the time, Larry did not see anything that really met his needs. If one of the other languages of today had been available back then, perhaps Larry would have used one of those. He needed something with the quickness of coding available in

  1. shell or
  2. awk programming,
and with some of the power of more advanced tools like
  1. grep,
  2. cut,
  3. sort, and
  4. sed,
  5. #
without having to resort to a language like C.
Perl tries to fill the gap between low-level programming (such as in C or C++ or assembly) and high-level programming (such as shell programming). Low-level programming is usually hard to write and ugly, but fast and unlimited and it is hard to beat the speed of a well-written low-level program on a given machine. And there is not much you cannot do there.
High-level programming, at the other extreme, tends to be slow and limited; there are many things you cannot do at all with the shell or batch programming if there is no command on your system that provides the needed functionality.
Perl is easy, nearly unlimited, mostly fast, and kind of ugly.