perl

Dictionary



  • Wikipedia


    Perl, (also backronymed as Practical Extraction and Report Language, see #Namebelow) is an interpreted procedural programming language designed by Larry Wall. Perl has a unique set of features, some borrowed from C programming languageC, others from Unix shellshell scripting (Bourne shellsh), awk, sed, and (to a lesser extent) many other programming languages (even Lisp programming languageLisp).TOCleft

    Overview - The perlintro(1) 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 programmingobject-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 - The overall structure of Perl derives broadly from C programming languageC. Perl is a procedural programming language, with variables, expressions, assignment statements, brace-delimited code blocks, control structures, and subroutines.Perl also takes features from Operating system shellshell programming. Perl programs were originally Interpreter (computing)interpreted (although now they're run by a virtual machine). All variables are marked with leading Sigil (computer programming)sigils. Sigils unambiguously identify variable names, allowing Perl to have a rich syntax. Importantly, sigils allow variables to be interpolated directly into strings. Like the Unix shells, Perl has many built-in functions for common tasks, like sorting, and for accessing system facilities.Perl takes associative arrays (known as 'hashes' in newer versions of perl) from awk and regular expressions from sed. These simplify and facilitate all manner of parsing, text handling, and data management tasks.In Perl 5, features were added that support complex data structures, first-class functions (i.e. Closure (computer science)closures as values), and an object-oriented programming model. These include reference (computer science)references, packages, and class-based method dispatch. Perl 5 also saw the introduction of lexically scoped variables, which make it easier to write robust code, and modules, which make it practical to write and distribute libraries of Perl code.All versions of Perl do automatic data typing and memory management. The interpreter knows the type and storage requirements of every data object in the program; it allocates and frees storage for them as necessary. Legal type conversions are done automatically at run time; illegal type conversions are fatal errors.

    Applications - Perl has many applications. It has been used since the early days of the Web to write Common Gateway InterfaceCGI scripts, and is an integral component of the popular LAMP (software bundle)LAMP (Linux / Apache HTTP ServerApache / MySQL / (Perl / PHP / Python programming languagePython)) platform for web development. Perl has been called "the glue that holds the web together". Large projects written in Perl include Slashdot and early implementations of PHP php.net and UseModWiki, the wiki software used in Wikipedia (until 2002).Perl is often used as a "glue language", tying together systems and interfaces that were not specifically designed to interoperate. Systems administrators use Perl as an all-purpose tool; short Perl programs can be entered and run on a single command line.Perl is widely used in finance and bioinformatics, where it is valued for rapid application development, ability to handle large data sets, and the availability of many standard and 3rd-party modules.Perl is also popular because of its ability to process regular expressions; the extended suite of perl's regex vocabulary is known (outside of perl) as 'perlre'.

    Implementation - Perl is implemented as a core interpreter, written in C, together with a large collection of modules, written in Perl and C. The source distribution is, as of 2005, 12 megabyteMB when packaged in a Tar (file format)tar file and data compressioncompressed. The interpreter is 150,000 lines of C code and compiles to a 1 MB executable on typical machine architectures. Alternately, the interpreter can be compiled to a link library and embedded in other programs. There are nearly 500 modules in the distribution, comprising 200,000 lines of Perl and an additional 350,000 lines of C code. Much of the C code in the modules consists of character encoding tables.The interpreter has an object-oriented architecture. All the elements of the Perl language—scalars, arrays, hashes, coderefs, file handles—are represented in the interpreter by C structs. Operations on these structs are defined by a large collection of macros, typedefs and functions; these constitute the Perl C API. The Perl API can be bewildering to the uninitiated, but its entry points follow a consistent naming scheme, which provides guidance to those who use it.The execution of a Perl program divides broadly into two phases: compile-time and run-time. At compile time, the interpreter parses the program text into a syntax tree. At run time, it executes the program by walking the tree. The text is parsed only once, and the syntax tree is subject to optimization before it is executed, so the execution phase is relatively efficient. Compile-time optimizations on the syntax tree include constant folding, context propagation, and Peephole optimizerpeephole optimization.Perl has a context-free Formal grammargrammar; however, it cannot be parsed by a straight Lex/Yacc lexer/parser combination. Instead, it implements its own lexer, which coordinates with a modified GNU bison parser to resolve ambiguities in the language. It is said that "only perl can parse Perl", meaning that only the Perl interpreter can parse the Perl language. The truth of this is attested to by the persistent imperfections of other programs that undertake to parse Perl, such as source code analyzers and auto-indenters.Maintenance of the Perl interpreter has become increasingly difficult over the years. The code base has been in continuous development since 1994. The code has been optimized for performance at the expense of simplicity, clarity, and strong internal interfaces. New features have been added, yet virtually complete backwards compatibility with earlier versions is maintained. The size and complexity of the interpreter is a barrier to developers who wish to work on it.Perl is distributed with some 90,000 functional tests. These run as part of the normal build process, and extensively exercise the interpreter and its core modules. Perl developers rely on the functional tests to ensure that changes to the interpreter do not introduce bugs; conversely, Perl users who see the interpreter pass its functional tests on their system can have a high degree of confidence that it is working properly.There is no written specification or standard for the Perl language, and no plans to create one for the current version of Perl. There has only ever been one implementation of the interpreter. That interpreter, together with its functional tests, stands as a de facto specification of the language.

    Availability - Perl is Free software movementFree software, and cross-licensed under the Artistic License and the GNU General Public License. It is available for most Operating systemoperating systems. It is particularly prevalent on Unix and Unix-like systems (such as Linux, FreeBSD, and Mac OS X), and is growing in popularity on Microsoft Windows systems.Perl has been ported to over a hundred different platforms. Perl can, with only six reported exceptions, be compiled from Source codesource on all Unix-like, POSIX-compliant or otherwise Unix-compatible platforms, including AmigaOS, BeOS, Cygwin, and Mac OS X. It can be compiled from source on Microsoft WindowsWindows; however, many Windows installations lack a C compiler, so Windows users typically install a binary distribution, such as activestate.com - ActivePerl or indigostar.com - IndigoPerl. A custom port, ptf.com - MacPerl, is also available for Mac OSMac OS Classic. perl.com

    Language structure -

    Example Program - In Perl, the canonical "Hello world" program is: !# !/usr/bin/perl? -w print "Hello, world!\n";The first line is the shebang, which indicates the path to the location of the interpreter in the file system. The second line prints the string 'Hello, world!' and a newline (like a person pressing 'Return' or 'Enter').The shebang shown in the above example is typical of a unix-like system. On Microsoft WindowsWindows systems, assuming that the perl executable is in the path (computing)command path, one could use the following shebang line: !# !perlThe? shebang is the most common, but not the only way of ensuring that the perl interpreter runs the program. Another way to associate the file with the interpreter in Windows would be to associate .pl file types with the Perl interpreter, which is automatically done in some installations of Perl.Here is a one-line, throw-away Perl program that does ROT13 encoding/decoding.It is entered and run directly on the command line: perl -pe 'tr/A-Za-z/N-ZA-Mn-za-m/' < input_file > output_file

    Data types - Perl has three fundamental data types: scalars, Arraylists, and Hash tablehashes:
  • A scalar is a single value (i.e. a number, String (computer science)string or Reference (computer science)reference)
  • A list is an ordered collection of scalars (a variable that holds a list is called an ''array'')
  • A hash, or associative array, is a map from strings to scalars; the strings are called ''keys'' and the scalars are called ''values''.All variables are marked by a leading Sigil (computer programming)sigil,which identifies the data type. The same name may be used for variables of different types, without conflict. $foo # a scalar @foo # a list %foo # a hashNumbers are written in the usual way; strings are enclosed by quotes of various kinds. $n = 42; $name = "joe"; $color = 'red';A list may be written by listing its elements, separated by commas, and enclosed by parentheses where required by operator precedence. @scores = (32, 45, 16, 5);A hash may be initialized from a list of key/value pairs. %favorite = (joe => 'red', sam => 'blue');Individual elements of a list are accessed by providing a numericalindex, in square brackets. Individual values in a hash areaccessed by providing the corresponding key, in curly braces. The$ sigil identifies the accessed element as a scalar. $scores2 # an element of @scores $favorite # a value in %favoriteThe number of elements in an array can be obtained by evalulating thearray in scalar context. $count = @friends;There are a few functions that operate on entire hashes. @names = keys %address; @addresses = values %address;

    Control structures - mainPerl control structures Perl has several kinds of control structures. It has block-oriented control structures, similar to those in the C and Java programming languageJava programming languages. Conditions are surrounded by parentheses, and controlled blocks are surrounded by braces: ''label'' while ( ''cond'' ) ''label'' while ( ''cond'' ) continue ''label'' for ( ''init-expr'' ; ''cond-expr'' ; ''incr-expr'' ) ''label'' foreach ''var'' ( ''list'' ) ''label'' foreach ''var'' ( ''list'' ) continue if ( ''cond'' ) if ( ''cond'' ) else if ( ''cond'' ) elsif ( ''cond'' ) else Where only a single statement is being controlled, statement modifiers provide a lighter syntax: ''statement'' if ''cond'' ; ''statement'' unless ''cond'' ; ''statement'' while ''cond'' ; ''statement'' until ''cond'' ; ''statement'' foreach ''list'' ;Short-circuit logical operators are commonly used to effect control flow at the expression level: ''expr'' and ''expr'' ''expr'' or ''expr''This is especially useful because Perl treats the flow control keywords return, redo, next and last as expressions, while many other languages consider them statements.Perl also has two implicit looping constructs: ''results'' = grep ''list'' ''results'' = map !''list''grepmap evaluates the controlled block for each element of ''list'' and returns a list of the resulting values. These constructs enable a simple functional programming style.There is no switch (multi-way branch) statement in Perl 5. The Perl documentation describes a half-dozen ways to achieve the same effect by using other control structures, none entirely satisfactory.A very general and flexible switch statement has been designed for Perl 6. The Switch module makes most of the functionality of the Perl 6 switch available to Perl 5 programs.Perl includes a goto ''label'' statement, but it is virtually never used. It is considered poor coding practise, the implementation is slow, and situations where a goto is called for in other languages either tend not to occur in Perl or are better handled with other control structures, such as labeled loops.There is also a goto &''sub'' statement that performs a tail call.It terminates the current subroutine and immediately calls the specified ''sub''. Use of this form is culturally accepted but unusual because it is rarely needed.

    Subroutines - Subroutines are defined with the sub keyword,and invoked simply by naming them.Subroutine definitions may appear anywhere in the program.Parentheses are required for calls that precede the definition. foo(); sub foo foo;A list of arguments may be provided after the subroutine name.Arguments may be scalars, lists, or hashes. foo $a, @b, %c;The parameters to a subroutine need not be declared as to either number or type; in fact, they may vary from call to call.Arrays are expanded to their elements, hashes are expanded to a list of key/value pairs, and the whole lot is passed into the subroutine as one undifferentiated list of scalars.Whatever arguments are passed are available to the subroutine in the special array @_.The elements of @_ are aliased to the actual arguments;changing an element of @_ changes the corresponding argument.Elements of @_ may be accessed by subscripting it in the usual way. $_0, $_1However, the resulting code can be difficult to read,and the parameters have pass-by-reference semantics, which may be undesirable.One common idiom is to assign @_ to a list of named variables. ($a, $b, $c) = @_;This effects both mnemonic parameter names and pass-by-value sematics.Another idiom is to shift parameters off of @_.This is especially common when the subroutine takes only one argument. $a = shift;Subroutines may return values. return 42, $x, @y, %z;If the subroutine does not exit via a return statement,then it returns the last expression evaluated within the subroutine body. Arrays and hashes in the return value are expanded to lists of scalars, just as they are for arguments.The returned expression is evaluated in the calling context of the subroutine; this can surprise the unwary. sub list sub array $a = list; # returns 6 - last element of list $a = array; # returns 3 - number of elements in list @a = list; # returns (4, 5, 6) @a = array; # returns (4, 5, 6)The wantarray keyword can detect the type of context the function is called in. sub either $a = either; # returns "Oranges" @a = either; # returns (1, 2)

    Regular expressions - seealsoPerl regular expression examples The Perl language includes a specialized syntax for writing regular expressions (REs), and the interpreter contains an engine for matching strings to regular expressions. The regular expression engine uses a backtracking algorithm, extending its capabilities from simple pattern matching to string capture and substitution.The Perl regular expression syntax was originally taken from Unix Version 8 regular expressions. However, it diverged before the first release of Perl, and has since grown to include many more features.The m// (match) operator introduces a regular expression match. (The leading m may be omitted for brevity.) In the simplest case, an expression like $x =~ m/abc/evaluates to true if and only if the string $x matches the regular expression abc. Capturing a matched string can be done by surrounding part of the regular expression with parentheses and evaluating it in list context. This is more interesting for patterns that can match multiple strings: ($matched) = $x =~ m/a(.)c/; # capture the character between 'a' and 'c'The s/// (substitute) operator specifies a search and replace operation: $x =~ s/abc/aBc/; # upcase the bPerl regular expressions can take ''modifiers''. These are single-letter suffixes that modify the meaning of the expression: $x =~ m/abc/i; # case-insensitive pattern match $x =~ s/abc/aBc/g; # global search and replaceRegular expressions can be dense and cryptic. This is because regular expression syntax is extremely compact, generally using single characters or character pairs to represent its operations. Perl provides relief from the problem with the /x modifer, which allows programmers to place whitespace and comments ''inside'' regular expressions: $x =~ m/a # match 'a' . # match any character c # match 'c' /x;One common use of regular expressions is to specify delimiters for the split operator: @words = split m/,/, $line; # divide $line into comma-separated valuesThe split operator complements string capture. String capture returns strings that match the regular expression, split returns strings that don't match the RE.

    Database interfaces - Perl is widely favored for database applications. Its text handling facilities are good for generating SQL queries; arrays, hashes and automatic memory management make it easy to collect and process the returned data.In early versions of Perl, database interfaces were created by relinking the interpreter with a client-side database library. This was somewhat clumsy; a particular problem was that the resulting perl executable was restricted to using just the one database interface that it was linked to. Also, relinking the interpreter was sufficiently difficult that it was only done for a few of the most important and widely used databases.In Perl 5, database interfaces are implemented by Perl DBI modules. The DBI (Database Interface) module presents a single, database-independent interface to Perl applications, while the DBD:: (Database Driver) modules handle the details of accessing some 50 different databases. There are DBD:: drivers for most ANSI SQL databases.

    Language design - 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, were designed 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 programmer's task at the expense of greater CPU and memory requirements. These include automatic memory management; dynamic typing; strings, lists, and hashes; regular expressions, and interpreted execution.Larry 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 syntax reflect 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 regex's have different standard delimiters. This approach can be contrasted with languages like Lisp programming languageLisp, where the same S-expression construct and basic syntax is used for many different purposes.Perl favors language constructs that are natural for humans to read and write, even where they complicate the Perl interpreter. Perl has features that support a variety of programming paradigms, such as Procedural programmingprocedural, Functional programmingfunctional, and object-oriented. At the same time, Perl does not enforce any particular paradigm, 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 features if people use them, tolerates exceptions to its rules, and employs heuristics to resolve syntactical ambiguities.Discussing the variant behaviour of built-in functions in list and scalar context, the perlfunc(1) man page says,
    In general, they do what you want, unless you want !consistency.
    Opinion - Perl engenders strong feelings among both its proponents and itsdetractors.

    Pro - Programmers who like Perl typically cite its power, expressiveness,and ease of use. Perl provides infrastructure for many commonprogramming tasks, such as string and list processing. Other tasks,such as memory management, are handled automatically andtransparently. Programmers coming from other languages to Perl oftenfind that whole classes of problems that they have struggled with in the past just don't arise in Perl. As Larry Wall put it,
    What is the sound of Perl? Is it not the sound of a wall that people have stopped banging their heads !against?
    Bes ides? its practical benefits, many programmers simply seem to enjoy working in Perl. Early issues of tpj.com - The Perl Journal had a page titled "What is Perl?" that concluded
    Perl is fun. In these days of self-serving jargon, conflicting and unpredictable standards, and proprietary systems that discourage peeking under the hood, people have forgotten that programming is supposed to be fun. I don't mean the satisfaction of seeing our well-tuned programs do our bidding, but the literary act of creative writing that yields those programs. With Perl, the journey is as enjoyable as the destination ...
    Whatever the reasons, there is clearly a broad community of people whoare passionate about Perl, as evidenced by the thousands of modulesthat have been contributed to CPAN, and the hundreds of design proposals that were submitted as RFCs for Perl 6.

    Con - A common complaint is that Perl is ugly. In particular, its prodigious use of punctuation put some people off; Perl source code is sometimes likened to "line noise". In paulgraham.com - The Python Paradox, Paul Graham both acknowledges and responds to this:
    At the mention of ugly source code, people will of course think ofPerl. But the superficial ugliness of Perl is not the sort I mean.Real ugliness is not harsh-looking syntax, but having to buildprograms out of the wrong !concepts.
    An other? criticism is that Perl is excessively complex and compact, and that it leads to "write-only" code, that is, to code that is virtually impossible to understand after it has been written. It is, of course, possible to write obscure code in any language, but Perl has perhaps more than the usual share of terse, complex and arcane language constructs to exacerbate the problem. Perl supports many such features for backwards compatibility, and for use where maintainability is expressly not a concern, such as programs that are entered and run directly on the command line.The freewheeling language style that delights some Perl programmers concerns and dismays others. For example, the Perl 5 object model does not enforce data security: access to private data is restricted only by convention, not the language itself. An object created in one place may easily be modified in another; there may not be any single place where its state is definitively established. There are techniques for addressing these issues, but they are non-native and little used. (The designers of Perl 6 intend to address these issues.)On a different level, one of the early Unix engineers from Bell Labs has expressed surprise that anyone could write important applications in a language for which there is no published specification. However, a published specification wouldn't be a very good way to spend scarce technical resources since there aren't multiple implementations of the Perl language, as it happens with C or C plus plusC++. Perl, as with any scripting language, is not efficient at CPU boundprocessor-bound tasks. Additionally, programs often use more memory than they would if written in a traditional language (such as C or C++).Embedding a Perl interpreter in a C program is not as simple as it might be. Calling C-language subroutines from Perl code, via the XS (Perl)XS interface, is inordinately complex.Some businesses balk at using Perl because they either don't understand or can't abide its licensing terms. Some worry that they won't be able to obtain support for it. Some object to the fact that the source code for Perl programs is generally visible to users (an advantage/disadvantage common to most interpreted languages).

    History - Larry Wall began work on Perl in 1987, and released version 1.0 to the comp.sources.misc newsgroup on December 18, 1987. The language expanded rapidly over the next few years. Perl 2, released in 1988, featured a better regular expression engine. Perl 3, released in 1989, added support for binary data.Until 1991, the only documentation for Perl was a single (increasingly lengthy) Unix manualman page. In 1991, Programming Perl (the Camel Book) was published, and became the de facto reference for the language. At the same time, the Perl version number was bumped to 4, not to mark a major change in the language, but to identify the version that was documented by the book.Perl 4 went through a series of maintenance releases, culminating in Perl 4.036 in 1993. At that point, Larry Wall abandoned Perl 4 to begin work on Perl 5. Perl 4 remains at version 4.036 to this day.Development of Perl 5 continued into 1994. The perl5-porters mailing list was established in May 1994 to coordinate work on porting Perl 5 to different platforms. It remains the primary forum for development, maintenance, and porting of Perl 5.Perl 5 was released on October 17, 1994. It was a nearly complete rewrite of the interpreter, and added many new features to the language, including objects, references, packages, and modules. Importantly, modules provided a mechanism for extending the language without modifying the interpreter. This allowed the core interpreter to stablize, even as it enabled ordinary Perl programmers to add new language features.On October 26, 1995, the Comprehensive Perl Archive Network (CPAN) was established. CPAN is a collection of web sites that archive and distribute Perl sources, binary distributions, documentation, scripts, and modules. Originally, each CPAN site had to be accessed through its own URL; today, the single URL cpan.org - http://www.cpan.org automatically redirects to a CPAN site.As of 2005, Perl 5 is still being actively maintained. It now includes Unicode support. The latest stable release is Perl 5.8.7.At the 2000 Perl Conference, Jon Orwant made a case for a major new language initiative. This led to a decision to begin work on a redesign of the language, to be called Perl 6. Proposals for new language features were solicited from the Perl community at large, and over 300 RFCs were submitted.Larry Wall spent the next few years digesting the RFCs and synthesizing them into a coherent framework for Perl 6. He has presented his design for Perl 6 in a series of documents called Apocalypse (perl)apocalypses.In 2001, it was decided that Perl 6 would run on a cross-language virtual machine called Parrot virtual machineParrot. As of 2005, both Perl 6 and Parrot are still under active development.

    CPAN - mainCPAN CPAN, the Comprehensive Perl Archive Network, is a collection of mirrored web sites that serve as a primary archive and distribution channel for Perl sources, distributions, documentation, scripts, !and—especially—mod ules.? It is commonly browsed with the search engine search.cpan.org - http://search.cpan.org/.There are currently over 8,800 modules available on CPAN, contributed by over 2,500 authors. Modules are available for a wide variety of tasks, including advanced mathematics, database connectivity, and networking. Essentially everything on CPAN is freely available; much of the software is licensed under either the Artistic License, the GPL, or both. Anyone can upload software to CPAN via pause.perl.org - PAUSE, the Perl Authors Upload Server.Modules on CPAN can be downloaded and installed by hand. However, it is common for modules to depend on other modules, and following module dependencies by hand can be tedious. Both the search.cpan.org - CPAN.pm module (included in the Perl distribution) and the improved search.cpan.org - CPANPLUS module offers command lines installers that understand module dependencies; They can be configured to automatically download and install a module and, recursively, all modules that it requires.

    Name - Perl was originally named "Pearl", after "the pearl of great price" of Gospel of MatthewMatthew 13:46. Larry Wall wanted to give the language a short name with positive connotations and claims he looked at (and rejected) every three- and four-letter word in the dictionary. He even thought of naming it after his wife Gloria. Wall discovered before the language's official release that there was already a programming language named PEARL programming languagePEARL and changed the spelling of the name.The name is normally capitalized (''Perl'') when referring to the language and uncapitalized (''perl'') when referring to the interpreter program itself since Unix-like filesystems are case sensitive. (There is a saying in the Perl community: "Only perl can parse Perl.") (Before the release of the first edition of Programming Perl it was 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. The case distinction was subsequently adopted by the community.) It is not appropriate to write "PERL" as it is not really an acronym. The spelling of ''PERL'' in all caps is therefore used as a Shibboleth#Modern usageshibboleth for detecting community outsiders.However, several backronyms have been suggested, including the humorous ''Pathologically Eclectic Rubbish Lister''.Also, ''Practical Extraction and Report Language'' has prevailed in many of today's manuals, including the official Perl man page. It is also consistent with the old name "Pearl": ''Practical Extraction And Report Language''.

    The Camel Symbol - Perl is generally symbolized by a camel, which was a result of the picture chosen by camel book publishers O'Reilly Media as the cover picture of ''Programming Perl'', which consequently acquired the name ''The Camel Book''. O'Reilly owns the symbol as a trademark, but claims to use their legal rights only as a measure of protecting the ''"integrity and impact of that symbol"'' perl.oreilly.com. Use of the symbol for non-commercial purposes is allowed and a ''Programming Republic of Perl'' logo (see above) is provided for this purpose.

    Fun with Perl - As with C, obfuscated code competitions are a popular feature of Perl culture. The annual Obfuscated Perl contest makes an arch virtue of Perl's syntaxsyntactic flexibility. The following program prints the text "Just another Perl / Unix hacker", using 32 concurrent processes coordinated by pipes. A complete explanation is available on the perl.plover.com - author's Web site. !@P=split//,".URRUU\c8R&qu ot;;@d=split//,"\nrekcah? xinU / lreP rehtona tsuJ";sub p !=(P,P);pipe"r$p",&qu ot;u$p";++$p;($q*=2)+=$f= !fork;map? )&6;$p =/ !^$P/ix?$P:close$_}keys%p}p;p;p ;p;p;map? =~/^P./&& close$_}%p;wait until$?;map %p;$_=$d$q;sleep !rand(2)if/\S/;printSimilar? to obfuscated code but with a different purpose, Perl Poetry is the practice of writing poems that can actually be compiled by perl. This hobby is more or less unique to Perl due to the large number of regular English words used in the language. New poems are regularly published in the Perl Monks site's perlmonks.org - Perl Poetry section.Another popular pastime is Perl golf. As with Golfthe physical sport the goal is to reduce the number of strokes that it takes to complete a particular objective, but here "strokes" refers to keystrokes rather than swings of a golf club. A task, such as "scan an input string and return the longest palindrome that it contains", is proposed and participants try to outdo each other by writing solutions that require fewer and fewer characters of Perl source code.Another tradition among Perl hackers is writing JAPHs, which are short obfuscated programs that print out the phrase "Just another Perl hacker,". The "canonical" JAPH includes the comma at the end, although this is often omitted, and many variants on the theme have been created (example: perlmonks.org, which prints "Just Another Perl Pirate!").One interesting Perl module is Lingua::Romana::Perligata. This module translates the source code of a script that uses it from Latin into Perl, allowing the programmer to write executable programs in Latin.The Perl community has set aside the "Acme" namespace for modules that are fun or experimental in nature. Some of the Acme modules are deliberately implemented in amusing ways. Some examples:
  • search.cpan.org - Acme::Hello simplifies the process of writing a "Hello, World!" program
  • search.cpan.org - Acme::Currency allows you to change the "$" prefix for scalar variables to some other character
  • search.cpan.org - Acme::ProgressBar is a horribly inefficient way to indicate progress for a task
  • search.cpan.org - Acme::VerySign satirizes the widely-criticized VeriSign Site Finder service
  • search.cpan.org - Acme::Don't implements the logical opposite of the do !keyword—don't& lt;/tt>,? which does not execute the provided block.

    See also -
  • CPAN
  • Just another Perl hacker
  • Larry Wall
  • Obfuscated Perl contest
  • Perl Object EnvironmentPOE- the Perl Object Environment
  • Perl 6

    External links -
  • perl.org - Perl.org – The Perl Directory
  • perl.com - Perl.com – Perl on O'Reilly Network
  • perldoc.perl.org - Perldoc at Perl.org – online Perl documentation

    User groups -
  • pm.org - Perl Mongers – local user groups in cities worldwide
  • perlmonks.org - PerlMonks – an active and popular online user group and discussion forum
  • use.perl.org - use Perl; – Perl news and community discussion

    Distributions -
  • cpan.org - CPAN – Comprehensive Perl Archive Network, Perl source distribution
  • activestate.com - ActiveState ActivePerl – Perl for Microsoft Windows platforms
  • indigostar.com - IndigoPerl – another distribution of Perl for Microsoft Windows
  • cygwin.com - Cygwin also distributes Perl on Windows

    Development -
  • dev.perl.org - Perl 5 development
  • dev.perl.org - Perl 6 development
  • parrotcode.org - Parrot virtual machine
  • poniecode.org - Project Ponie – Perl 5 running on top of Parrot
  • pugscode.org - Pugs – Perl 6 running on top of Haskell

    History -
  • groups.google.com - First reference to "Perl" on Usenet
  • dev.perl.org - The origin of Perl – "Stability. Speed. Simplicity. perl1 is here."
  • history.perl.org - The Perl Timeline

    Humor -
  • wikibooks.org - Perl humour on Wikibooks
  • ? cmpe.boun.edu.tr - Larry Wall quotes
  • search.cpan.org - Lingua::Romana::Perligata - Write Perl in Latin!
  • perlmonks.org - A tutorial on Perligata
  • softpanorama.org - Perl Purity Test

    Miscellaneous -
  • dmoz.org - Perl related websites in the Open Directory Project
  • theperlreview.com - The Perl Review - print magazine about Perl
  • tpj.com - The Perl Journal online only magazine about Perl
  • books.perl.org - Perl Book reviews
  • perlcast.com - Perlcast - Perl Podcast
  • perl.com - Ten Perl Myths - O'Reilly
  • !fortunes.quotationsbook.com - Perl fortunes collected from Larry Wall message identifiers

    References -

    Books - book :See also List of Perl books''The Perl Foundation keeps a list of books available covering Perl on http://books.perl.org/. Some notable books are:
  • Programming Perl (also known as the ''Camel book'')
  • Perl Cookbook
  • Learning Perl (also called the ''Llama book'')
  • techbooksforfree.com - A collection of other free Perl books
  • computer-books.us - Computer-Books.us - A collection of Perl books available for free download.

    Perl man pages - The Perl man pages are included in the Perl cpan.org - source distribution. They are available on the web from http://perldoc.perl.org/. Some good starting points may be:
  • perldoc.perl.org - perlintro- a brief introduction and overview of Perl
  • perldoc.perl.org - perlsyn- Perl syntax
  • perldoc.perl.org - perlre- Perl regular expressions
  • perldoc.perl.org - perl5''xy''delta- what is new for perl v5.''x''.''y''

    Web pages -
  • history.perl.org - The Timeline of Perl and its Culture v3.0_0505
  • nntp.perl.org - Transcription of Larry's talkMajor programming languages small Category:Perl*Category:Curly bracket programming languagesCategory:Free softwareCategory:.NET programming languagesCategory:Procedural programming languagesCategory:Scripting !languagesCategory:Text-oriente d? programming languagesCategory:Programming !languagesbg:Perlca:Perlcs:Perl da:Perlde:Perlet:Perles:Perleo :Perl? (programlingvo)fr:Perl !(langage)ko:펄hr:Perlid:Perli t:Perlhe:Perllt:Perllb:Perl? (Programméiersprooch)hu:Perl programozási !nyelvnl:Perlja:Perlno:Perlpl:P erlpt:Perlru:Перл? (язык !программировани я)sl:Perlsr:Perlfi:Perlsv:Per ltr:Perlzh:Perl
  • Websites


    live collection concert agerncy
    all on site ==www.koncertagency.com show--programms of 40 nations of the world!!! from moscow
    http://www.koncertagency.com/

    Europerl
    The first European company specializing in the Perl language. Training, consulting and software development delivered by the original authors of <a href=http://tangram.utsl.gen.nz/>Tangram</a>
    http://www.europerl.be/

    Web Development
    Internet solutions company providing Internet Marketing Consultancy, E-Commerce Applications, Legacy System Integration and Web Site Design
    http://jamtopia.co.uk/

    Planet Software, Florida, USA
    A software outsourcing partner of Arcadia, Inc.
    http://www.planet-software.com/

    Anaksimandros' hut
    Perl, Moomin, and computer articles.
    http://www.nihira.jp/

    Hosting Ireland .ie
    irish web hosting and domain registration services
    http://www.hostingireland.ie/

    Moist Pixels
    Established and industry leader for adult and escort sites. Web design, development, content managers, marketing and mobile phone sites.
    http://www.moistpixels.com/

    A1 ITT DIgital Strategist
    A1 ITT offers a complete range of services for your Company to realize and introduce its business in Internet
    http://www.a1itt.net

    Website, Database and Online Application Development Services
    York Instructional Services is a Sacramento based web site development company specializing in web site marketing and management and e-commerce solutions.
    http://www.yorkinstructionalservices.com/

    Bad Arolsen Smart-Graphics GbR - Webdesign, Webhosting, Beratung
    Wir entwickeln professionelle, auf Sie zugeschnittene, innovative Internetauftritte und andere Arten der digitalen und analogen Publikation zu einem attraktiven Preis.
    http://www.smart-gfx.de/

    Corsi Linux
    Con i nostri corsi di formazione accresciamo ogni giorno le vostre competenze per rendervi sempre più capaci e indipendenti
    http://www.corsi-linux.com/

    Integrio Systems - custom software development & offshore outsourcing
    Custom software development & programming in Vancouver, Canada. Web site design and hosting. Offshore outsourcing facilities in Ukraine.
    http://www.integrio.net/

    web and design
    German Agency for webdesign, usability, SEO, SEM.
    http://www.dsgn.de/

    Interface Web Design Site Design Hosting Services Search Engine Optomization
    Interface Web Design, located in the Tampa Bay Area on Florida's West Coast. We specialize in Web Site Design for small to medium-sized busineses.
    http://www.interfacewebdesign.com/

    TTY Internet Solutions BV
    TTY Internet Solutions offers a combination of creative and technical skills and experience to enable you to turn the web into an active source of new business and a responsive channel for service to your clients and partners. We provide a portfolio of web design, systems development, infrastructure, online marketing and website management services to give you a full range of options in the creation, development, deployment and administration of your marketing websites, intranet, extranet services, online shops and e-commerce services. Our products and services are based on the leading technology platforms to ensure that your content management system, hosting and security will provide a flexible and extensible foundation for additional or enhanced services in the future.
    http://www.tty.nl/

    A1 ITT DIgital Strategist
    A1 ITT offers a complete range of services for your Company to realize and introduce its business in Internet
    http://www.a1itt.com/default.htm

    apathy inc.
    Web site design and programming. XHTML, CSS, PHP, Perl, JavaScript. We do it all and we do it hot.
    http://www.apathyinc.com/

    Tangra, Inc. - The art of software design and development
    Tangra, Inc. is a software design and development firm specializing in design, architecture, development, and implementation of custom Web and Windows applications, database design, database migration/integration, database performance tuning and enhancement, Web and graphic design, and custom software solutions.
    http://www.tangrainc.com/

    JoDees Webhosting
    JoDees Webhosting, the web host built with your business in mind. all accounts are backed by a 30 day money back satisfaction guarantee.
    http://www.jodeewebhosting.com/

    Sound Object Logic
    We specialize in object-oriented programming, e-learning and web technologies. We are the original authors of Tangram, a popular object-relational mapping tool.
    http://www.soundobjectlogic.com/

    -= servers.hu - professzionális internet megoldások
    A servers.hu oldalain található: Magyar tárhely szolgáltatás, webdesign, perl cgi scriptek futtatása, web, internet, host, hosting service, A legjobb szolgáltatások a lehető legjobb áron! Tárhely szolgáltatások /web, php, email,mysql,.../ Domain szolgáltatások /regisztráció, fenntartás, stb./ E-mail szolgáltatások /levelezőlista, virtuális email, hírlevél/ Server szolgáltatások /felkészítés, elhelyezés, Linux CD-k/ Minden szolgáltatásunk megrendelhető kedvező, havi fizetéssel, illetve éves fizetéssel is. Rendeljen akár azonnal, online rendszerünk segítségével! Úgy érzi, túl magasak a havi díjak? Szeretné, ha válogathatna a lehetőségek közül, vagy komplett megoldást keres? Tekintse meg ajánlatunkat!
    http://www.servers.hu/

    BeforeSunrise Internetagentur e.K. Riedstadt Webhosting, Webdesign, Joomla! CMS, Datenbanken, E-Mail
    BeforeSunrise Internetagentur e.K. in Riedstadt - Zur besten Zeit für Sie - Webseiten für Aufgeweckte von Ausgeschlafenen
    http://www.doggabyte.de/

    zappo :: [Agentur für Kommunikation]
    Von Konzeption über Gestaltung, von Produktion bis Mediaservice, von Webdesign bis Webpublishing - zappo ist bereit, sich den Herausforderungen der Kunden zu stellen.
    http://www.zappo-berlin.de/

    Mor Damla Internet Software
    Internet software developing company
    http://www.mordamla.com

    Ariamedia
    Ariamedia is a strategic E-Business solutions provider located in Dallas, Texas. Through a multi-disciplinary approach, we create complex solutions leveraging powerful creative design, application development, and our suite of Conductor E-Business Products.
    http://www.ariamedia.com

    A1 ITT Digital Strategist
    A1 ITT Digital Strategist & Concept Design Management
    http://www.a1itt.it/

    LMCSOFT
    Solution on demand! We provide project-specialized applications to our customers. With the availablitiy of MDA and MDSD we are much faster in the realization process than other software companies.
    http://www.lmcsoft.com/

    Simply4you.it: Informatica e Programmazione
    Simply4you.it - Informatica & Programmazione : visual basic, vb, active server pages , ASP, java, javscript, c, c++, SQL, database, oracle, Perl, CGI, Delphi, PHP, Free source code
    http://www.simply4you.it

    Linksrus Web Promotion
    Articles for your website on the technology sector in addition to Technology news.
    http://www.linksrus.net/

    NET1 Svetainių talpinimas
    Svetainių talpinimas, interneto vardų registravimas.
    http://www.net1.lt/

    Perl.Com
    The official Perl home page, run by O'Reilly. Contains documentation, news, and links to a variety of resources.
    http://www.perl.com/

    The Perl Institute
    Non-profit organization dedicated to making the incredibly useful Perl language even more useful for everyone. Supports Perl creators, developers, maintainers, and users. Recently disbanded, and is being incorporated into the Perl Mongers.
    http://www.perl.org/

    CPAN
    The Comprehensive Perl Archive Network, the gateway to all things Perl. The canonical location for Perl code and modules.
    http://www.cpan.org/

    ActiveState's PythonDirect
    Enterprise-class support contracts for Python.
    http://www.activestate.com/

    Personal tools
    • DirPedia.com
    • - combining a dictionary, an encyclopedia and a web directory