Home >> Business >> Publishing and Printing >> Publishing >> Books >> Business >> O'Reilly and Associates >> Technical Books >> Perl




Perl, besides Practical Extraction & Report Language (the backronym, see below), is an interpreted procedural programming language designed by Larry Wall. Perl borrows features from either C, shell scripting (sh), awk, sed, and (less) numbers of more programing language.

Overview

A perlintro(Ace) man page states:

"Perl is a general-purpose programming language originally developed for text manipulation and now used for a wide range of tasks including system administration, web development, network programming, GUI development, and more.

The language is intended to be practical (easy to use, efficient, complete) rather than beautiful (tiny, elegant, minimal). Its major features are that it's easy to use, supports both procedural and object-oriented (OO) programming, has powerful built-in support for text processing, and has one of the world's most impressive collections of third-party modules."

Language features

A overall structure of Perl derives broadly from either C. Perl occurs as procedural programing language, sustaining variables, expressions, assignment statements, brace-delimited code stops, control structures, & subprogram.

Perl too requires features from either shell programming. Perl softwcome are interpreted. Completely variables come marked using leading sigils. Sigils unambiguously identify variable list, so allowing for Perl to have a rich syntax. Importantly, sigils allow variables to exist as interpolated directly into strings. Such as a Unix cases, Perl has numbers of built-inbuilt functions for most common tasks, rather sorting, & for accessing models facilities.

Perl will require associative arrays (known as 'hashes' inside newer versions of perl) from either awk and regular expressions from sed. These simplify & help tons manner of parsing, text treating, & information management tasks.

Within Perl Quint, features were added that trend lines complex information structures, number one-class functions (i personally.e. closures as values), and an object-oriented programming model. These include references, packages, and class-depending method dispatch. Perl Fin as well saw a introduction of lexically scoped variables, which produce it more leisurely to write robust code, & modules, which produce it practical to write & distribute libraries of Perl code.

100% versions of Perl launder automatic information typewriting & memory management. A interpreter knows a nature & severity & storage requirements of each information object in the program; it allocates and frees storage for the babies when necessary. Legal nature and severity conversions come done automatically at start period; illegal nature and severity conversions come calamitous errors.

Applications

