Perl programming language

Tram Ho

1. Open the beginning

Perl (Practical Extraction and Report Language stands for high-level, general-purpose, interpreted, dynamic programming languages) was built by Larry Wall in 1987, with the main purpose of creating a capable programming language. Filter a large amount of data and allow data processing to get the results you need.

Perl is a common language in the field of system administration and Web site processing due to the following advantages:

  • There are convenient file management and information processing operations
  • Manipulating the string very well
  • There was a large code library contributed by the Perl user community (CPAN).

Perl’s command syntax is quite similar to C, from symbols to function names, so many people (already experienced with C) find Perl easy to learn. Perl is quite flexible and allows users to deal with the same problem in different ways.

2. History – Call Name – Symbol

  • Wall began designing Perl in 1987 while working as a programmer for Unisys and released version 1.0 on comp.sources.misc on December 18, 1987. Language was quickly expanded a few years later. there. Version 2 of Perl, published in 1988, has a better feature for regular expressions. Version 3, published in 1989, with support for binary data.

In 1991, the Programming Perl book was published and became the search manual of the Perl language. At the same time, version 4 was born, marking an important change of language, and was the first version written in the book.

  • Initially, the language was named “Pearl” (pearl), named after “Parable of the Pearl” in the gospel. Larry has spent a lot of effort searching for a name for the new language. He tried to consider (and ignore) all 3.4 characters in the dictionary. Finally, he named Pearl. But before the first official version of Perl came out, Larry discovered there was a language called PEARL too, so he decided to rename his language to Perl.

Today, Perl becomes the official name of one of the most widely used interpreting languages ​​in the world.

  • Programming Perl, published by O’Reilly Media, came up where the cover of a camel photo cover. Since then, camels have become the symbol of Perl language, as well as that book is also known as The Camel Book.

3. Where is Perl used?

Initially, Perl was created for the purpose of handling strings, exploiting data, and creating reports. But gradually, language features are extended to many different purposes including: system administration, web design, network programming, GUI application development, etc. Perl can also be used to Create images and controls. In addition to connecting to the network via telnet, FTP, etc., create graphical user interfaces, VLSI electronic devices and create mail filters to minimize spam practices as some use cases. Perl Perl is also known for operating OOP (object-oriented programming) and supporting all forms of inheritance, polymorphism and packaging. Perl is flexible enough to support procedural implementation as well as simultaneous OOP. Perl also has additional modules that allow you to write / use / reuse code written in Python, PHP, PDL, TCL, Octave, Java, C, C ++, Basic, Ruby and Lua in Perl scripts. yours. This means that you can combine Perl with additional programming languages ​​instead of rewriting existing code.

Top 10 programming languages ​​to study in 2019 – Guaranteed extremely high salaries
10 most popular programming languages ​​2018

4. Let’s get started

Set up Perl on your system and get ready for the code journey in Perl. This tutorial will take Linux as the operating system that we will use to write code in Perl.

Download & Install Perl – Windows, Mac & Linux

Perl is very helpful. Many system utilities are written in or dependent on perl. Perl is used a lot in script writing, so the installed Unix or MacOS perl will need only version checking and updates. To check the version you can use: Perl -v

  • On Windows, to install, you must install ActivePerl first in this link . The installation is also very simple.

IDE perl

There are many perl Ide: text editor, sublime, vim, notepad ++, padre, Intellj … For me, use Interllj of jetbrain (download here ), Install additional support Perl5-Idea (please refer to this link ) )

Perl Module

Perl comes with a lot of modules. but it takes some time until you get used to using it, not only that they also have a lot of modules that work together but not all of them can be used effectively, and each The module has different versions to be cautious about using. This is the same as selecting and using the gem (in Rails) for the right purpose and achieving high efficiency at work. In this part of the Perl tutorial I will explain how to find your module around the documentation. If you use perl module, you do not have to rewrite the code to perform the same operation. Perl can use such external code libraries. One of the best libraries is CPAN. It stands for Comprehensive Perl Archive Network and contains a large number of Perl modules for you to use. This is a community or network of a large number of developers contributing such modules. By installing support for your CPAN modules in your perl module, you can use CPAN modules and make your work easier. Many modules on CPAN now require a recent version of Perl (version 5.8 and above). Install cpanminus a script to retrieve, extract, build and install modules from CPAN to install other modules more easily. Install perl App-cpanminus modules:

Now install any module:

Run perl

  • Use:

Example: Try Helloworld:

  • Running perl in the command line Need to use the extra flag -e to execute Perl code

Debug in perl

The essential thing that every developer must use is debug, debug the perl file using the flag -d

So there is a debug interface, we can use it freely. I have introduced the perl language in general, although it is the old language but it will be a necessary synthesis for you to use.

Source :

https://en.wikipedia.org/wiki/Perl

https://www.guru99.com/perl-tutorials.html

Search for the perfect fullstack language
7 ways to master a new programming language
Share the news now

Source : viblo .u8eeb488a54525ef109ee90aef96f354c { padding:0px; margin: 0; padding-top:1em!important; padding-bottom:1em!important; width:100%; display: block; font-weight:bold; background-color:#eaeaea; border:0!important; border-left:4px solid #34495E!important; text-decoration:none; } .u8eeb488a54525ef109ee90aef96f354c:active, .u8eeb488a54525ef109ee90aef96f354c:hover { opacity: 1; transition: opacity 250ms; webkit-transition: opacity 250ms; text-decoration:none; } .u8eeb488a54525ef109ee90aef96f354c { transition: background-color 250ms; webkit-transition: background-color 250ms; opacity: 1; transition: opacity 250ms; webkit-transition: opacity 250ms; } .u8eeb488a54525ef109ee90aef96f354c .ctaText { font-weight:bold; color:inherit; text-decoration:none; font-size: 16px; } .u8eeb488a54525ef109ee90aef96f354c .postTitle { color:#000000; text-decoration: underline!important; font-size: 16px; } .u8eeb488a54525ef109ee90aef96f354c:hover .postTitle { text-decoration: underline!important; } Tìm kiếm ngôn ngữ fullstack hoàn hảo .u9496f9d633e189efa1d89bb7b7cbd2de { padding:0px; margin: 0; padding-top:1em!important; padding-bottom:1em!important; width:100%; display: block; font-weight:bold; background-color:#eaeaea; border:0!important; border-left:4px solid #34495E!important; text-decoration:none; } .u9496f9d633e189efa1d89bb7b7cbd2de:active, .u9496f9d633e189efa1d89bb7b7cbd2de:hover { opacity: 1; transition: opacity 250ms; webkit-transition: opacity 250ms; text-decoration:none; } .u9496f9d633e189efa1d89bb7b7cbd2de { transition: background-color 250ms; webkit-transition: background-color 250ms; opacity: 1; transition: opacity 250ms; webkit-transition: opacity 250ms; } .u9496f9d633e189efa1d89bb7b7cbd2de .ctaText { font-weight:bold; color:inherit; text-decoration:none; font-size: 16px; } .u9496f9d633e189efa1d89bb7b7cbd2de .postTitle { color:#000000; text-decoration: underline!important; font-size: 16px; } .u9496f9d633e189efa1d89bb7b7cbd2de:hover .postTitle { text-decoration: underline!important; } 7 cách để làm chủ một ngôn ngữ lập trình mới