📄 ch00_01.htm
字号:
point across. Any level of language proficiency is acceptable in Perlculture. We won't send the language police after you. A Perl script is"correct" if it gets the job done before your boss fires you.</p><p>Though simple in many ways, Perl is also a rich language, and there ismuch to learn about it. That's the price of making hard thingspossible. Although it will take some time for you to absorb all thatPerl can do, you will be glad that you have access to the extensivecapabilities of Perl when the time comes that you need them.</p><p>Because of its heritage, Perl was a rich language even when it was"just" a data-reduction language, designed for navigating files,scanning large amounts of text, creating and obtaining dynamic data, andprinting easily formatted reports based on that data. But somewherealong the line, Perl started to blossom. It also became a language forfilesystem manipulation, process management, database administration,client-server programming, secure programming, web-based informationmanagement, and even for object-oriented and functional programming.These capabilities were not just slapped onto the side of Perl--each newcapability works synergistically with the others because Perl wasdesigned to be a glue language from the start.</p><p><a name="INDEX-2"></a>But Perl can glue together more than its own features. Perl is designedto be modularly extensible. Perl allows you to rapidly design, program,debug, and deploy applications, and it also allows you to easily extendthe functionality of these applications as the need arises. You canembed Perl in other languages, and you can embed other languages inPerl. Through the module importation mechanism, you can use theseexternal definitions as if they were built-in features of Perl.Object-oriented external libraries retain their object-orientedness inPerl.</p><p><a name="INDEX-3"></a>Perl helps you in other ways, too. Unlike strictly interpretedlanguages such as command files or shell scripts, which compile andexecute a program one command at a time, Perl first compiles your wholeprogram quickly into an intermediate format. Like any other compiler,it performs various optimizations and gives you instant feedback oneverything from syntax and semantic errors to library binding mishaps.Once Perl's compiler frontend is happy with your program, it passes offthe intermediate code to the interpreter to execute (or optionally toany of several modular back ends that can emit C or bytecode). Thisall sounds complicated, but the compiler and interpreter are quiteefficient, and most of us find that the typical compile-run-fix cycleis measured in mere seconds. Together with Perl's many fail-softcharacteristics, this quick turnaround capability makes Perl a languagein which you really can do rapid prototyping. Then later, as yourprogram matures, you can tighten the screws on yourself and makeyourself program with less flair but more discipline. Perl helps youwith that, too, if you ask nicely.</p><p><a name="INDEX-4"></a>Perl also helps you to write programs more securely. In addition toall the typical security interfaces provided by other languages,Perl also guards against accidental security errors through a uniquedata-tracing mechanism that automatically determines which data camefrom insecure sources and prevents dangerous operations before they canhappen. Finally, Perl lets you set up specially protected compartmentsin which you can safely execute Perl code of dubious origin, disallowingdangerous operations.</p><p>But, paradoxically, the way in which Perl helps you the most has almostnothing to do with Perl and everything to do with the people who usePerl. Perl folks are, frankly, some of the most helpful folks onearth. If there's a religious quality to the Perl movement, then thisis at the heart of it. Larry wanted the Perl community to functionlike a little bit of heaven, and by and large he seems to have gottenhis wish, so far. Please do your part to keep it that way.</p><p>Whether you are learning Perl because you want to save the world, orjust because you are curious, or because your boss told you to, thishandbook will lead you through both the basics and the intricacies. Andalthough we don't intend to teach you how to program, the perceptivereader will pick up some of the art, and a little of the science, ofprogramming. We will encourage you to develop the three great virtues ofa programmer: <em class="emphasis">laziness</em>, <em class="emphasis">impatience</em>, and <em class="emphasis">hubris</em>. Along theway, we hope you find the book mildly amusing in some spots (and wildlyamusing in others). And if none of this is enough to keep you awake,just keep reminding yourself that learning Perl will increase the valueof your resume. So keep reading.</p><!-- BOTTOM NAV BAR --><hr width="515" align="left"><div class="navbar"><table width="515" border="0"><tr><td align="left" valign="top" width="172"></td><td align="center" valign="top" width="171"><a href="index.htm"><img src="../gifs/txthome.gif" alt="Home" border="0"></a></td><td align="right" valign="top" width="172"><a href="ch00_02.htm"><img src="../gifs/txtnexta.gif" alt="Next" border="0"></a></td></tr><tr><td align="left" valign="top" width="172"></td><td align="center" valign="top" width="171"><a href="index/index.htm"><img src="../gifs/index.gif" alt="Book Index" border="0"></a></td><td align="right" valign="top" width="172">0.2. What's New in This Edition</td></tr></table></div><hr width="515" align="left"><!-- LIBRARY NAV BAR --><img src="../gifs/smnavbar.gif" usemap="#library-map" border="0" alt="Library Navigation Links"><p><font size="-1"><a href="copyrght.htm">Copyright © 2001</a> O'Reilly & Associates. All rights reserved.</font></p><map name="library-map"> <area shape="rect" coords="2,-1,79,99" href="../index.htm"><area shape="rect" coords="84,1,157,108" href="../perlnut/index.htm"><area shape="rect" coords="162,2,248,125" href="../prog/index.htm"><area shape="rect" coords="253,2,326,130" href="../advprog/index.htm"><area shape="rect" coords="332,1,407,112" href="../cookbook/index.htm"><area shape="rect" coords="414,2,523,103" href="../sysadmin/index.htm"></map><!-- END OF BODY --></body></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -