The design of Perl

By: Boopathy Emailed: 1677 times Printed: 2158 times    

Latest comments
By: rohit kumar - how this program is work
By: Kirti - Hi..thx for the hadoop in
By: Spijker - I have altered the code a
By: ali mohammed - why we use the java in ne
By: ali mohammed - why we use the java in ne
By: mizhelle - when I exported the data
By: raul - no output as well, i'm ge
By: Rajesh - thanx very much...
By: Suindu De - Suppose we are executing

The design of Perl can be understood as a response to three broad trends in the computer industry: falling hardware costs, rising labor costs, and improvements in compiler technology. Many earlier computer languages, such as Fortran and C, aimed to make efficient use of expensive computer hardware. In contrast, Perl is designed to make efficient use of expensive computer-programmers.

Perl has many features that ease the task of the programmer at the expense of greater CPU and memory requirements. These include automatic memory management; dynamic typing; strings, lists, and hashes; regular expressions; introspection; and an eval() function. Perl follows the theory of "no built-in limits", an idea similar to the Zero One Infinity rule.

Wall was trained as a linguist, and the design of Perl is very much informed by linguistic principles. Examples include Huffman coding (common constructions should be short), good end-weighting (the important information should come first), and a large collection of language primitives. Perl favors language constructs that are concise and natural for humans to write, even where they complicate the Perl interpreter.

Perl syntax reflects the idea that "things that are different should look different". For example, scalars, arrays, and hashes have different leading sigils. Array indices and hash keys use different kinds of braces. Strings and regular expressions have different standard delimiters. This approach can be contrasted with languages such as Lisp, where the same S-expression construct and basic syntax are used for many different purposes.

Perl does not enforce any particular programming paradigm (procedural, object-oriented, functional, or others) or even require the programmer to choose among them.
There is a broad practical bent to both the Perl language and the community and culture that surround it. The preface to Programming Perl begins: "Perl is a language for getting your job done." One consequence of this is that Perl is not a tidy language. It includes many features, tolerates exceptions to its rules, and employs heuristics to resolve syntactical ambiguities. Because of the forgiving nature of the compiler, bugs can sometimes be hard to find. Perl's function documentation remarks on the variant behavior of built-in functions in list and scalar contexts that "In general, they do what you want, unless you want consistency."

No written specification or standard for the Perl language exists for Perl versions through Perl 5, and there are no plans to create one for the current version of Perl. There has been only one implementation of the interpreter, and the language has evolved along with it. That interpreter, together with its functional tests, stands as a de facto specification of the language. Perl 6, however, started with a specification, and several projects aim to implement some or all of the specification.


Perl Home | All Perl Tutorials | Latest Perl Tutorials

Sponsored Links

If this tutorial doesn't answer your question, or you have a specific question, just ask an expert here. Post your question to get a direct answer.



Bookmark and Share

Comments(0)


Be the first one to add a comment

Your name (required):


Your email(required, will not be shown to the public):


Your sites URL (optional):


Your comments:



More Tutorials by Boopathy
Perl6 - The future of Perl
Perl for Windows
Implementation of Perl
Perl Applications
The design of Perl
Major features of Perl
Why was it named Perl?
History of Perl?
What is Perl?

More Tutorials in Perl
Steps to Install perl-Apache-DBI in linux
Extract filename from full path using perl
Flush history file on disk (unique hosts reach flush limit of 20000) - Awstats
What is Perl?
History of Perl?
Why was it named Perl?
Major features of Perl
The design of Perl
Perl Applications
Implementation of Perl
Perl for Windows
Perl6 - The future of Perl
POST to URL from Perl Script

More Latest News
Most Viewed Articles (in Perl )
Flush history file on disk (unique hosts reach flush limit of 20000) - Awstats
Major features of Perl
Extract filename from full path using perl
POST to URL from Perl Script
Steps to Install perl-Apache-DBI in linux
Perl6 - The future of Perl
History of Perl?
Why was it named Perl?
The design of Perl
Implementation of Perl
What is Perl?
Perl Applications
Perl for Windows
Most Emailed Articles (in Perl)
History of Perl?
Why was it named Perl?
The design of Perl
Perl Applications
Implementation of Perl
Perl for Windows
Steps to Install perl-Apache-DBI in linux
POST to URL from Perl Script
What is Perl?
Major features of Perl
Perl6 - The future of Perl
Flush history file on disk (unique hosts reach flush limit of 20000) - Awstats
Extract filename from full path using perl