下载此文档

【工具辅导类】The PERL Programming Language.pdf


文档分类:IT计算机 | 页数:约71页 举报非法文档有奖
1/71
下载提示
  • 1.该资料是网友上传的,本站提供全文预览,预览什么样,下载就什么样。
  • 2.下载该文档所得收入归上传者、原创者。
  • 3.下载的文档,不会出现我们的网址水印。
1/71 下载此文档
文档列表 文档介绍
The PERL Programming Language
Larry Wall
<>
ABSTRACT
The Practical Extraction and Report Language (perl) is an interpreted language
optimized for scanning arbitrary text files, extracting information from those text files,
and printing reports based on that information. It is also a good language for many sys-
tem management tasks. The language is intended to be practical (easy to use, efficient,
complete) rather than beautiful (tiny, elegant, minimal). bines (in the author’s
opinion, anyway) some of the best features of C, sed, awk, and sh, so people familiar with
those languages should have little difficulty with it. (Language historians will also note
some vestiges of csh, Pascal, and even BASIC-PLUS.) Expression syntax corresponds
quite closely to C expression syntax. Unlike most Unix utilities, perl does not arbitrarily
limit the size of your data— if you’ve got the memory, perl can slurp in your whole file
as a single string. Recursion is of unlimited depth. And the hash tables used by associa-
tive arrays grow as necessary to prevent degraded performance. Perl uses sophisticated
pattern matching techniques to scan large amounts of data very quickly. Although opti-
mized for scanning text, perl can also deal with binary data, and can make dbm files look
like associative arrays (where dbm is available). Setuid perl scripts are safer than C pro-
grams through a dataflow tracing mechanism which prevents many stupid security holes.
If you have a problem that would ordinarily use sed or awk or sh, but it exceeds their
capabilities or must run a little faster, and you don’t want to write the silly thing in C,
then perl may be for you. There are also translators to turn your sed and awk scripts
into perl scripts.
1. Data Types and Objects
Perl has three data types: scalars, arrays of scalars, and associative arrays of scalars. Normal arrays
are indexed by number, and associative arrays by string.
The interpretation of oper

【工具辅导类】The PERL Programming Language 来自淘豆网m.daumloan.com转载请标明出处.

非法内容举报中心
文档信息
  • 页数71
  • 收藏数0 收藏
  • 顶次数0
  • 上传人中国课件站
  • 文件大小0 KB
  • 时间2011-07-20
最近更新