⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 ch01_01.htm

📁 by Randal L. Schwartz and Tom Phoenix ISBN 0-596-00132-0 Third Edition, published July 2001. (See
💻 HTM
字号:
<html><head><title>Introduction to Perl (Perl in a Nutshell, 2nd Edition)</title><link rel="stylesheet" type="text/css" href="../style/style1.css" /><meta name="DC.Creator" content="Stephen Spainhour" /><meta name="DC.Format" content="text/xml" scheme="MIME" /><meta name="DC.Language" content="en-US" /><meta name="DC.Publisher" content="O'Reilly &amp; Associates, Inc." /><meta name="DC.Source" scheme="ISBN" content="0596002416L" /><meta name="DC.Subject.Keyword" content="stuff" /><meta name="DC.Title" content="Perl in a Nutshell, 2nd Edition" /><meta name="DC.Type" content="Text.Monograph" /></head><body bgcolor="#ffffff"><img src="gifs/smbanner.gif" usemap="#banner-map" border="0" alt="Book Home" /><map name="banner-map"><area shape="rect" coords="1,-2,616,66" href="index.htm" alt="Java and XSLT" /><area shape="rect" coords="629,-11,726,25" href="jobjects/fsearch.htm" alt="Search this book" /></map><div class="navbar"><table width="684" border="0"><tr><td align="left" valign="top" width="228"><a href="part1.htm"><img src="../gifs/txtpreva.gif" alt="Previous" border="0" /></a></td><td align="center" valign="top" width="228" /><td align="right" valign="top" width="228"><a href="ch01_02.htm"><img src="../gifs/txtnexta.gif" alt="Next" border="0" /></a></td></tr></table></div><h1 class="chapter">Chapter 1. Introduction to Perl</h1><div class="htmltoc"><h4 class="tochead">Contents:</h4>  <p> <a href="#perlnut2-CHP-1-SECT-1">What's Perl Good For?</a><br /><a href="ch01_02.htm">Perl Development</a><br /><a href="ch01_03.htm">Which Platforms Support Perl?</a><br /><a href="ch01_04.htm">Perl Resources</a><br /></p></div><p>Computer languages differ not so much in what they make possible, butin what they make easy. <a name="INDEX-2" /></a>Perl is designed to make the easy jobseasy, without making the hard jobs impossible. Perl makes it easy tomanipulate numbers, text, files, directories, computers, networks,and programs. It also makes it easy to develop, modify, and debugyour own programs portably, on any modern operating system.</p><p>Perl is especially popular with systems programmers and webdevelopers, but it also appeals to a much broader audience.Originally designed for text processing, it has grown into asophisticated, general-purpose programming language with a richsoftware development environment complete with debuggers, profilers,cross-referencers, compilers, interpreters, libraries,syntax-directed editors, and all the rest of the trappings of a"real" programming language.</p><p>There are many reasons for Perl's success. Forstarters, Perl is freely available and freely redistributable. Butthat's not enough to explain the Perl phenomenon,since many other freeware packages fail to thrive. Perl is not justfree; it's also fun. People feel like they can becreative in Perl, because they have freedom of expression.</p><p>Perl is both a very simple language and a very rich language.It's a simple language in that the types andstructures are simple to use and understand, and it borrows heavilyfrom other languages you may already be familiar with. Youdon't have to know everything there is to know aboutPerl before you can write useful programs.</p><p>However, Perl is also a rich language, and there is much to learnabout it. That's the price of making hard thingspossible. Although it will take some time for you to absorb all thatPerl can do, somewhere down the line you will be glad that you haveaccess to the extensive capabilities of Perl.</p><div class="sect1"><a name="perlnut2-CHP-1-SECT-1" /></a><h2 class="sect1">1.1. What's Perl Good For?</h2><p><a name="INDEX-3" /></a>Perl hasthe advantage of being easy to learn if you just want to write simplescripts&#x2014;thus its appeal to the ever-impatient systemadministrator and the deadline-driven CGI developer. However, as youbecome more ambitious, Perl lets you act on those ambitions. <a href="ch02_01.htm">Chapter 2, "Installing Perl"</a> covers how to get and install Perl, and<a href="ch03_01.htm">Chapter 3, "The Perl Executable"</a> through <a href="ch06_01.htm">Chapter 6, "Debugging"</a> cover the basics of the Perl language, itsfunctions, and how to use the Perl debugger.</p><p><a name="INDEX-4" /></a>On top of thePerl language itself, however, are the Perl modules. You can think ofmodules as add-ons to the Perl language that allow you to streamlinetasks by providing a consistent API. Perl itself is fun to use, butthe modules lend Perl even more flexibility and enormous power.Furthermore, anyone can write and distribute a Perl module. Somemodules are deemed important enough or popular enough to bedistributed with Perl itself, but very few are actually written bythe core Perl developers themselves. <a href="ch07_01.htm">Chapter 7, "Packages, Modules, and Objects"</a>introduces you to Perl modules, and <a href="ch08_01.htm">Chapter 8, "Standard Modules"</a>covers the standard modules that are distributed with Perl itself.</p><p>The most popular Perl module is CGI.pm, which gives a simpleinterface to developing common gateway interface (CGI) applicationsin Perl. While Perl itself is indispensable for many different tasks,its text-manipulation features make it perfect for CGI development onthe Web. In fact, the resurgence of Perl over the past few years mustbe credited to its popularity as a CGI language. <a href="ch10_01.htm">Chapter 10, "The CGI.pm Module"</a> and <a href="ch11_01.htm">Chapter 11, "Web Server Programmingwith mod_perl"</a> talk aboutusing Perl for CGI, including <em class="emphasis">mod_perl</em>, whichmerges Perl into the Apache web server.</p><p>Database interconnectivity is one of the most important functions ofany programming language today, and Perl is no exception.<a name="INDEX-5" /></a>DBI is a suite ofmodules that provide a consistent database-independent interface forPerl. <a href="ch12_01.htm">Chapter 12, "Databases and Perl"</a> covers both DBI and DBM (the moreprimitive but surprisingly effective database interface builtdirectly into Perl).</p><p>The eXtensible Markup Language (XML) is quickly becoming the de factoway to store electronic information of any kind. <a href="ch13_01.htm">Chapter 13, "XML and Perl"</a> covers the modules designed for Perl and XMLprocessing, and <a href="ch14_01.htm">Chapter 14, "SOAP"</a> covers using Perl formanaging web services with the XML-based protocol SOAP.</p><p>The Internet doesn't start and stop at CGI. Networkprogramming is another of Perl's strengths, with arobust sockets interface and several modules for writing clients andservers for all sorts of Internet services&#x2014;not only the Web,but also email, news, FTP, LDAP, etc. <a href="ch15_01.htm">Chapter 15, "Sockets"</a> through <a href="ch19_01.htm">Chapter 19, "Lightweight Directory Access with Net::LDAP"</a> cover themodules for developing fully functional Internet applications inPerl.</p><p>The World Wide Web, of course, is the "killerapp" of the Internet. LWP is a library of modulesdevoted to web programming. <a href="ch20_01.htm">Chapter 20, "The LWP Library"</a> covers theLWP library.</p><p>Perl programs are traditionally command line-based, but the Perl/Tkextension can provide Perl programs with graphical user interfaces,for both Unix and Microsoft Windows. <a href="ch21_01.htm">Chapter 21, "Perl/Tk"</a>gives a complete reference to Perl/Tk.</p><p>Finally, although Perl is primarily developed for Unix, recentreleases of Perl for Windows 95 and Windows NT are gainingpopularity, both for CGI and system administration tasks. <a href="ch21_01.htm">Chapter 21, "Perl/Tk"</a> through <a href="ch24_01.htm">Chapter 24, "ODBC Extension for Win32"</a>cover the Win32 modules for Perl.</p><p>As you may have noticed, <a href="ch01_01.htm#perlnut2-CHP-1-SECT-1">Section 1.1, "What's Perl Good For?"</a> has sneakily become a description of thecontents of this book. This book aims at being a general-purposereference to all things Perl. <a name="INDEX-6" /></a> </p></div><hr width="684" align="left" /><div class="navbar"><table width="684" border="0"><tr><td align="left" valign="top" width="228"><a href="part1.htm"><img src="../gifs/txtpreva.gif" alt="Previous" border="0" /></a></td><td align="center" valign="top" width="228"><a href="index.htm"><img src="../gifs/txthome.gif" alt="Home" border="0" /></a></td><td align="right" valign="top" width="228"><a href="ch01_02.htm"><img src="../gifs/txtnexta.gif" alt="Next" border="0" /></a></td></tr><tr><td align="left" valign="top" width="228">I. Getting Started</td><td align="center" valign="top" width="228"><a href="index/index.htm"><img src="../gifs/index.gif" alt="Book Index" border="0" /></a></td><td align="right" valign="top" width="228">1.2. Perl Development</td></tr></table></div><hr width="684" align="left" /><img src="../gifs/navbar.gif" usemap="#library-map" border="0" alt="Library Navigation Links" /><p><p><font size="-1"><a href="copyrght.htm">Copyright &copy; 2002</a> O'Reilly &amp; Associates. All rights reserved.</font></p><map name="library-map"><area shape="rect" coords="1,0,85,94" href="../index.htm"><area shape="rect" coords="86,1,178,103" href="../lwp/index.htm"><area shape="rect" coords="180,0,265,103" href="../lperl/index.htm"><area shape="rect" coords="267,0,353,105" href="../perlnut/index.htm"><area shape="rect" coords="354,1,446,115" href="../prog/index.htm"><area shape="rect" coords="448,0,526,132" href="../tk/index.htm"><area shape="rect" coords="528,1,615,119" href="../cookbook/index.htm"><area shape="rect" coords="617,0,690,135" href="../pxml/index.htm">      </map></body></html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -