PERL - meaning of word
Rozmiar: 8938 bajtów


PERL



#REDIRECT Perl

Perl



Perl, also Practical Extraction and Report Language (a backronym, see #Name), is an interpreted procedural programming language designed by Larry Wall. Perl borrows features from C programming language, Unix shell scripting (Bourne shell), awk, sed, and (to a lesser extent) many other programming languages. == Overview == The perlintro(1) man page says
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 === The overall structure of Perl derives broadly from C programming language. 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 shell programming. Perl programs are Interpreter (computing). All variables are marked with leading Sigil_(computer_programming)s. Sigils unambiguously identify variable names, thus 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 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 and an object oriented programming model. These include reference_(computer_programming)s, 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. It is not possible, within the language, to leak memory, crash the interpreter, or corrupt its internal data representation. === Applications === Perl has many and varied applications. Perl has been used since the early days of the web to write Common Gateway Interface scripts, and is a component of the popular LAMP (Linux/Apache HTTP Server/MySQL/(Perl/PHP/Python programming language)) platform for web development. Perl has been called "the glue that holds the web together". Large systems written in Perl include Slashdot and early implementations of PHP [http://www.php.net/history] and Wikipedia. Perl finds many applications 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. === 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 currently 12 megabyte when packaged in a Tar (file format) and data compression. 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 uninitiate; however, 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. First, the interpreter parses the program text into a syntax tree. Then, 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. Perl has a context-free formal grammar; however, it cannot be parsed by a straight Yacc/Lex parser/lexer 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 by the 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 interperter 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. 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 movement, and may be distributed under either the Artistic License or the GNU General Public License. It is available for most operating system. 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 code 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 Windows; however, many Windows installations lack a C compiler, so Windows users typically install a binary distribution, such as [http://www.activestate.com/Products/ActivePerl/ ActivePerl] or [http://www.indigostar.com/indigoperl.htm IndigoPerl]. A custom port, [http://www.ptf.com/macperl/ MacPerl], is also available for Mac OS. [http://www.perl.com/CPAN/ports/] == Language structure == === Data types === Perl has three fundamental data types: scalars, array, and hash table. A scalar is a single value; it may be a number, a String (computer science), or a Reference (computer science). 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), 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 hash Numbers 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 numerical index, in square brackets. Individual values in a hash are accessed by providing the corresponding key, in curly braces. The $ sigil identifies the accessed element as a scalar. $scores[2] # an element of @scores $favorite{joe} # a value in %favorite The number of elements in an array can be obtained by evalulating the array in scalar context. $count = @friends; There are a few functions that operate on entire hashes. @names = keys %address; @addresses = values %address; === Control structures === Perl has several kinds of control structures. It has block-oriented control structures, similar to those in the C programming language and Java programming language 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'' Perl has two implicit looping constructs. ''results'' = grep { ... } ''list'' ''results'' = map { ... } ''list'' grep returns all elements of ''list'' for which the controlled block evaulates to true. map 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 form, 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 definion. 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], $_[1] However, 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 { (4, 5, 6) } sub array { @a = (4, 5, 6); @a } $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) === Regular expressions === The Perl language includes a specialized syntax for writing regular expressions (REs), and the interpreter contains an engine for matching strings to REs. The RE engine uses a backtracking algorithm; this extends 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 iff the string $x matches the regular expression abc. To capture a matched string, surround the part of the RE that you want with parentheses and evaluate 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 b Perl 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 replace Perl regular expressions can be dense and cryptic. Partly, this is because regular expression matching is an inherently complex operation, and partly it is because the RE syntax is extremely compact. Some relief from the second problem is afforded by 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 values The split operator complements string capture. String capture returns strings that match the RE; split returns strings that don't match the RE. See also Perl regular expression examples === 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 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 natural response to three broad trends in the computer industry: falling hardware costs, rising labor costs, and advancing compiler technology. Earlier computer languages, such as Fortran and C_programming_language, 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 data typing and memory management; 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 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 programming, functional programming, and Object Oriented Programming. 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" [http://www.unix.org.ua/orelly/perl/prog3/ch00_01.htm]. 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.
Perl has several mottos that convey aspects of its design and use. One is ''There's more than one way to do it'' (TMTOWTDI - usually pronounced 'Tim Toady'). Another is ''Perl: the Swiss Army Chainsaw of Programming Languages''. A stated design goal of Perl is to make easy tasks easy and difficult tasks possible. == Opinion == Perl engenders strong feelings among both its proponents and its detractors. === Pro === Programmers who like Perl typically cite its power, expressiveness, and ease of use. Perl provides infrastructure for many common programming tasks, such as string and list processing. Other tasks, such as memory management, are handled automatically and transparently. Programmers coming from other languages to Perl often find 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?
Besides its practical benefits, many programmers simply seem to enjoy working in Perl. Early issues of [http://www.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 who are passionate about Perl, as evidenced by the thousands of modules that have been contributed to CPAN, and the hundreds of design proposals that were submitted as RFCs for Perl 6. === Con === People who dislike Perl voice a variety of objections, some substantive and some less so. One common complaint is that Perl is ugly. In particular, its prodigious use of punctuation seems to put people off; Perl source code is sometimes likened to "line noise". In [http://www.paulgraham.com/pypar.html The Python Paradox], Paul Graham both acknowledges and responds to this:
At the mention of ugly source code, people will of course think of Perl. But the superficial ugliness of Perl is not the sort I mean. Real ugliness is not harsh-looking syntax, but having to build programs out of the wrong concepts.
Another 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 others. For example, Perl has a relatively weak object model. 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 complex and seldom used. 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. Some worry that Perl is licensed under terms that are incompatible with commercial use. However, Perl is used successfully by many businesses, so this would seem to be either ignorance or FUD. Some worry that Perl uses too much RAM or CPU. In fact, Perl is not a good language for applications that are truly processor-bound; however, there are many, many others for which it is perfectly adequate. == 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) man 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 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 production 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)s. In 2001, it was decided that Perl 6 would run on a cross-language virtual machine called Parrot virtual machine. As of 2005, both Perl 6 and Parrot are under active development. == CPAN == [http://www.cpan.org CPAN] is the Comprehensive Perl Archive Network. It is a collection of mirrored web sites that serve as a primary archive and distribution channel for Perl sources, distributions, documentation, scripts, and—especially—modules. 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 [http://pause.perl.org PAUSE], the Perl Authors Upload Server. There are currently over 7,000 modules available on CPAN, contributed by nearly 4,000 authors. Modules are available for a wide variety of tasks, including advanced mathematics, database connectivity, and networking. 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. The CPAN.pm module understands module dependencies; it can be configured to automatically download and install a module and, recursively, all modules that it requires. == Code samples == 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 interpreter for Unix-like operating systems. (It is the most common, but not the only way of ensuring that the perl interpreter runs the program.) The second line prints the string 'Hello world' and a newline (like a person pressing 'Return' or 'Enter'). Here is a one-line, throw-away perl program that does rot-13 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 ==Name== Perl was originally named "Pearl", after "the pearl of great price" of Gospel of Matthew 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. Before the language's official release, Wall discovered that there was already a programming language named Pearl programming language, 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.") It is not appropriate to write "PERL" as it is not really an acronym, although several backronyms have been suggested, including the humorous ''Pathologically Eclectic Rubbish Lister''. ''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''. == Fun with Perl == In common with C programming language, obfuscated code competitions are a popular feature of Perl culture. The annual Obfuscated Perl contest makes an arch virtue of Perl's syntax 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 [http://perl.plover.com/obfuscated/ author's Web site]. @P=split//,".URRUU\c8R";@d=split//,"\nrekcah xinU / lreP rehtona tsuJ";sub p{ @p{"r$p","u$p"}=(P,P);pipe"r$p","u$p";++$p;($q*=2)+=$f=!fork;map{$P=$P[$f^ord ($p{$_})&6];$p{$_}=/ ^$P/ix?$P:close$_}keys%p}p;p;p;p;p;map{$p{$_}=~/^[P.]/&& close$_}%p;wait until$?;map{/^r/&&<$_>}%p;$_=$d[$q];sleep rand(2)if/\S/;print Similar 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 [http://www.perlmonks.org/index.pl?node=Perl%20Poetry Perl Poetry] section. Another popular pastime is Perl golf. As with golf, the objective 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: [http://www.perlmonks.org/index.pl?node_id=292135], 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: * [http://search.cpan.org/dist/Acme-Hello/ Acme::Hello] simplifies the process of writing a "Hello, World!" program * [http://search.cpan.org/dist/Acme-Currency/ Acme::Currency] allows you to change the "$" prefix for scalar variables to some other character * [http://search.cpan.org/dist/Acme-ProgressBar/ Acme::ProgressBar] is a horribly inefficient way to indicate progress for a task * [http://search.cpan.org/dist/Acme-VerySign/ Acme::VerySign] satirizes the widely-criticized Verisign SiteFinder service * [http://search.cpan.org/~dconway/Acme-Don-t-1.01/t.pm Acme::Don't] implements the logical opposite of the do keyword—don't, which does not execute the provided block. See 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] == See also == * CPAN * Just another Perl hacker * Larry Wall * Obfuscated Perl contest * POE -- Perl Object Environment * Perl 6 ==External links== *[http://www.perl.org/ Perl.org] – The Perl Directory *[http://www.perl.com/ Perl.com] – Perl on O'Reilly Network *[http://perldoc.perl.org/ Perldoc at Perl.org] – online Perl documentation ===User groups=== *[http://www.pm.org/ Perl Mongers] – local user groups in cities worldwide *[http://www.perlmonks.org/ PerlMonks] – an active and popular online user group and discussion forum *[http://use.perl.org/ use Perl;] – Perl news and community discussion ===Distributions=== *[http://www.cpan.org/ CPAN] – Comprehensive Perl Archive Network, Perl source distribution *[http://www.activestate.com/ ActiveState] – Perl for Microsoft Windows platforms *[http://www.indigostar.com/indigoperl.htm IndigoPerl] – another distribution of Perl for Microsoft Windows ===Development=== *[http://dev.perl.org/perl5/ Perl 5 development] *[http://dev.perl.org/perl6/ Perl 6 development] *[http://www.parrotcode.org/ Parrot virtual machine] *[http://www.poniecode.org/ Project Ponie] – Perl 5 running on top of Parrot *[http://www.pugscode.org/ Pugs] – Perl 6 running on top of Haskell ===History=== *[http://groups.google.com/groups?selm=4628%40sdcrdcf.UUCP First reference to "Perl" on Usenet] *[http://dev.perl.org/perl1/ The origin of Perl] – "Stability. Speed. Simplicity. perl1 is here." *[http://history.perl.org/PerlTimeline.html The Perl Timeline] ===Miscellaneous=== *[http://dmoz.org/Computers/Programming/Languages/Perl/ Perl related websites] in the Open Directory Project *[http://www.theperlreview.com The Perl Review] - print magazine about Perl *[http://www.tpj.com/ The Perl Journal] online only magazine about Perl *[http://books.perl.org/ Perl Book reviews] *[http://perlcast.com Perlcast] - Perl Podcast ==Books== *Programming Perl (also known as the ''Camel book'') *Perl Cookbook *Learning Perl (also called the ''Llama book'') ==References== ===Perl man pages=== The Perl man pages are included in the Perl [http://www.cpan.org/src/stable.tar.gz source distribution]. They have no "official" location on the web, but are often available at the sites listed above under #External links * perlintro - a brief introduction and overview of Perl * perlsyn - Perl syntax * perlre - Perl regular expressions * perl5''xy''delta - what is new for perl v5.''x''.''y'' ===Web pages=== * [http://history.perl.org/PerlTimeline.html The Timeline of Perl and its Culture v3.0_0505] * [http://www.linux-mag.com/1999-10/uncultured_01.html Uncultured Perl: a Subversive Lifecycle] * [http://www.unix.org.ua/orelly/perl/prog3/ch27_01.htm Programming Perl, Chapter 27. Perl Culture] * [http://www.nntp.perl.org/group/perl.perl6.meta/424 Transcription of Larry's talk] Perl Curly bracket programming languages Free software .NET programming languages Procedural programming languages Scripting languages Text-oriented programming languages Programming languages

Perl



== Book Reviews == I just removed a link to http://xahlee.org/UnixResource_dir/perlr.html as the page it links to is a) very out of date, b) rather badly written and c) extremely critical of Perl. I've replaced it with a link to http://books.perl.org/ User:Davorg 14:30, 15 Mar 2005 (UTC) The link to http://xahlee.org/UnixResource_dir/perlr.html has returned, this time under a ===criticism=== sub-heading. However, the page has many problems * The page is badly written. Partly, this is because english is not the author's native language. If this were a page on Wikipedia, we could bring the text up to standard, but it is an external page, so we can't. * The author clearly doesn't like Perl, but he doesn't say why, or support his position with argument, evidence, or references. * The author uses invective freely against people and things that he doesn't like. This is neither useful nor informative. * There are a half-dozen capsule reviews of Perl books, with pictures of the covers. This might be worth linking to; however, on personal knowledge I dispute some of the assertions in the reviews. Again, since this is an external page, we don't have any mechanism for vetting or correcting its content. * There are links to 4 "essays" on the same site. Like the main page, they are marked by strong opinion, insults, and an almost complete lack of argument or evidence. * There are links to a half-dozen outside pages. Some are on perl.com, which is already linked from the Wikipedia Perl page. Others are of only tangential relevance to Perl. I'm all for giving the reader links to relevant material, but I don't think a link to this page should remain, even marked as "criticism". User:Swmcd 20:51, 2005 Mar 26 (UTC) :I agree. There is some insight on the page, but it takes too much work on the part of the reader to extract it. Or to put it another way, the page sucks :-) --User:Yath 23:22, 26 Mar 2005 (UTC) ::I vote for just removing it again. User:Davorg 09:44, 27 Mar 2005 (UTC) :::I came to the discussion page here intending to make the very same point (that the link to Xah Lee's perl critique should be removed). Even as criticism, its information content is really low. I'm going ahead and removing it again. Oh, except someone already did. Yay. User:John Callender 17:46, 26 May 2005 (UTC) == A sample Perl program == # A sample Perl program $message = "Hello, world! The magic number is 234542354."; print $message; $message =~ s/d+/-1/; print $message; exit 0 ---- :The above program can be written as: $_ = "The magic number is 150\n"; print; s/\d+/-1/; print; :which demonstrates the idea of topic ($_) in Perl. Also, the exit 0 at the end is completely redundant. (See: :pl:Perl) User:Rfl 07:01, 7 Aug 2004 (UTC) :A version showing slightly more powerful regex, err, power in Perl: $_ = "The magic number is 150\n"; print; s/ (\d+) / $1 * 2 /ex; print; :Quite a nice example. User:Rfl 07:11, 7 Aug 2004 (UTC) ---- You're saying that it shows "high use of meaningful punctuation characters" ? You've never seen any REAL perl code :). What about using this (uppercase input) as an example: while(<>) { $_=~y/a-z/A-Z/; print; } --:Taw ---- Even better would be a line noise winner from one of the obfuscated perl contests, if that code is public domain. :-) But that would miss the point - we want to show real Perl code, not one that was deliberately obfuscated. --:Taw ---- I feel this entry should shy away from obfuscated code entirely! It just helps encourage the FUD that Perl is unreadable/write only/whatever, and that's a biased opinion. I can write incredibly obfuscated Java, but no-one feels the need to be posting that on the Java page. It tarnishes the neutral tone of the entry. I'd go as far as to remove the example (it's a bit pointless anyhow, what exactly is it demonstrating? I could come up with far more interesting examples of punctuation character usage, so that can't be it). Anway, as an aside, you do realize you can get rid of the $_ in your code?: while(<>) { tr/a-z/A-Z/; print; } Any books that tell you otherwise, burn 'em! Finally there's the succinct: print uc while (<>); ... and I'll be surprised if there's anything more readable for the same task in any other popular language, assuming you've bothered to learn at least the rudiments of Perl, that is. -- User:Derek Or better yet: print uc while <>; Even more clean and readable. One only has to say: uc is upper-case and the diamond is input. Great example. User:Rfl 07:04, 7 Aug 2004 (UTC) == ''Perl programming language''? == Why is this at ''Perl programming language''? Is there any reason for the disambiguation? Perl is just a redirect. --User:Eloquence 14:02 Jan 20, 2003 (UTC) : For consistency in naming. It was decided some time ago that human languages would be suffixed "language" and computer languages would be suffixed "programming language". It's got nothing to do with disambiguation. If you are going to move all these computer language pages, make sure that you check the What links here for double redirects which you may have introduced and fix them -- User:Derek Ross 16:30 Jan 24, 2003 (UTC) :: Yeah, I found out by now. We have changed this policy, also for languages (e.g. Sanskrit). Don't worry about double redirs, I will take care of those. --User:Eloquence 16:33 Jan 24, 2003 (UTC) ::: I agree with the term "programming language". However, I've noticed lots of [older] references to this class of language which call them "computer languages". I don't really agree with the latter term, since they are really just human languages used to program computers. A minor point. As to appending "programming language" to the official titles, I think that's a good idea... the single example of Java (island) vs. Java programming language should suffice to convince most people. 2 cents. --User:Patrick Corcoran ::::Java is a case of disambiguation, see Wikipedia:Disambiguation. Perl is not. --User:Eloquence 16:46 Jan 24, 2003 (UTC) ::Oh, great. The naming policy changed and I never even saw the discussion, never mind took part in it. For the record I don't agree with the change and I find it annoying that it took place without any of my input. -- User:Derek Ross 16:42 Jan 24, 2003 (UTC) ::: See the interlanguage links on Perl. Everyone else is doing the right thing already. --User:Eloquence 16:46 Jan 24, 2003 (UTC) == [Pp]erl == See [http://www.perldoc.com/perl5.8.0/pod/perlfaq1.html http://www.perldoc.com/perl5.8.0/pod/perlfaq1.html], under "What's the difference between Perl and perl?". [Pp]erl is not and has never been an acronym. -- User:Nknight 23:36 Mar 6, 2003 (UTC) It would seem, though, that the Perl documentation is self-contradictory in this regard, since [http://www.perldoc.com/perl5.8.0/pod/perl.html#NAME http://www.perldoc.com/perl5.8.0/pod/perl.html#NAME] says "perl - Practical Extraction and Report Language," which is how Larry Wall is supposed to have gotten the name for the language in the first place. -- User:HarmonicSphere 04:53 Aug 31, 2003 (UTC) But if it was Practical Extraction and Report Language, the language name should be PEARL, not Perl. (Note: All caps, an `A'.) In fact, that was its original name until Larry found another language named PEARL (or Pearl). So it went to Perl, and the acronym no longer makes sense. :Like what anon user (above) says, pearl (now perl) started off as an acronym and Larry Wall had to change the name in order to avoid clash with another language with the same name. :The old expansion would still apply to perl as words like "and" are usually excluded from an acronym. However, Wall, the jovial person that he is, came up with the new acronym "Pathologically Eclectic Rubbish Lister" to match the new name. However I feel that these events and the link given by Nknight above should not be interpreted to mean that perl is no longer an acronym but a backronym. (refer interview with Larry Wall and the question ".. How'd you come up with that name?" http://www.linuxjournal.com/article.php?sid=3394 ) User:Jay 08:32, 3 Mar 2004 (UTC) ::Hi, folks; perl never was an acronym. If it was, then Larry himself is lying. Anyone who's been in perl long enough to read the FAQ knows the story, and I've never heard anyone who's actually read the story claim that it's not true. Most everyone who claims perl was originally an acronym is much further removed than those who know the truth. ::Incidentally, I corrected the famous quip, "Nothing but perl can parse Perl," from Tom Christiansen. The source on this is [http://www.perldoc.com/perl5.8.0/pod/perlfaq1.html the FAQ]. User:Jdavidb 15:55, 8 Mar 2004 (UTC) ::: Full Ack regarding the Perl FAQ. According to it, Perl is only Backronym to ''Practical Extraction and Report Language''. ::: But (and I noticed this just in this moment) if you look at http://history.perl.org/PerlTimeline.html under 1987, the (said to be) first man page shows exactly that acronym. Perl History also talks about 18th of December 1987, release date of Perl 1.000. ::: But in fact the first occurence of Perl at all was in May 1987, see http://use.perl.org/articles/03/12/15/0326207.shtml?tid=1. The therein mentioned Usenet posting can be found at http://groups.google.com/groups?selm=4628%40sdcrdcf.UUCP. The posting mentions that at that date, Perl is already 3 months old. ::: I'll put the Usenet posting and the Perl History Timeline into the article as external links, so the details of what is true and what is not can be discussed before any decisions regarding the article's content are made. :-) --User:XTaran 23:07, 11 Mar 2004 (UTC) Blame me for the initial-cap spelling of Perl for the language. When we were writing the first Camel book, the lowercase version of "perl" kept disappearing into the text. So I discussed with Larry, and we decided together that "perl" would represent the interpreter (and be in constant-width font as a result), and "Perl" would represent the language. And no, "PERL" was never valid. -- User:RandalSchwartz ===Name=== "''"Perl" was originally named "pearl", after the "pearl of great price" of Matthew 13:46''" What is the reference to this information ? User:Jay 14:44, 6 Mar 2004 (UTC) :[http://www.wired.com/wired/archive/8.10/cruise.html?pg=3 This] seems to be the source, with a little bit of [http://groups.google.com/groups?q=%22pearl+of+great+price%22+perl+wall&hl=en&lr=&ie=UTF-8&oe=UTF-8&selm=1995Nov3.231257.6290%40netlabs.com&rnum=1 this] thrown in for seasoning. User:Chocolateboy 17:38, 6 Mar 2004 (UTC) ==Regular Expressions with Perl Examples== "===Regular Expressions with Perl Examples===" is used in a novel way in this article. I'd have reserved that markup for section headings. - User:Bevo 03:20, 2 Mar 2004 (UTC) == Perl - Practical Extraction and Report Language == The manpage for Perl begins with: NAME perl - Practical Extraction and Report Language This article suggests that "Practical Extraction and Report Language" is deprecated and "was intended humorously". I see no evidence that this is the case. I intend to move "Practical Extraction and Report Language" into the intro and remove the presumably false statement if there are no objections.--User:EloquenceUser:Eloquence/CP 02:24, Apr 13, 2004 (UTC) :I have strong objections, because Perl is not an acronym. The etymology of the name is very clear and would be widely known if people weren't so desirous of ignorance. All one has to do is read chapter 27 of the 3rd edition of the camel book, or google around a bit. The name of the language was originally to be "Pearl", before Larry heard of another language known as "PEARL". He removed a letter and all was well in the world. "Practical Extraction and Report Language" is a post-facto rationalization. Perl is not an acronym. -- User:Nknight 06:53, 13 Apr 2004 (UTC) :: It doesn't matter if it is a "post-facto rationalization". We are not an etymological guide and the history of the name is only of marginal interest to most readers. If this is the way the word Perl is resolved in manuals today, then it should be prominently mentioned, not falsely claimed to be "intended humorously". I can agree to include the fact that Perl was ''technically'' not intended to be an acronym, but it is also a fact that it is today widely used as one, including by the makers of Perl.--User:EloquenceUser:Eloquence/CP 06:57, Apr 13, 2004 (UTC) :::Feel free to remove any discussion about the name itself, but I will strongly oppose any attempt to define Perl as an acronym of "Practical Extraction and Report Language", as it is simply false, as anyone that has done substantive research on the subject will tell you. -- User:Nknight 07:06, 13 Apr 2004 (UTC) ::::That's just plain silly in a case where the official documentation uses the term as an acronym, but I can agree to label it a backronym if that makes you happy.--User:EloquenceUser:Eloquence/CP 07:15, Apr 13, 2004 (UTC) :::Etymological information is of encylopedic value, so don't remove anything of it. User:Eloquence can refer the discussions above under sections "[Pp]erl" and "Name" and take inputs from it. User:Jay 10:32, 13 Apr 2004 (UTC) == Explanation of for/foreach Syntax == I understand that this isn't supposed to be an exhaustive explanation of Perl syntax, but for/foreach are much more flexible and useful than this suggests. At the very least, I suggest replacing the "foreach ( array )" with "foreach ( LIST )", which is more accurate. (fish_at_uc_org) : I just noticed the same thing and fixed it. --User:Diberri | User talk:Diberri 17:17, Aug 16, 2004 (UTC) ::Technically, ARRAY is more accurate. If you give a literal list, it's first copied/aliased into an array, then the array is walked. -- User:RandalSchwartz ::: After I read your post, I immediately reverted my change (thus replacing ''list'' with ''array''). But I'm not sure that was the right thing to do, and I don't believe you were even suggesting such a reversion. (Namely because foreach( ''array'' ) would disallow useful constructs like foreach( qw/foo bar baz/ ) and even foreach( foo() ), which Perl obviously allows.) So I've reverted my original reversion; the article now uses foreach( ''list'' ). --User:Diberri | User talk:Diberri 06:40, Aug 23, 2004 (UTC) :::: Yeah, list is more appropriate and I believe Perl does copy the contents of the list given in a foreach context. -- User:Sundar 10:06, Aug 23, 2004 (UTC) ::: As I understand it, that part of the article is trying to explain the ''syntax'' of for, so the internals of the implementation, and the copying to a temporary array, are irrelevant. Syntactically, the target of the for is a list, not an array. Compare this with the target of pop or tie, which ''is'' syntactically an array. -- User:Dominus 13:44, 23 Aug 2004 (UTC) :::: I agree. The array copy is an implementation detail. User:PhilHibbs 09:03, 24 Aug 2004 (UTC) ::::: It is undoubtedly an implementation detail, but nevertheless quite an important one affecting the code meaning, so the list-like syntax notwithstanding, maybe it should be stated that in fact for iterates over an array, not a list: ::::: @a=(1..10); for (@a) {@a=(); print} # prints only 1 ::::: User:Rfl 18:07, 24 Aug 2004 (UTC) :::::: Saying that perl expects a LIST at that point doesn't imply that an array is being flattened into a LIST, does it? An array is still a LIST. (fish_at_uc_org) :::::: You make a good point, but I'm not sure this article (or any article on a programming language) should get into such minutiae. Since arrays are lists, but not vice versa, foreach( ''list'' ) should be used because 1) it's correct, even considering minute details, and 2) it's simpler than saying foreach( ''array'' ) and then having to qualify it. --User:Diberri | User talk:Diberri 00:55, Sep 15, 2004 (UTC) == Sample code formatting == Regarding User:Ævar Arnfjörð Bjarmason's changes to the code formatting (using instead of
), I think I prefer the look that the stylesheet imparts to 
 blocks. --User:Yath 23:26, 15 Aug 2004 (UTC)

== Logo sugegstion ==

[http://www.perl.com perl.com logo]

[http://www.perl.com perl.com logo]
Would the <div> code above be acceptable as an alternative to the bare image link, given the copyright restriction on the image (which I have expressed concerns about on the Image_talk:Programming-republic-of-perl.gif)? :No need for explicit DIV, just use the WikiImage code (as I have done). HTH HAND --User:Phil Boswell | User talk:Phil Boswell 13:24, Aug 20, 2004 (UTC) ::OK, I was trying to avoid the frame, but I guess that's in keeping with the rest of the 'pedia. In fact, I think it's better to have the frame, as it makes it clear that we are not using it as an approval stamp.User:PhilHibbs 13:35, 20 Aug 2004 (UTC) ==Merits and demerits of Perl as a programming language== Here's some text I removed, from a section named "Merits and demerits of Perl as a programming language": :Like all programming languages, perl does some things well, and other things, well, less than efficiently. Many programmers have come to terms with this and use a judicious mix of shell-script and perl to get around the more obvious deficiencies (date manipulation can be slow in terms of relative processing time, for example). On the upside, perl is very useful for low level file manipulation at which, in many respects, its performance is often comparable with e.g. sed. I'm sure a section like ==Tasks for which Perl is unsuited== could be useful and informative, but the above paragraph has no redeeming qualities. Allow me to nitpick. *''a judicious mix of shell-script and perl to get around the more obvious deficiencies'' -- Perl replaces and exceeds sh in nearly every capacity. When perl falls short, you either switch languages or call a utility, but the instances in which that utility would be sh are vanishingly rare. *''date manipulation can be slow in terms of relative processing time, for example'' -- perhaps this is a rare example of when sh is better than Perl? If you can demonstrate this, I won't object to it being reinserted into the article. *''perl is very useful for low level file manipulation'' -- This is too vague. By "low level file manipulation", do you mean manipulating links and permissions, or something even lower? Perl is ok for fiddling with links and permissions, I guess, but as a strength, it's no big deal. For lower-level operations... well, you'll have to clarify if that's what you meant. *''at which, in many respects, its performance is often comparable with e.g. sed.'' sed? Perhaps you meant ''data'' manipulation. This is one of the foundations of Perl and is well covered elsewhere in the article. --User:Yath 08:01, 14 Sep 2004 (UTC) : Yeah, I agree with User:Yath -- User:Sundar 08:12, Sep 14, 2004 (UTC) :I also agree. There's a lot of be said about Perl's failings and deficiencies (see [http://www.perl.com/pub/a/1999/11/sins.html Sins of Perl Revisited], for example) but I don't think this is it. -- User:Dominus 13:14, 14 Sep 2004 (UTC) ==Web hosting advertisements== I am removing a link to a list of Web hosting advertisements ("[http://www.webmaster.org/webhosting/plans/perl.htm Webmaster.org: Perl Web Hosting Plans] - List of companies offering perl in their web hosting plans.") added to Perl#External links by Special:Contributions/69.158.155.131 whose every single edit was adding links to similar lists in other articles. User:Rfl 09:41, 14 Nov 2004 (UTC) == Data types and Variables == With all the Perl hackers around, we have an article on Perl that does not explain, or even do more than mention in passing, Perl data types and variables. The word data only appears as part of "database", "type" doesn't appear at all, and "variable" only appears in a misdescription of function ''parameters''. I've half a mind to submit this article for deletion, if this is all there is to show after three years. --User:Tony Sidaway 11:30, 26 Nov 2004 (UTC) : Are you kidding? If incompleteness was grounds for deletion, Wikipedia would dissolve. :-) Sure, the article needs work. So WP:BB! For now, I've added a brief bit on built-in data types ($scalars, @arrays, and %hashes), but there's lots of room for improvement. Why don't you take a stab at it? --User:Diberri | User talk:Diberri 09:18, Nov 27, 2004 (UTC) I don't think adding yet more of the same is going to make this into an encyclopedia article. I think it would probably make more sense to wikify the perldoc files (see User:Tony_Sidaway/Projects/man_perl/man_perl for an example based on Perl 5.6.1, with an example of a link to man perlbook) and reserve the main Perl article for a brief language summary as is the case with languages like Fortran, Lisp programming language and so on. --User:Tony_Sidaway__User_talk:Tony_Sidaway#Page_Footer_">User:Tony Sidaway|User:Tony Sidaway User talk:Tony Sidaway#Page_Footer 17:27, 27 Nov 2004 (UTC) : I'm not sure I understand what you mean bo "adding yet more of the same". If you mean that the existing article is a bit too low-level (e.g. the regular expression section needs more commentary and fewer examples, IMO) and that the built-in data types section I added is similarly too low-level, then I might agree. But I'm not sure that a brief summary would suffice. Wiki is not paper, so I don't think we need to be overly concise. Examples are good, as demonstrated by Lisp programming language. --User:Diberri | User talk:Diberri 19:44, Nov 27, 2004 (UTC) Someone coming to Perl should be able to find out what he or she needs to know. The type of language it is, what people use it for, what it looks like, in general terms the kinds of facilities it provides to the user, the design considerations of the language, and its history. What is there would probably be all right if it were more concise and (above all) accurate. The section on subroutines, for instance, erroneously refers to "Variables passed to a subroutine"--an error that could be forgiven in a first year Computer Science student, but is not to be expected in an encyclopedia. I think I'll continue with my efforts to wikify User:Tony Sidaway/Projects/man perl and, once I have completed that task to my satisfaction (I'll be using scripting to do the translation to wiki), I'll compose a rewrite of Perl that refers the interested reader to the appropriate sections of that copious and very readable electronic manual of the Perl language. This should provide the best of both worlds. --User:Tony_Sidaway__User_talk:Tony_Sidaway#Page_Footer_">User:Tony Sidaway|User:Tony Sidaway User talk:Tony Sidaway#Page_Footer 21:21, 27 Nov 2004 (UTC) == Time to split the page? == The Perl page is at 30K. It's long to read and big to edit. Would it make sense to split some of the big sections, e.g. * Perl#Control structures * Perl#Regular expressions with Perl examples off into separate pages? User:Swmcd 16:19, 2005 Mar 1 (UTC) :Yep :-) :User:Chocolateboy 19:34, 1 Mar 2005 (UTC) ==Obfuscation example== That's a really, really weak example of obfuscation given, especially after just mentioning the annual obfuscation contest. Either give a real example, or don't give an example at all. : I assume that this pathetic example (which actually serves to confuse rather than enlighten) was included because all the good ones are of course copyright their authors and hence incompatible with Wikipedia. On the other hand, I'm sure at least some of those authors would be willing to GFDL their Obfuscated Perl entries for Wikipedia. I have one in mind; I may go and ask the author. --Pete : [Time Passes] I've asked for and got permission to use the example I was thinking of. I'll include the text here so that in future people will know it was used with permission. > for your program to be included in an article you would > need to license it under the Gnu Free Documentation License, a > suitable Creative Commons license, or similar. I am happy to license it to you under either or both of those licenses. [ --Mark Jason Dominus] Your effort is appreciated. -- User:Sundar (User talk:Sundar · Special:Contributions/Sundar) 03:43, May 13, 2005 (UTC) == propagandistic errors == i think there are many propagandistic errors in this article. Here's one example: quote:“...Any syntax errors are caught during the compile stage instead of later during execution.” That's kinda ridiculous or meaningless to claim without specifying exactly what is meant by “any“. Quote: “Subroutine calls can be placed in the file before the subroutines themselves are defined.” This is not true always. User:P0lyglut 22:37, 2005 Mar 30 (UTC) i think there are many propagandistic errors in this article. Here's one example: quote: “...Any syntax errors are caught during the compile stage instead of later during execution.” that's kinda ridiculous or meaningless to claim without specifying exactly what is meant by “any“. :I disagree. Any error that isn't picked up at the compile stage isn't a syntax error. Care to give a counter-example? User:Davorg 10:45, 31 Mar 2005 (UTC) ::The problem isn't that it's false, but that it isn't notable. Syntax errors are generally caught during the compile stage of any language, so to note this as a feature of perl is strange. It's even stranger still when you consider that the "eval" function can make it false for perl. --User:Yath 19:56, 31 Mar 2005 (UTC) :::It's notable because many of the languages Perl derives from (like shell scripts) interpret their programs line-by-line. Since they don't have a formal parse phase, a syntax error halfway through your script will leave the task half-finished. —User:Brentdax 02:16, 26 Apr 2005 (UTC) ::::But those languages don't have a compile phase. I found that part of the article to be strange for the same reason that Yath did. -- User:Dominus 13:53, 26 Apr 2005 (UTC) Quote: “Subroutine calls can be placed in the file before the subroutines themselves are defined.” this is not true always. :Again, care to give an example? User:Davorg 10:45, 31 Mar 2005 (UTC) use File::Find qw(find); $mydir= '/Users/t/web/SpecialPlaneCurves_dir'; find(\&wanted, $mydir); sub g($){print shift, "\n";} sub wanted { if ($_ =~/\.html$/ && -T $File::Find::name) { g $File::Find::name;} $File::Find::name; } ::http://xahlee.org/perl-python/traverse_dir.html User:P0lyglut 10:00, 2005 Apr 1 (UTC) :::Of course, all you need to do to fix that it to put parentheses around the arguments to 'g'. So it's hardly a compelling argument. #!/usr/bin/perl use File::Find; $mydir= '.'; find(\&wanted, $mydir); sub wanted { g($File::Find::name) if /\.html$/ && -T $File::Find::name; $File::Find::name; } sub g($) {print shift, "\n";} :::User:Davorg 16:59, 1 Apr 2005 (UTC) User:P0lyglut 22:37, 2005 Mar 30 (UTC) ==History== Perhaps there should be some information on the history of the language (when was it first introduced, for example) --User:24.21.243.107 20:43, 2 Apr 2005 (UTC) == Copyedits == 1.2 Applications says Systems administrators use Perl as an all-purpose tool Generic Player qualified this to Many systems administrators use Perl as an all-purpose tool on the grounds that not all systems administrators use Perl. I took "Many" back out. Unqualified, "systems administrators" doesn't mean "all systems administrators", it refers to systems administrators as a group, and asserts that use of Perl is observed among that group. Adding the qualifier "many" actually asserts knowledge of the prevalence of Perl use among systems administrators, and we shouldn't do that unless we have evidence to support the assertion.

Perl



Hello! Welcome to my "article". I don't know what to say, so feel free to add, edit, or delete anything you want to this page. I have a wikibooks account with the name of Perl. I am a Wikipedia:Sysop and bureaucrat for the [http://mi.wikipedia.org Maori Wikipedia]. My old contributions may be found at User:AlexPlank. Maori | USS Enterprise (CVN-65) | Space Shuttle program | Necker cube | Penrose triangle | Jack Paar | Pascal's Wager | Absolute Infinite | Schrodinger's Cat | Gerolamo Cardano | Lagniappe | DVD mi:User:Perl ---- ''Disambiguation: This page is about User:Perl, a Wikipedia:Wikipedians. There is also a programming language named Perl programming language.'' ==To do== * [http://www.pvhs.chico.k12.ca.us/~bsilva/projects/france/interwar/pers.htm] *John_Wyndham *Mark Abene ==Favorite artists== *Sophie Anderson *John William Waterhouse ==External links== * [http://www.artmagick.com artmagick.com] *[http://www.kurzweilai.net/ KurzweilAI.net] ==To contact Perl== User:Perl/contact

Perl



Please leave messages on wikibooks:User talk:Perl == AMA Meeting Proposal == Hi! I put together a [http://en.wikipedia.org/wiki/Wikipedia:AMA_Meeting_%28suggested_topics%29#New_Membership_Meeting_Call proposal for another AMA meeting] that I'm hopeful you can chime in on. --User:Wgfinley 20:07, 25 Apr 2005 (UTC) ==:Image:1893-7-tn.jpg== {| align=center border=0 cellpadding=4 cellspacing=4 style="border: 2px solid #FF5500; background-color: #F1F1DE" |- | Image deletion warning | style="font-size: 80%" | The image :Image:1893-7-tn.jpg has been listed at Wikipedia:Possibly unfree images. If the image's copyright status cannot be verified, it will be deleted. If you have any information on the source or licensing of this image, please go there to provide the necessary information. |} User:Burgundavia (User talk:Burgundavia) 09:14, May 21, 2005 (UTC) ==:Image:CESAR-CHAVEZ-A.jpg== {| align=center border=0 cellpadding=4 cellspacing=4 style="border: 2px solid #FF5500; background-color: #F1F1DE" |- | Image deletion warning | style="font-size: 80%" | The image :Image:CESAR-CHAVEZ-A.jpg has been listed at Wikipedia:Possibly unfree images. If the image's copyright status cannot be verified, it will be deleted. If you have any information on the source or licensing of this image, please go there to provide the necessary information. |} User:Burgundavia (User talk:Burgundavia) 09:23, May 27, 2005 (UTC)

Perl



Programming languages


See other meanings of words starting from letter:

P

PA | PB | PC | PD | PE | PF | PG | PH | PI | PJ | PK | PL | PM | PN | PO | PR | PS | PT | PU | PW | PX | PY | PZ |

Words begining with Perl:

PERL
Perl
Perl
Perl
Perl
Perl
Perl/contact
Perl/contact
Perl/example
Perl/Linux
Perl/sandbox
Perl/Wyndham
Perl/Wyndham/proof_that_I_am_not_a_troll
Perl6
Perla,_AR
Perla,_Arkansas
Perla,_Arkansas
PerlaLastra
Perlan_Project
Perlan_Project
Perla_Haney-Jardine
Perldude
Perldude
Perle
Perle,_George
Perleberg
Perlemain_Trade_Route
Perlemian_Trade_Route
Perley,_Minnesota
Perley,_MN
Perley_A._Thomas
Perley_A._Thomas
Perley_A._Thomas_Car_Works
Perley_A._Thomas_Car_Works,_Inc.
Perley_A._Thomas_Car_Works/Temp
Perley_A._Thomas_streetcars
Perley_Thomas
Perlin_noise
Perlis
Perlis_Indera_Kayangan
Perlis_theorem
Perlite
Perlite
PerlMagick
Perlman
Perlocutionary
Perlocutionary
Perlocutionary_act
Perloo
Perloo
Perlucin
Perl_(programming_language)
Perl_6
Perl_Camel
Perl_Camel
Perl_control_structures
Perl_Data_Language
Perl_DBI
Perl_Design_Patterns_Book
Perl_dialects
Perl_golf
Perl_Golf_Apocalypse
Perl_guy
Perl_guy
Perl_Harbor
Perl_Harbour
Perl_module
Perl_Monks
Perl_programming_language
Perl_programming_language
Perl_regular_expression_examples
Perl_software


These materials are based on Wikipedia and licensed under the GNU FDL



YouTube.com videos better site than Turbo Tax 2007
encyklopedia online