Perl 简明教程
Perl Tutorial
Perl 是由 Larry Wall 开发的 programming language ,专门设计用于文本处理。它代表实用提取和报告语言。它运行在各种平台上,如 Windows、Mac OS 和各种版本的 UNIX。本教程提供了对 Perl 的完整理解。
Perl is a programming language developed by Larry Wall, especially designed for text processing. It stands for Practical Extraction and Report Language. It runs on a variety of platforms, such as Windows, Mac OS, and the various versions of UNIX. This tutorial provides a complete understanding on Perl.
Why to Learn Perl?
-
Perl is a stable, cross platform programming language.
-
Though Perl is not officially an acronym but few people used it as Practical Extraction and Report Language.
-
It is used for mission critical projects in the public and private sectors.
-
Perl is an Open Source software, licensed under its Artistic License, or the GNU General Public License (GPL).
-
Perl was created by Larry Wall.
-
Perl 1.0 was released to usenet’s alt.comp.sources in 1987.
-
At the time of writing this tutorial, the latest version of perl was 5.16.2.
-
Perl is listed in the Oxford English Dictionary.
PC Magazine 宣布 Perl 是其1998年技术卓越奖开发工具类别的决赛入围者。
PC Magazine announced Perl as the finalist for its 1998 Technical Excellence Award in the Development Tool category.
Perl Features
-
Perl takes the best features from other languages, such as C, awk, sed, sh, and BASIC, among others.
-
Perls database integration interface DBI supports third-party databases including Oracle, Sybase, Postgres, MySQL and others.
-
Perl works with HTML, XML, and other mark-up languages.
-
Perl supports Unicode.
-
Perl is Y2K compliant.
-
Perl supports both procedural and object-oriented programming.
-
Perl interfaces with external C/C++ libraries through XS or SWIG.
-
Perl is extensible. There are over 20,000 third party modules available from the Comprehensive Perl Archive Network (CPAN).
-
The Perl interpreter can be embedded into other systems.
Hello World using Perl.
为了让你对 Perl 有点兴奋,我将给你一个小型的传统 Perl Hello World 程序,你可以使用演示链接来尝试。
Just to give you a little excitement about Perl, I’m going to give you a small conventional Perl Hello World program, You can try it using Demo link.
#!/usr/bin/perl
# This will print "Hello, World"
print "Hello, world\n";
Applications of Perl
如前所述,Perl 是网络上使用最广泛的语言之一。我将在下面列出其中几个:
As mentioned before, Perl is one of the most widely used language over the web. I’m going to list few of them here:
-
Perl used to be the most popular web programming language due to its text manipulation capabilities and rapid development cycle.
-
Perl is widely known as "the duct-tape of the Internet".
-
Perl can handle encrypted Web data, including e-commerce transactions.
-
Perl can be embedded into web servers to speed up processing by as much as 2000%.
-
Perl’s mod_perl allows the Apache web server to embed a Perl interpreter.
-
Perl’s DBI package makes web-database integration easy.