Difference between revisions of "Perl"

from HTYP, the free directory anyone can edit if they can prove to me that they're not a spambot
Jump to navigation Jump to search
(→‎Notes: example of block comment)
m (minor header rearrangement; seed->seedling)
Line 1: Line 1:
{{seed}}[[Computing]]: [[Programming]]: [[Perl]]
+
[[computing]]: [[programming]]: [[Perl]]{{seedling}}
 
+
==Overview==
 
[[Perl]] is a programming language widely used for web sites and [[Linux]] servers. It can be somewhat baffling to the eye – largely due to the frequent use of [[Perl regex|regular expressions]] – but due to its popularity it has been greatly refined and there is a large base of existing code available for reuse.
 
[[Perl]] is a programming language widely used for web sites and [[Linux]] servers. It can be somewhat baffling to the eye – largely due to the frequent use of [[Perl regex|regular expressions]] – but due to its popularity it has been greatly refined and there is a large base of existing code available for reuse.
 
 
==Articles==
 
==Articles==
 
===Usage===
 
===Usage===
Line 10: Line 9:
 
* '''official documentation'''
 
* '''official documentation'''
 
** [[perl manpage]]
 
** [[perl manpage]]
 
 
===Design===
 
===Design===
 
* [[Perl vs. PHP]]
 
* [[Perl vs. PHP]]
 
 
==Other Documentation==
 
==Other Documentation==
 
*[http://www.cpan.org/ CPAN]: documentation links at the Comprehensive Perl Archive Network
 
*[http://www.cpan.org/ CPAN]: documentation links at the Comprehensive Perl Archive Network

Revision as of 18:29, 24 May 2006

computing: programming: Perl

This is a growing seedling article. You can help HTYP by watering it.

Overview

Perl is a programming language widely used for web sites and Linux servers. It can be somewhat baffling to the eye – largely due to the frequent use of regular expressions – but due to its popularity it has been greatly refined and there is a large base of existing code available for reuse.

Articles

Usage

Design

Other Documentation

  • CPAN: documentation links at the Comprehensive Perl Archive Network

Libraries and Modules

  • CPAN: search the Comprehensive Perl Archive Network

Notes

  • Although single-quoted strings are widely cited as not interpreting anything, you do have to backslash certain characters if you want them represented literally:
    • the single-quote itself ( \' )
    • period ( \. )
  • One of the reasons for PHP's popularity over Perl for developing web applications is that it prints errors to the web browser, rather than simply quitting abruptly (causing either an incomplete page or, more likely, a 5xx Server Error). Perl does not do this by default. It is, however, quite easy to make this happen, by including the following line of code near the beginning of a program:
use CGI::Carp qw(fatalsToBrowser);
  • Although there is apparently no formal block-quote syntax (like /* */ in c/c++), a syntax used for documentation seems to accomplish the same thing. It's not presently known whether this is documented anywhere. "=anystring", at the beginning of a line, starts a block comment, and "=cut" at the beginning of a line ends the comment. This has not been tested thoroughly, but the exact string "cut" does seem to be necessary. Example:
regular_code_here();
==something
This part is commented, i.e. ignored by the parser.
Anything up until the "cut" line.
==cut
more_code();