文章详情

  • 游戏榜单
  • 软件榜单
关闭导航
热搜榜
热门下载
热门标签
php爱好者> php文档>Perl编程语言简介

Perl编程语言简介

时间:2006-03-30  来源:ghostzhu

Perl编程语言

Perl Programming Language
    When it comes to creating system-level applications in general, and Web ser verscripts in particular, the Perl programming language stands out with its mat urity and power. Perl, an acronym for Practical Extraction and Reporting Langua geis one of the most powerful and popular programming languages.
    Perl dates back to 1987, when one man, Larry Wall, began developing the lan guage simply as a tool for solving the systems programming problems he encounte redas a Unix administrator. 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 latter.
    As described by Wall:"Perl is an interpreted language optimized for scannin g arbitrary text files, extracting information from those text files and printi ngreports based on that information. It's also a good language for many system management tasks. The language is intended to be practical(easy to use, effic ientand complete)rather than beautiful(tiny, elegant and minimal)."Wall also points out that Perl's expression syntax corresponds quiteclos ely to C expression syntax; Perl does not arbitrarily limit the size of your da ta ——"if you've got the memory, Perl can slurp in your whole file as a single string;" recursion is of unlimited depth; and Perl uses sophisticated patternm atching techniques 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, well-written Perl programs are usually eas y toread and understand.
But that apparent simplicity belies Perl's rich feature set, which incl udesa built-in symbolic debugger and support for objectoriented programming.A s ophisticated data-flow 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 for error detection and data-flow tracing .The Perl interpreter then converts the byte-code representation to machine code before execution.
    As mentioned above, Perl is faily easy to learn. Most Perl statements endwi th a semicolon, and many of the statements look like BASIC 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 under the GNU Copyleft license(See WWW.GNU.ORG).This means useof 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是自由软件。
注:参考译文由通信英语教学论坛http://www.routerinfo.net/telecom/sf2/showthread.asp?threadid=609&goto=prev 的ershi发表,在此对他表示感谢!
相关阅读 更多 +
排行榜 更多 +
药丸轮盘手机版下载

药丸轮盘手机版下载

休闲益智 下载
摔跤擂台物语汉化版下载

摔跤擂台物语汉化版下载

休闲益智 下载
模拟山羊3胡闹多元宇宙手机版下载

模拟山羊3胡闹多元宇宙手机版下载

休闲益智 下载