Perl Programming Language When it comes to creating system-level applications in g eneral, and Web ser verscripts in particular, the Perl progr amming language stands out with its mat urity and power. Per l, an acronym for Practical Extraction and Reporting Langua geis one of the most powerful and popular programming langua ges. Perl dates back to 1987, when one man, Larry Wall, began developing the lan guage simply as a tool for solving the s ystems programming problems he encounte redas a Unix adminis trator. Despite its humble beginnings, Perl has grown intoa richly featured, complex language. Perl is appealing because it fills the gap between Unix shell programmingan d Capplications. Perl offers much of the simplicity of the former and the funct ionality of the latt er. As described by Wall:"Perl is an interpreted language op timized for scannin g arbitrary text files, extracting infor mation from those text files and printi ngreports based on t hat information. It's also a good language for many syste m management tasks. The language is intended to be practical (easy to use, effic ientand complete)rather than beautiful(t iny, elegant and minimal)." Wall also points out that Perl's expression syntax cor responds quite clos ely to C expression syntax; Perl does no t arbitrarily limit the size off your da ta ——"if you've got the memory, Perl can slurp i n your whole file as a single string;" recursion is of unli mited depth; and Perl uses sophisticated patternm atching te chniques to scan large amounts of data quickly. Perl, which uses straightforward syntax, data types and structures, is fair ly esay to learn. By the same token, wel l-written Perl programs are usually eas y toread and underst and. But that apparent simplicity belies Perl's rich feat ure set, which incl udesa built-in symbolic debugger and sup port for objectoriented programming.A s ophisticated data-fl ow tracing mechanism lets Perl determine if data comes from unsecure sources so potentially dangerous operations can be prevented. Perl is highly portable, runs on all major and many mino r platforms, can ac cessTCP/IP sockets and can be integrated with C. It also offers many specialize d extensions for ser vices such as database and X.500 directory access. Perl scripts or programs are plain text files converted by the Perl runtime into a byte-code version that allows fo r error detection and data-flow tracing .The Perl interprete r then converts the byte-code representation to machine cod e before execution. As mentioned above, Perl is faily easy to learn. Most Pe rl statements enndwi th a semicolon, and many of the statements look like BA SIC or C code. Perl is most commonly used as the language for creating backend application s for Web servers. As if all this isn't enough, Perl is distributed und er the GNU Copyleft license(See WWW.GNU.ORG).This means use of Perl is free.[参考译文] Perl编程语言 当通常要创建系统级的应用程序时,尤其是创建Web服务器过程时 ,Perl编程语言以其成熟和功能强大而出类拔萃。Perl系"实用的摘要 和报告语言"的缩写字,它是最强大、最流行的编程语言之一。 Perl语言可追溯到1987年,有一名叫拉利·华尔的人为解决他作 为Unix管理员所碰到的系统编程问题,开始开发这种语言作为工具。 尽管开始时Perl十分简陋,但现在它已经发展成为一种功能强大、丰 富的编程语言。 Perl之所以有吸引力是因为它填补了Unix外壳编程和C语言应用 程序之间的空档。Perl 提供了前者的简洁性,又有后者的功能性。 正如华尔所述:"Perl是一种解释性语言,用于优化扫描任意的文 本文件、从这些文件中提取信息并依据这些信息打印报表。对很多系 统管理任务而言,它也是一种很好的语言。此语言更倾向于实用(易用 、高效和完整)而不是优美(精练、优雅和短小)。" 华尔还指出,Perl的表达式语法非常接近C语言表达式语法;Perl 不随意限制数据的长度——"如果你有足够的内存,Perl就能按单一的 字符串接受整个文件;"递归具有无限的深度; Perl还采用复杂的结构 匹配技术来快速扫描大量的数据。 Perl采用简单明了的语法、数据类型和结构,所以学习相当容易 。由于同样的原因,写得很好的Perl程序通常是容易读懂的。 但这种明显的简洁性,让人看不到Perl丰富的功能集,其中包括内 置的符号调试程序和对面向对象编程的支持。先进的数据流追踪机制 ,让Perl能确定数据是否来自不安全处,因而能阻止潜在的危险操作。 Perl是高度可移植的,能在所有主要的和很多次要的平台上运行, 能访问TCP/IP套接字, 还能与C语言结合,它也提供很多专门化的扩展 ,用于诸如数据库和X.500目录访问等服务。 Perl过程或程序是普通的文本文件,由Perl运行时间程序转换成 字节码形式,该码允许错误检测和数据流跟踪。然后,在执行之前,Per l解释程序把字节码表达形式转换成机器码。 如上所述,学会Perl相当容易。多数Perl语句都以分号结尾,很多 语句看上去像Basic或C代码。 Perl最常用作编制Web服务器的后端应用程序的语言。 如果以上所述还不够详细,Perl是在GNU Copyleft许可下分发的( 见www.gnu.org)。这就是说Perl是自由软件。