Perl
Dan Tobias (Talk | contribs) |
(→Sample files) |
||
(40 intermediate revisions by 5 users not shown) | |||
Line 2: | Line 2: | ||
|formattype=Languages | |formattype=Languages | ||
|subcat=Programming Languages | |subcat=Programming Languages | ||
− | |extensions={{ext|pl}}, {{ext|pm}} | + | |extensions={{ext|pl}}, {{ext|pm}}, {{ext|ph}}, {{ext|cgi}}, {{ext|fcgi}} |
+ | |pronom={{PRONOM|fmt/870}} | ||
+ | |wikidata={{wikidata|Q42478}} | ||
+ | |released=1987 | ||
}} | }} | ||
− | |||
'''Perl''' is a high-level, general-purpose, interpreted, dynamic programming language. | '''Perl''' is a high-level, general-purpose, interpreted, dynamic programming language. | ||
− | Though Perl is not officially an acronym, there are various backronyms in use, such as: Practical Extraction and Reporting Language, and (more | + | Though Perl is not officially an acronym, there are various backronyms in use, such as: Practical Extraction and Reporting Language, and (more whimsically) Pathologically Eclectic Rubbish Lister. Perl was originally developed by Larry Wall in 1987 as a general-purpose Unix scripting language to make report processing easier. In the 1990s it became very popular for web scripting, though other languages have gained more popularity for this purpose lately. |
+ | |||
+ | It is one of the possibilities for the P in LAMP (a set of technologies used in many web back-ends, including Linux, Apache, and MySQL, notable for being free, open-source software in contrast to proprietary technologies such as those from Microsoft) along with [[PHP]] and [[Python]]. | ||
+ | |||
+ | The book ''Programming Perl'' by Larry Wall and Randal L. Schwartz (and other co-authors in later editions), ISBN 978-0-596-00492-7 or ISBN 978-1-4493-9890-3 for the e-book version, is regarded as the definitive reference for the language, and is usually referred to as "the camel book" because of the picture of a camel on the cover (in keeping with publisher O'Reilly's use of animals on its technical book covers). | ||
Programs in Perl are usually stored in plain-text files, to be run by the Perl interpreter. | Programs in Perl are usually stored in plain-text files, to be run by the Perl interpreter. | ||
− | + | Perl 6 was under development for years, with a number of differences from earlier versions of Perl which make programs incompatible both forward and reverse. This new version uses a virtual machine called "Parrot" with a language that is intermediate between Perl and native machine code. As of 2019-20, Perl 6 is in the process of being renamed to '''[[Raku]]''' [https://lwn.net/Articles/802329/]. | |
− | + | ||
− | + | After this renaming, the Perl developers announced that there would be a "Perl 7" that is a more incremental change from Perl 5 than the change to Perl 6 that ended up being reclassified as a new language. The main initial change in Perl 7 will be a change to some of the default behavior, and deprecation of a few features deemed undesirable. | |
+ | |||
+ | ==Extension convention== | ||
+ | ===.pl=== | ||
+ | Command line script. Used for main Perl programs to be executed, which might in turn pull in modules or headers of other extensions. Sometimes used for CGI-executed scripts as well as command-line-executed ones, although other extensions exist for CGI as shown below. | ||
+ | ===.pl6=== | ||
+ | Raku script (Raku is also called Perl 6, as explained above). | ||
+ | |||
+ | ===.pm=== | ||
+ | Perl Module (library). A set of Perl code (usually object-oriented) designed to be used by programs. A wide range of libraries are available in an open-source manner through resource sites such as CPAN, or developers may create their own libraries as part of the structure of the systems they are developing. | ||
+ | ===.ph=== | ||
+ | Perl Header (file inserted within script/program). Sometimes used for pieces of code, such as initialization of variables for configuration purposes, that is embedded in a Perl program, similarly to the use of .h in [[C]]. Not used as often in Perl as in other languages. | ||
+ | ===.cgi=== | ||
+ | [[Common Gateway Interface]] usage (server side scripting on webservers / webservices). This use is ambiguous, since many other languages are used in CGI scripting, and might show up with a .cgi extension as well. | ||
+ | |||
+ | ===.fcgi=== | ||
+ | API independent [[CGI|Common Gateway Interface]] usage (server side scripting on webservers / webservices). | ||
+ | |||
+ | == Sample files == | ||
+ | * {{DexvertSamples|text/pl}} | ||
+ | * {{DexvertSamples|text/perlPODDocument}} | ||
+ | |||
+ | == Resources == | ||
* [http://www.cpan.org/ CPAN: source of Perl modules and libraries] | * [http://www.cpan.org/ CPAN: source of Perl modules and libraries] | ||
+ | * [http://cpants.cpanauthors.org/ CPANTS]: CPAN Testing Service | ||
+ | * [http://www.fastcgi.com/ FastCGI.com] | ||
+ | * [http://www.perl.org/books/beginning-perl/ Beginning Perl (free online book)] | ||
+ | * [https://webperl.zero-g.net/ WebPerl: Perl that runs in a browser] | ||
+ | |||
+ | == Other links and references == | ||
+ | * [[Wikipedia:Perl|Perl (Wikipedia)]] | ||
+ | * [[Wikipedia:Parrot virtual machine|Parrot (Wikipedia)]] | ||
+ | * [[Wikipedia:Perl 6|Perl 6 (Wikipedia)]] | ||
+ | * [http://www.perl.org/ perl.org] | ||
* [http://shop.oreilly.com/product/9780596004927.do Programming Perl: the classic "camel book"] | * [http://shop.oreilly.com/product/9780596004927.do Programming Perl: the classic "camel book"] | ||
+ | * [http://www.networkworld.com/community/node/82011?utm_medium=referral&utm_source=t.co Perl turns 25] | ||
+ | * [http://www.drdobbs.com/open-source/why-i-use-perland-will-continue-to-do-so/240148364 Why I Use Perl...and Will Continue to Do So] | ||
+ | * [http://strangelyconsistent.org/blog/perl6-is-now-half-as-old-as-perl Perl 6 is now half as old as Perl] | ||
+ | * [http://blogs.perl.org/users/ovid/ Blog about Perl] | ||
+ | * [http://perl5maven.com/pod-plain-old-documentation-of-perl Plain Old Documentation (POD) in Perl] | ||
+ | * [http://boingboing.net/2013/09/24/black-perl-a-poem-in-perl-3.html Black Perl, a poem in Perl 3] | ||
+ | * [http://www.itworld.com/operating-systems/390781/unix-book-review-perl-one-liners Review of Perl One Liners book] | ||
+ | * [http://www.fastcolabs.com/3026446/the-fall-of-perl-the-webs-most-promising-language The Fall Of Perl, The Web's Most Promising Language] | ||
+ | * [http://blogs.perl.org/users/peter_martini/2014/08/the-chimera-quine-or-the-iso-pdf.html The Chimera Quine; or, the ISO PDF] | ||
+ | * [https://github.com/briandfoy/perl7faq/blob/master/README.md Perl 7 FAQ] | ||
+ | * [https://www.perl.com/article/announcing-perl-7/ Announcing Perl 7] |
Latest revision as of 15:31, 30 July 2024
Perl is a high-level, general-purpose, interpreted, dynamic programming language.
Though Perl is not officially an acronym, there are various backronyms in use, such as: Practical Extraction and Reporting Language, and (more whimsically) Pathologically Eclectic Rubbish Lister. Perl was originally developed by Larry Wall in 1987 as a general-purpose Unix scripting language to make report processing easier. In the 1990s it became very popular for web scripting, though other languages have gained more popularity for this purpose lately.
It is one of the possibilities for the P in LAMP (a set of technologies used in many web back-ends, including Linux, Apache, and MySQL, notable for being free, open-source software in contrast to proprietary technologies such as those from Microsoft) along with PHP and Python.
The book Programming Perl by Larry Wall and Randal L. Schwartz (and other co-authors in later editions), ISBN 978-0-596-00492-7 or ISBN 978-1-4493-9890-3 for the e-book version, is regarded as the definitive reference for the language, and is usually referred to as "the camel book" because of the picture of a camel on the cover (in keeping with publisher O'Reilly's use of animals on its technical book covers).
Programs in Perl are usually stored in plain-text files, to be run by the Perl interpreter.
Perl 6 was under development for years, with a number of differences from earlier versions of Perl which make programs incompatible both forward and reverse. This new version uses a virtual machine called "Parrot" with a language that is intermediate between Perl and native machine code. As of 2019-20, Perl 6 is in the process of being renamed to Raku [1].
After this renaming, the Perl developers announced that there would be a "Perl 7" that is a more incremental change from Perl 5 than the change to Perl 6 that ended up being reclassified as a new language. The main initial change in Perl 7 will be a change to some of the default behavior, and deprecation of a few features deemed undesirable.
Contents |
[edit] Extension convention
[edit] .pl
Command line script. Used for main Perl programs to be executed, which might in turn pull in modules or headers of other extensions. Sometimes used for CGI-executed scripts as well as command-line-executed ones, although other extensions exist for CGI as shown below.
[edit] .pl6
Raku script (Raku is also called Perl 6, as explained above).
[edit] .pm
Perl Module (library). A set of Perl code (usually object-oriented) designed to be used by programs. A wide range of libraries are available in an open-source manner through resource sites such as CPAN, or developers may create their own libraries as part of the structure of the systems they are developing.
[edit] .ph
Perl Header (file inserted within script/program). Sometimes used for pieces of code, such as initialization of variables for configuration purposes, that is embedded in a Perl program, similarly to the use of .h in C. Not used as often in Perl as in other languages.
[edit] .cgi
Common Gateway Interface usage (server side scripting on webservers / webservices). This use is ambiguous, since many other languages are used in CGI scripting, and might show up with a .cgi extension as well.
[edit] .fcgi
API independent Common Gateway Interface usage (server side scripting on webservers / webservices).
[edit] Sample files
[edit] Resources
- CPAN: source of Perl modules and libraries
- CPANTS: CPAN Testing Service
- FastCGI.com
- Beginning Perl (free online book)
- WebPerl: Perl that runs in a browser
[edit] Other links and references
- Perl (Wikipedia)
- Parrot (Wikipedia)
- Perl 6 (Wikipedia)
- perl.org
- Programming Perl: the classic "camel book"
- Perl turns 25
- Why I Use Perl...and Will Continue to Do So
- Perl 6 is now half as old as Perl
- Blog about Perl
- Plain Old Documentation (POD) in Perl
- Black Perl, a poem in Perl 3
- Review of Perl One Liners book
- The Fall Of Perl, The Web's Most Promising Language
- The Chimera Quine; or, the ISO PDF
- Perl 7 FAQ
- Announcing Perl 7