Perl Programming Language | Part 2

Perl Programming Language Resources

More than 15 million lines of Perl modules for free use, ranging from advanced mathematics, connections to databases, via networks, the simulation of a quantum computer, and more can be downloaded from a network of sites called CPAN: Comprehensive Perl Archive Network.

The Perl Mechanism

Perl5 is a language which the highly dynamic nature makes meaningful distinctions between the phases of compilation and execution. In addition, the compilation phase does not generate a bytecode as is the case with many other interpreted languages, but a syntax tree (AST, Abstract Syntax Tree).

In practice, Perl first translate the source code, instruction by instruction, to AST, which is then optimized. If instructions are located within a special block as BEGIN or CHECK, they are executed upon compilation (and thus before the rest of the source code is compiled). This is particularly the case of modules loaded by the use statement. The AST itself is a bit more elaborate than usual because it contains AST already execution paths. During the implementation phase, the interpreter therefore follows the paths present in AST and executes the remaining instructions.

For more details on these blocks and their exact order of execution, see Section BEGIN, CHECK, INIT and END perlmod.

Contrary to what some may believe, Perl5 does so at any time bytecode. The project began when compiling bytecode Perl 5005 by Malcolm Beattie has never fully realized, was never fully functional, and will probably be removed in Perl 5.10. This is not a great loss for the arrival of Parrot offers a solution which, if it is not yet operational, is clearly more stable and durable.

Compiling perl6 passes through the rules engine (the equivalent of more advanced expressions current), which produces an AST classic. It is then transcribed into another language, by default the Parrot bytecode. The compiler can translate experimental Pugs AST into languages as diverse as Perl 5, Parrot, JavaScript, Haskell. In the case of the Parrot bytecode, it is executed by the virtual machine of the same name, which has several internal modes, including a compilation system on the fly to deliver maximum performance on each architecture host.

Perl Code Examples

Some people say a humorous means that Perl, Pathologically Eclectic Rubbish Lister ‘(pathological collector of mixed waste) because of the extensive use of special characters full of meaning in language syntax, as shown in this example program:

# An example Perl program
$ Message = “At the point: ‘camel’. \ N”;
print $ message;
$ Message = s ~ / right / back /;
$ Message = ~ s / (‘\ w +’) / reverse ($ 1) / e;
print $ message;
exit 0

and its output to the screen:

At the point: ‘camel’.
Upside: ‘Lemacs’.

The third and fourth lines of this example show the use of regular expressions.

These special characters are related to the processing power of Perl:

•    Scalar designated by $ $ name = “Foo” $ z = 3,
•    Tables designated by @, indexed by []: $ name [95] = “Val d’Oise” (the 96th element of the array is like other scalar!)
•    Associative arrays, or hashes designated by%, indexed by (): ($ code “Val d’Oise”) = 95; (their elements are also scalar)

Community aspects

Perl has a user base large and diverse. For many types of users of the language is also their only common point. System administrators have fond, developers appreciate its conciseness and power, linguists and biologists – usually reluctant to look at the code – the language used as reference in their business applications. Perl is particularly popular in bioinformatics, where programs are subject to constant revisions.

The base includes CPAN and is freely available for Perl users worldwide to 15.4 million lines of code (July 2004) in the form of Perl modules and synopsis of how to implement them. The snowball effect is indisputable.

Trivia

Usually written the name of this language with a capital P as the common language, and a lowercase p in speaking to the interpreter: “only perl Perl analysis correctly. “One consequence is that a system of syntax of a Perl program should use the Perl interpreter to be totally correct. In practice, pure Perl modules like Perl:: Tidy and PPI can understand correctly most of the current code.

A hoax organized by the management team of O’Reilly with the help of Larry Wall and Guido van Rossum (with announcement of an imaginary book which gave the announcement facsimile) announced at one time the merger as a unique language called Parrot Perl 6 and Python, the great panic of some fans of the two languages.

Given the role that Perl was the development of the “new economy”, a joke was paying to the mayor of New York intends to rename Wall Street named after its inventor, which would at least have the merit of does not lead at all cost to the taxpayer!

Software written in Perl

  • Various libraries cover the continuum of content management systems, wikis and blogs. Perl is at the heart of sites like Slashdot, Everything2, Kuro5hin, LiveJournal
  • Request Tracker, a bug tracking system
  • GNU Automake produces makefiles portable
  • Fink is an open source project designed to bring to Mac OS X applications originally written for UNIX
  • SVK is a version control system code. This is an extension of Subversion
  • Movable Type is a publishing platform for businesses, used by companies like General Motors
  • Blosxom (pronounced “blossomme”) is a blogging software and content management system
  • Sympa mailing list manager
  • SpamAssassin *, filter spam email
  • Bugzilla bugtracker
  • Webmin, software configuration of a machine via a web interface
  • Urpmi the Mandriva package manager, and the installer and configuration tools are all written in Perl
  • Frozen Bubble arcade game
  • AWStats, log analyzer
  • Some IRC bots are written in Perl (infobot) or provide interfaces Perl (eggdrop)
  • Koha ILS Prime free license
  • MRTG network monitoring software

Study: From Wikipedia, the free encyclopedia. The text is available under the Creative Commons.

VN:F [1.9.17_1161]
Rating: 0.0/10 (0 votes cast)
VN:F [1.9.17_1161]
Rating: 0 (from 0 votes)

Related Posts:



Online 24X7 Chat Support
 
 
Telephone
Toll Free
Online chat
 
Online 24X7 Email Support
 
Emails
 
 
 
Support
Support email
sales
Sales email
 
Billing
Billing email
 
   
Latest Tutorials & Articles (Updated Daily)
http://blog.eukhost.com
  Forums :
http://www.eukhost.com/forums/