Perl has several applications. It has been utilized since a early times of the web to write CGI scripts, and occurs as component of the popular LAMP (Linux / Apache / MySQL / (Perl / PHP / Python)) platform for web development. Perl has been known as "the glue that holds the web together". Big projects written around Perl include Slashdot and early implementations of PHP [http://www.php.net/history] and UseModWiki, the wiki software used around Wikipedia until 2002.

Perl is typically utilized as a "glue language", ligature together systems & interfaces that were non specifically designed to interoperate. Systems administrators utilise Perl as an everthing-general-purpose convienence; short Perl computer software may be entered & rerun in one command line.

Perl is widely utilized inside finance and bioinformatics, where these are valued for rapid application development, ability to cover big information sets, & a accessibility of numbers of standard & 3rd-person modules.

Implementation

Perl is implemented as the core interpreter, written around C, together sustaining a big collection of modules, written within Perl & C. A source distribution is, as of 2005, 12 MB when packaged in the tar file and compressed. the interpreter is 150,000 lines of One hundred code & compiles to a I MB viable in average machine architectures. Alternately, the interpreter may be compiled to a hyperlink library & embedded within more software. There are about D modules in the distribution, comprising 200,000 lines of Perl & even more, an extra 350,000 lines of Hundred code. Very much of the Hundred code in the modules consists of character encoding tables.

A interpreter has an object-oriented architecture. All the elements of the Perl language—scalars, arrays, hashes, coderefs, file hold—come represented in the interpreter by One hundred structs. Operations in these structs come defined by a big collection of macro instruction, typedefs & functions; these be the Perl C API. the Perl API may be bewildering to the uninitiated, however its entry points watch a uniform appellative scheme, which will bring counsel to victims world health organization let it run.

the execution of a Perl program divides broadly into ii phases: compile-instance & start-period. At compile period, the interpreter parses a program text into a syntax tree. At rerun period, it executes a program by walking a tree. A text is parsed just another time, & a syntax tree is subject to optimisation prior to these are executed, and so a execution phase is comparatively effective. Compile-instance optimizations on the syntax tree include constant folding, context propagation, and peephole optimization.

Perl has the context-yours free! grammar; however, it just can't become parsed by the straight Lex/Yacc lexer/parser combination. Instead, it implements its have lexer, which coordinates by using the limited GNU bison parser to resolve ambiguities in the language. These are said that "only perl can parse Perl", meaning that simply a perl interpreter can parse the Perl language. A truth of this is attested per imperfectness of more software that undertake to parse Perl, like source code analyser & auto-indenters.

Maintenance of a Perl interpreter has turn into more and more hard above the years. A code base has been inside continuous development since 1994. A code has been optimized for performance at a expense of simplicity, clarity, & hard internal interfaces. Freshly features develop been added, however virtually complete backwards compatibility by owning sooner versions is maintained. A size & complexness of the interpreter occurs as barrier to developers world health organization wish to act on that.

Perl is distributed by owning a bit of 90,000 functional tests. These do when a share of a normal build run, & extensively exercise the interpreter & its core modules. Perl developers rely in a functional tests to assure that changes to the interpreter don't introduce bugs; on the other hand, Perl users world health organization view the interpreter pass its functional tests on their formulas potty have a high degree of confidence that these are working properly.

there is no written specification or even standard for the Perl language, & no plans to produce 1 for the todays version of Perl. There has sole ever been a single implementation of the interpreter. That interpreter, together using its functional tests, stands as a de facto specification of the language.

Perl is as well popular because of it's ability to run regular expressions.

Availability

Perl is free software, and can be distributed under either a Artistic License or the GNU General Public License. These are available for virtually all operating systems. These are particularly rife in Unix and Unix-like systems (such as Linux, FreeBSD, and Mac OS X), and is growing inside popularity in Microsoft Windows systems.

Perl has been ported to above the hundred different platforms. Perl potty, by having exclusively captain hicks reported exceptions, become compiled from either source on all Unix-such as, POSIX-compliant or otherwise Unix-compatible platforms, including AmigaOS, BeOS, Cygwin, and Mac OS X. It may be compiled from either source in Windows; however, numbers of Windows installations lack the C compiler, and so Windows users occasionally set up the binary distribution, like [http://www.activestate.com/Products/ActivePerl/ ActivePerl] or even [http://www.indigostar.com/indigoperl.htm IndigoPerl]. The customised port, [http://www.ptf.com/macperl/ MacPerl], is likewise available for Mac OS Classic. [http://www.perl.com/CPAN/ports/]

Language structure

Example Program

Within Perl, a canonical "hello world" program is:

#!/usr/bin/perl -w print "Hello, world!\n";

A number one line is the shebang, which indicates the path to the location of the interpreter in the file patterns. A 2nd line prints a string 'Howdy, globe!' & the newline (like the individual pressing 'Link to' or even 'Enter').

A shebang shown in the above example is average of the unix-like system. In Windows systems, assuming that the perl workable is in the command path, one may have a as punishment shebang line: #!perl A shebang is a usual, but not a lone way of ensuring that a perl interpreter diarrhea the program. An additional way to associate a file by owning a interpreter around Windows would become to associate .pl file types by owning a Perl interpreter, which is automatically liquidate a few installations of Perl.

On this button occurs as a single-line, throw-away Perl program that does ROT13 encoding/decoding. These are entered & begin directly on the command line:

perl -pe 'tr/A-Za-z/N-ZA-Mn-za-m/' < input_file > output_file

Data types

Perl has trine fundamental data types: scalars, lists, and hashes: A scalar occurs as lone value (we.e. the number, string or reference) the listing is an regulated collection of scalars (the variable that holds a listings is known as an array) A hash, or even associative array, is a map from either strings to scalars; a strings come known as keys & a scalars come known as values.

the lot variables come marked by a leading sigil, which identifies a information nature and severity. A equivalent title can be utilized for variables of different types, while forgoing conflict.

$foo # the scalar @foo # the list %foo # the hash

Amounts come written in the common way; strings come enclosed by quotes of various sort.

$n = 42; $name = "joe"; $color = 'red';

The names can be written by list its elements, separated by commas, & enclosed by parentheses in which needed by operator precedence.

@scores = (32, 4Pentad, Xvi, 5);

The hash can be initialized from either the names of key/value pairs.

%favorite = (joe => 'red', sam => 'blue');

Single elements of the names come accessed by providing the numerical stock, within square brackets. Single values within the hash are accessed by providing a corresponding key, within curly braces. The $ sigil identifies a accessed element as a scalar.

$scores[2] # an element of @scores $favorite# the value around %favorite

A total of elements within an array may be found by evalulating the array inside scalar context.

$count = @friends;

There are two or three functions that operate entire hashes.

@list = keys %address; @addresses = values %address;

Control structures

Perl has many sort of control structures. It has prevent-oriented control structures, similar to victims in the C & Java programming languages. Conditions come surrounded by parentheses, & restricted obstructs come surrounded by braces:

label patch ( cond ) label patch ( cond ) label for ( init-expr ; cond-expr ; incr-expr ) label foreach volt-ampere ( names ) label foreach volt-ampere ( listing ) whenever ( cond ) in case ( cond ) in case ( cond )

In which just one statement is existence restricted, statement modifiers provide the lightly syntax:

statement whenever cond ; statement unless cond ; statement patch cond ; statement until cond ; statement foreach listing ;

Short-circuit logical operators come normally wont to consequence control flow at a expression level: expr & expr expr or even expr This is especially utile because Perl treats a flow control keywords go to, run, next & previous when expressions, when several more languages assume the children statements.

Perl as well has deuce inexplicit looping constructs: outcomes = grep list outcomes = map list grep comes back a lot elements of listings for which a restricted prevent evaluates to avowedly. map evaluates a restricted prevent for every element of listing & comes back the listings of the resultant values. These constructs enable the elementary functional programming style.

No switch (multi-way branch) statement within Perl Cinque. a Perl documentation describes a half-pack shipway to achieve the equivalent symptom by applying more control structures, none completely acceptable. The super general & flexible switch statement has been designed for Perl 6. A Switch module makes virtually all of the functionality of the Perl Captain hicks switch available to Perl Phoebe computer software.

Perl includes the goto label statement, however these are virtually never utilized. These are considered unfortunate neglect practise, the implementation is slow, & situations in which a goto is known as for even withwithin more languages either tend does'nt to occur in Perl or come better handled by having more control structures, like tagged loops.

There exists as well the goto &sub statement that performs a tail call. It ends a todays routine & immediately calls a specified sub. Utilize of this form is unfeeling accepted however unusual because these are seldom required.

Subroutines

Subroutines are defined sustaining a sub keyword, & invoked only by naming the two. Function definitions will come out anywhere in the program. Parentheses come involved for calls that precede a definition.

foo(); sub foo foo;

a listings of arguments can be provided when the subprogram title. Arguments can be scalars, lists, or even hashes.

foo $a, @b, %c;

the parameters to a function require non exist when declared as to either total or even nature and severity; as a matter of fact, it will change from either call for for to call. Arrays come expanded to their elements, hashes come expanded to the listings of key/value pairs, & a whole lot is passed into a subprogram when of these uniform listings of scalars.

Whatever arguments come passed come available to the routine in the favorite array @_. A elements of @_ come aliased to the actual arguments; changing an element of @_ changes a corresponding argument.

Elements of @_ can be accessed by subscripting it in the common way.

$_[0], $_[1]

Even so, a sequent code may be hard to understand, & a parameters stand pass-by-information semantics, which can be undesirable.

Of these most common idiom is to assign @_ to the listing of known as variables.

($a, $b, $c) = @_;

This results two mnemotechnical parameter list & pass-by-value sematics. A second idiom is to shift parameters slay of @_. This is especially most common once a subprogram requires just of these argument.

$a = shift;

Procedure might go to values.

go to 42, $x, @y, %z;

In case the subprogram doesn't exit via a go to statement, so it comes back a previous expression evaluated in a procedure immune system. Arrays & hashes in the go to value come expanded to lists of scalars, even as it is for arguments.

A returned expression is evaluated in the career context of the routine; this potty surprise a innocent.

sub listing sub array $a = listing; # is restored 6 - survive element of list $a = array; # comes back Three - total of elements around list @the = names; # is restored (Quaternity, V, Sextet) @the = array; # is restored (Iv, Phoebe, Sextet)

A wantarray keyword might detect a nature and severity of context a work is known as around.

sub either $a = either; # is restored "Oranges" @the = either; # is restored (Unity, Deuce)

Regular expressions

the Perl language includes a specialised syntax for writing regular expressions (REs), and a interpreter contains an engine for matching strings to regular expressions. the regular expression engine utilizes a backtracking algorithm, extending its capabilities from elementary pattern matching to string capture & substitution.

A Perl regular expression syntax was originally taken from either Unix Version 8 regular expressions. Still, it diverged prior to a number 1 release of Perl, & has since grownup to include several additional features.

A m// (match) operator introduces the regular expression match. (A leading m can be omitted for brevity.) In the simplest example, an expression like

$x =~ m/abc/

evaluates to avowedly iff the string $x matches the regular expression abc. Capturing the matched string may be handle surrounding a portion of the regular expression using parentheses & evaluating it inside listings context. This is extra interesting for system that may match multiple strings:

($matched) = $x =~ m/a(.)c/; # capture a character between 'the' & 'c'

A s/// (substitute) operator specifies the look for & replenish operation:

$x =~ s/abc/aBc/; # upcase a b

Perl regular expressions potty require modifiers. Which are actually individual-letter postfix that modify a meaning of the expression:

$x =~ m/abc/i; # experience-insensitive pattern match $x =~ s/abc/aBc/g; # spherical seek & replace

Regular expressions may be heavy & cryptic. This is because regular expression syntax is pleasantly compact, typically applying individual characters or even character pairs to represent its operations. Perl will bring relief from either a condition by owning a /x modifer, which allows computer programmer to place whitespace & comments in regular expressions:

$x =~ m/a # match 'the' . # match any character hundred # match 'c' /x;

1 most common utilize of regular expressions is to specify delimiters for the split operator:

@words = split m/,/, $line; # divide $line into comma-separated values

A split operator complements string capture. String capture is restored strings that match a regular expression, split is restored strings that don't match a RE.

Look at too Perl regular expression examples.

Database interfaces

Perl is widely favorite for database applications. Its text treating facilities come expert for getting SQL interrogation; arrays, hashes & automatic memory management produce it convenient to collect & run a returned information.

Around early versions of Perl, database interfaces were created by relinking the interpreter by using a client-side database library. This was somewhat clumsy; a particular condition was that the resultant perl workable was restricted to applying just the a single database interface that it was linked to. As well, relinking a interpreter was sufficiently hard that it was simply done for two or three of the first & widely utilized databases.

Within Perl Cinque, database interfaces come implemented by Perl DBI modules. A DBI (Database Interface) module presents one, database-independent interface to Perl applications, spell a DBD:: (Database Driver) modules treat a details of accessing occasionally Fifty different databases. There are DBD:: drivers for virtually all ANSI SQL databases.

Language design

A project of Perl may be understood as a response to iii wide trends in the computer industry: falling devices costs, rising labor costs, & forward compiler technology. Several earliest machine-oriented language, like Fortran and C, were designed to make effective have of expensive hardware. Inside direct contrast, Perl is designed to produce effective have of expensive programmer.

Perl has numerous features that ease a coder's project at a expense of greater CPU & memory requirements. These include automatic memory management; dynamic typing; strings, lists, & hashes; regular expressions, and interpreted execution.

Larry Wall was trained as a linguist, & a project of Perl is a lot informed by linguistic information. Examples include Huffman coding (common constructions should became short), serious prevent-weighting (the significant references should come number one), & a big collection of language primitives. Perl favors language constructs that come natural for homo to scan & write, potentially in which it complicate a Perl interpreter.

Perl has features that trend lines the kind of programming paradigms, like procedural, functional, and object-oriented. At a equivalent period, Perl doesn't enforce any particular paradigm, or postulate a computer programmer to pick out among the children.

There is a wide practical bent to each a Perl language & a community & culture that surround it. A prolusion to Programming Perl begins, "Perl is a language for getting your job done". 1 symptom of this is that Perl is non the straighten out language. It includes features in case humans utilise the children, tolerates exceptions to its system, & employs heuristic program to resolve syntactic ambiguities. Discussing a variant behaviour of built-integral functions within names & scalar context, a perlfunc(One) human site says,

In the main, it clean what wise shoppers desire, unless you desire consistency.

Perl has many catchword that convey aspects of its project & utilize. A single is ''There's other than of these way to get it on'' (TMTOWTDI - generally pronounced 'Tim Toady'). A second is Perl: a Swiss Army Chainsaw of Programing language. The declared project goal of Perl is to produce real life tasks easily & hard tasks imaginable. Perl has likewise been known as A Duct Tape of the Internet.

Opinion

Perl engenders hard feelings among two its advocate & its knocker.

Pro

Coder world health organization rather Perl generally cite its power, expressiveness, & ease of utilise. Perl will bring infrastructure for numerous common programming tasks, like string & names processing. More tasks, like memory management, come handled automatically and transparently. Coder from either more languages to Perl often buy that completely classes of problems that it use at times struggled by using in the preceding good don't arise within Perl. When Larry Wall put it,

What is the healthy of Perl? Would it be non the healthy of a wall that people stand stopped up banging their heads against?

Besides its practical rewards, numbers of computer programmer only seem to enjoy working around Perl. Early issues of [http://www.tpj.com The Perl Journal] got the report titled "What is Perl?" that concluded

Perl is fun. Around these times of self-self-seeking jargon, conflicting & unpredictable standards, & proprietary systems that discourage peeking under the hood, humans keep close at hand forgotten that programming is supposed to be fun. We don't mean a satisfaction of seeing my easily-tuned programs launder my bidding, however a literary work of originative writing that yields victims software online. By owning Perl, a journeying is when gratifying when a destination ...

Whatever the reasons, there exists clearly a wide community of humans who come passionate all about Perl, when evidenced per hundreds to thousands of modules that use been contributed to CPAN, & a hundreds of project proposals that were submitted when RFCs for Perl Vi.

Con

The most common complaint is that Perl is horrible. Particularly, its prodigious apply of punctuation put occasionally humans dispatch; Perl source code is for instance compared to "line noise". Around [http://www.paulgraham.com/pypar.html The Python Paradox], Paul Graham both acknowledges and responds to this:

At a mention of horrible source code, population might course believe of Perl. However a superficial ugliness of Perl is non a sort I personally mean. Really ugliness is non harsh-seeking syntax, however with to build software away from a wrongly conception.

A second criticism is that Perl is to a fault complex & compact, & that it leads to "write-only" code, that is, to code that is virtually impossible to know fallowing it has been written. These are, course, imaginable to write obscure code in any language, however Perl has possibly additional than a common part of curt, complex & arcane language constructs to exacerbate a condition. Perl supports numerous such features for backwards compatibility, & for utilize in which maintainability is expressly non the concern, like computer program that come entered & process directly on the command line.

A freewheeling language style that delights a select few Perl coder concerns others. For instance, a Perl Quint object model doesn't enforce information security: access to personal information is restricted single by convention, non a language itself. An object created within a only place might well exist as modified in another; there might not become any single place in which its state is definitively established. There are techniques for addressing these issues, however it is non-native & little utilized.

around the different level, one of the early Unix engineers from either Bell Labs has expressed surprise that anyone can write crucial applications in a language for which no promulgated specification.

Perl, when by having any intepreted language, is non effective at pinching for even-loops or more processor-bound tasks. around addition, computer program typically have extrthe memory than it would whenever written in a compiled language.

Embedding the Perl interpreter within the C program is non when elementary when it may exist as. Calling C-language procedure from either Perl code, via a XS interface, is extraordinarily complex (although a Inline::One hundred extension mostly eleviates this concern).

A few businesses balk at utilizing Perl because it either don't see or even might't abide its licensing terms. A select few worry that it won't exist as breathe to obtain trend lines for it. A few object to the fact that since it's an taken language, a source code for Perl software is typically seeable to users.

History

Larry Wall began operate within Perl in 1987, and freed version Ace.Nought to the comprehensive.sources.misc newsgroup in December 18, 1987. A language expanded quickly on top a next couple of years. Perl Ii, freed within 1988, featured a better regular expression engine. Perl Terzetto, freed inside 1989, added support for binary information.

Until 1991, the just documentation for Perl was one (more and more protracted) human website. Around 1991, Programming Perl (a Camel Book) was published, & became the de facto information for the language. At a equivalent instance, a Perl version total was bumped to Quartet, does'nt to mark a major vary in the language, however to identify the version that was documented per book.

Perl Quaternary went across the series of maintenance releases, culminating inside Perl Little joe.036 around 1993. At that point, Larry Wall abandoned Perl Four to commence operate in Perl Cinque. Perl Foursome remains at version Quartet.036 to this day.

Development of Perl V continued into 1994. A perl5-porters mailing listings was established within May 1994 to coordinate work in porting Perl Cinque to different platforms. It remains a primary forum for development, maintenance, & porting of Perl Quintuplet.

Perl Fin was freed in October 17, 1994. It was the about complete revision of the interpreter, & added several newly features to the language, including objects, information, packages, & modules. Importantly, modules provided a mechanism for extending a language forswearing modifying the interpreter. This allowed a core interpreter to stablize, just as it enabled average Perl computer programmer to add recently language features.

In October 26, 1995, the Comprehensive Perl Archive Network (CPAN) was established. CPAN occurs as collection of site that archive & distribute Perl sources, binary distributions, documentation, scripts, & modules. Originally, from each one CPAN places got to exist as accessed across its have Address; in todays world, a only Address http://www.cpan.org automatically redirects to the CPAN places.

When of 2005, Perl 5 is however existence actively maintained. It at present includes Unicode support. A latest production release is Perl Quintet.Eighter from decatur.Septenary.

At a 2000 Perl Conference Jon Orwant made the pack for a major fresh language initiative. This led to the guide to lead off operate in the redesign of the language, to become known as Perl 6. Proposals for newly language features were solicited from either a Perl community at prominent, & complete 300 RFCs were submitted.

Larry Wall spent the next couple of years swallowing a RFCs & synthesizing the babies into a logical framework for Perl Captain hicks. He has presented his project for Perl Sextet inside the series of documents known as apocalypses.

Around 2001, it was decided that Perl 6 would rerun in the cross-language virtual machine called Parrot. When of 2005, two Perl Sixer & Parrot come under active development.

CPAN

CPAN, the Comprehensive Perl Archive Network, occurs as collection of mirrored site that help as a primary archive & channel for Perl sources, distributions, documentation, scripts, &—especially—modules. These are ordinarily looked by using a look for engine http://search.cpan.org/.

There are presently in top 8,800 modules available on CPAN, contributed by across 2,500 authors. Modules come available for the wide kind of tasks, including advanced math, database connectivity, & networking. In essence all about in CPAN is freely available; great deal of a software system is licensed under either the Artistic License, the GPL, or each. Anyone might upload software system to CPAN via [http://pause.perl.org PAUSE], a Perl Authors Upload Server.

Modules in CPAN may be downloaded & installed by hand. All the same, these are park for modules to depend in more modules, & as punishment module dependencies by hand may be tedious. Each a [http://search.cpan.org/Perldoc?CPAN CPAN.pm] module (involved in a Perl distribution) & the improved [http://search.cpan.org/Perldoc?CPANPLUS CPANPLUS] module offers comm& lines installers that see module dependencies; It may be configured to automatically download & set up the module and, recursively, everthing modules that it takes.

Name
Perl was originally known as "Pearl", when "the pearl of great price" of Matthew 13:46. Larry Wall wanted to give the language a short title using caring connotations & claims he seemed at (& rejected) each 3- & 4-letter word in the lexicon. He possibly thought of naming it fallowing his married woman Gloria. Wall found prior to a language's official release that there was already the programing language known as PEARL and changed the spelling of the title.

A title is usually capitalized (Perl) after on to the language & uncapitalized (perl) whilst on to the interpreter program itself since Unix-prefer filesystems come experience sensitive. (There is a locution in the Perl community: "Only perl can parse Perl.") (Prior to a release of the number 1 edition of Programming Perl it wwhen common to refer to the language as perl; Randal L. Schwartz, however, forced the uppercase language name in the book to make the name stand out better when typeset. A example distinction was afterwards adopted per community.) These are non appropriate to write "PERL" when these are non really an acronym. A spelling of PERL all told caps is so utilized as a shibboleth for detecting community outsiders. But, many backronyms have been suggested, including a humourous Pathologically Eclectic Rubbish Lister. Too, Practical Extraction & Report Language has prevailed within numerous of now's manuals, including a official Perl man page. These are likewise uniform by owning a old title "Pearl": Practical Extraction & Report Language.

The Camel Symbol
Perl is usually symbolized by the camel, which was the symptom of the picture of camel book publishers O'Reilly Media chose as the cover picture of Programming Perl, which consequently acquired the name The Camel Book. O'Reilly owns a symbol as a trademark, however claims to utilise their legal rights simply as a measure of protecting a "integrity and impact of that symbol" [http://perl.oreilly.com/usage/]. Have of the symbol for non-commercial purposes is allowed & the Programming Republic of Perl logotype (view above) is provided for this purpose.

Fun with Perl
When using C, obfuscated code competitions are the popular feature of Perl culture. A annual Obfuscated Perl contest makes an arch virtue of Perl's syntactic flexibility. A as a consequence program prints a text "Just another Perl / Unix hacker", utilizing 32 cooccurring processes coordinated by pipes. The complete explanation is available on the [http://perl.plover.com/obfuscated/ author's Web site].

@P=split//,".URRUU\c8R";@d=split//,"\nrekcah xinU / lreP rehtona tsuJ";sub p%p;hold off until$?;map%p;$_=$d[$q];sleep rand(Ii)if/\S/;print

Similar to obfuscated code however sustaining the different purpose, Perl Poetry is the practice of writing poems that potty actually exist as compiled by perl. This hobby is some unique to Perl due to the heavy total of regular English words utilized in the language. Recently verse form come regularly published in the Perl Monks site's [http://www.perlmonks.org/index.pl?node=Perl%20Poetry Perl Poetry] section.

An additional popular interest is Perl golf game. When using the physical sport the goal is to reduce the total of strokes that it requires to complete the particular objective, however on text "strokes" refers to keystrokes like than swings of the golf game club. The project, like "scan an input string and return the longest palindrome that it contains", is proposed & participants try to outdo both more by writing solutions that expect fewer and fewer characters of Perl source code.

A second tradition among Perl hackers is writing JAPHs, which are short obfuscated computer software that print out a sentence "Just another Perl hacker,". A "canonical" JAPH includes a comma at a prevent, although this is typically omitted, & numbers of variants on the theme keep close at hand been created (lesson: [http://www.perlmonks.org/index.pl?node_id=292135], which prints "Just Another Perl Pirate!").

Of these interesting Perl module is Tongue::Romana::Perligata. This module translates a source code of a script that utilizes it from either Latinside into Perl, permitting the software engineer to write feasible computer software in Latin.

A Perl community has placed aside a "Acme" namespace for even modules that are fun or experimental around nature and severity. A select few of the Acme modules come deliberately implemented inside amusing ways. A select few examples: [http://search.cpan.org/dist/Acme-Hello/ Acme::Hello] simplifies the run of writing a "Hello, World!" program [http://search.cpan.org/dist/Acme-Currency/ Acme::Currency] allows wise shoppers to vary a "$" prefix for scalar variables to another character [http://search.cpan.org/dist/Acme-ProgressBar/ Acme::ProgressBar] is the dreadfully ineffective way to show progress for a task [http://search.cpan.org/dist/Acme-VerySign/ Acme::VerySign] satirizes a widely-criticized VeriSign Site Finder service [http://search.cpan.org/~dconway/Acme-Don-t-1.01/t.pm Acme::Don't] implements a logical opposite of the wash keyword—don't, which doesn't execute a provided prevent.

View also [http://wikibooks.org/wiki/Programming:Perl_humour Perl humour on wikibooks] [http://www.cmpe.boun.edu.tr/~kosar/other/lwall.html Larry Wall quotes] [http://search.cpan.org/perldoc?Lingua::Romana::Perligata Lingua::Romana::Perligata - Write Perl in Latin!] [http://www.perlmonks.org/index.pl?node_id=253797 A tutorial on Perligata] [http://www.softpanorama.org/Bulletin/Humor/humor092.html Perl Purity Test]

Advanced Perl Programming
Covers complex techniques for managing production-ready Perl programs.

Learning Perl on Win32 Systems
Leading Perl trainers and a Windows NT practitioner teach you to program in Perl.

Mastering Regular Expressions
Author Jeffrey Friedl leads you through the steps of crafting a regular expression that gets the job done.

Tips and Tricks for Perl Programmers
A comprehensive collection of problems, solutions, and practical examples for anyone programming in Perl.

The Perl CD Bookshelf
Six bestselling O'Reilly Animal Guides are now available on CD-ROM.

Perl in a Nutshell
The perfect companion for working programmers, and a comprehensive reference guide to the world of Perl.

Perl Resource Kit -- UNIX Edition
Gives you the most comprehensive collection of Perl documentation and commercially enhanced software tools available today.

Perl Resource Kit -- Win32 Edition
An essential tool for Perl programmers who are expanding their platform expertise to include Win32.

Perl for System Administration
Explores the pockets of administration where Perl can be most useful, including filesystem management, user administration, directory services, database administration, log files, and security and network monitoring.

Perl/Tk Pocket Reference
Handy reference book describes every Perl/Tk graphical element.


Computers: Programming: Languages: Perl






© 2005 GeneralAnswers.org