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

📄 ch00_03.htm

📁 编程珍珠,里面很多好用的代码,大家可以参考学习呵呵,
💻 HTM
字号:
<html><head><title>The Standard Distribution (Programming Perl)</title><!-- STYLESHEET --><link rel="stylesheet" type="text/css" href="../style/style1.css"><!-- METADATA --><!--Dublin Core Metadata--><meta name="DC.Creator" content=""><meta name="DC.Date" content=""><meta name="DC.Format" content="text/xml" scheme="MIME"><meta name="DC.Generator" content="XSLT stylesheet, xt by James Clark"><meta name="DC.Identifier" content=""><meta name="DC.Language" content="en-US"><meta name="DC.Publisher" content="O'Reilly &amp; Associates, Inc."><meta name="DC.Source" content="" scheme="ISBN"><meta name="DC.Subject.Keyword" content=""><meta name="DC.Title" content="The Standard Distribution"><meta name="DC.Type" content="Text.Monograph"></head><body><!-- START OF BODY --><!-- TOP BANNER --><img src="gifs/smbanner.gif" usemap="#banner-map" border="0" alt="Book Home"><map name="banner-map"><AREA SHAPE="RECT" COORDS="0,0,466,71" HREF="index.htm" ALT="Programming Perl"><AREA SHAPE="RECT" COORDS="467,0,514,18" HREF="jobjects/fsearch.htm" ALT="Search this book"></map><!-- TOP NAV BAR --><div class="navbar"><table width="515" border="0"><tr><td align="left" valign="top" width="172"><a href="ch00_02.htm"><img src="../gifs/txtpreva.gif" alt="Previous" border="0"></a></td><td align="center" valign="top" width="171"><a href="ch00_01.htm">Preface</a></td><td align="right" valign="top" width="172"><a href="ch00_04.htm"><img src="../gifs/txtnexta.gif" alt="Next" border="0"></a></td></tr></table></div><hr width="515" align="left"><!-- SECTION BODY --><h2 class="sect1">0.3. The Standard Distribution</h2><p>Most operating system vendors these days include Perl as a standardcomponent of their systems.  As of this writing, AIX, BeOS, BSDI,Debian, DG/UX, DYNIX/ptx, FreeBSD, IRIX, LynxOS, Mac OS X, OpenBSD,OS390, RedHat, SINIX, Slackware, Solaris, SuSE, and Tru64 all camewith Perl as part of their standard distributions.  Some companiesprovide Perl on separate CDs of contributed freeware or throughtheir customer service groups.  Third-party companies like ActiveStateoffer prebuilt Perl distributions for a variety of differentoperating systems, including those from Microsoft.</p><p>Even if your vendor does ship Perl as standard, you'll probablyeventually want to compile and install Perl on your own.  That wayyou'll know you have the latest version, and you'll be able to choosewhere to install your libraries and documentation.  You'll also be ableto choose whether to compile Perl with support for optional extensionssuch as multithreading, large files, or the many low-level debuggingoptions available through the <span class="option">-D</span> command-line switch.  (Theuser-level Perl debugger is always supported.)</p><p>The easiest way to download a Perl source kit is probably to pointyour web browser to Perl's home page at www.perl.com,where you'll find download information prominently featured on thestart-up page, along with links to precompiled binaries for platforms thathave misplaced their C compilers.</p><p>You can also head directly to CPAN (the Comprehensive Perl ArchiveNetwork, described in <a href="ch22_01.htm">Chapter 22, "CPAN"</a>), using<a href="http://www.perl.com/CPAN">http://www.perl.com/CPAN</a> or <a href="http://www.cpan.org">http://www.cpan.org</a>.  If those aretoo slow for you (and they might be because they're <em class="emphasis">very</em> popular),you should find a mirror close to you.  The following URLs are just afew of the CPAN mirrors around the world, now numbering over onehundred:<blockquote><pre class="programlisting"><a href="http://www.funet.fi/pub/languages/perl/CPAN/">http://www.funet.fi/pub/languages/perl/CPAN/</a>ftp://ftp.funet.fi/pub/languages/perl/CPAN/ftp://ftp.cs.colorado.edu/pub/perl/CPAN/ftp://ftp.cise.ufl.edu/pub/perl/CPAN/ftp://ftp.perl.org/pub/perl/CPAN/<a href="http://www.perl.com/CPAN-local">http://www.perl.com/CPAN-local</a><a href="http://www.cpan.org/">http://www.cpan.org/</a><a href="http://www.perl.org/CPAN/">http://www.perl.org/CPAN/</a><a href="http://www.cs.uu.nl/mirror/CPAN/">http://www.cs.uu.nl/mirror/CPAN/</a><a href="http://CPAN.pacific.net.hk/">http://CPAN.pacific.net.hk/</a></pre></blockquote>The first pair in that list, those at the <em class="emphasis">funet.fi</em> site, point tothe master CPAN repository.  The <em class="emphasis">MIRRORED.BY</em> file there containsa list of all other CPAN sites, so you can just get that file andthen pick your favorite mirror.  Some of them are available throughFTP, others through HTTP (which makes a difference behind somecorporate firewalls).  The<a href="http://www.perl.com/CPAN">http://www.perl.com/CPAN</a> multiplexorattempts to make this selection for you.  You can change your selectionif you like later.</p><p>Once you've fetched the source code and unpacked it into a directory,you should read the <em class="emphasis">README</em> and the <em class="emphasis">INSTALL</em> files tolearn how to build Perl.  There may also be an <em class="emphasis">INSTALL.</em><em class="replaceable">platform</em>file for you to read there, where <em class="replaceable">platform</em> represents youroperating system platform.</p><p>If your <em class="replaceable">platform</em> happens to be some variety of Unix, then yourcommands to fetch, configure, build, and install Perl might resemblewhat follows.  First, you must choose a command to fetch the sourcecode.  You can fetch with <em class="emphasis">ftp</em>:<blockquote><pre class="programlisting">% <tt class="userinput"><b>ftp ftp://ftp.funet.fi/pub/languages/perl/CPAN/src/latest.tar.gz</b></tt></pre></blockquote>(Again, feel free to substitute a nearby CPAN mirror.  Of course, if youlive in Finland, that <em class="emphasis">is</em> your nearby CPAN mirror.)  If you can't use<em class="emphasis">ftp</em>, you can download via the Web using a browser or acommand-line tool:<blockquote><pre class="programlisting">% <tt class="userinput"><b>wget http://www.funet.fi/pub/languages/perl/CPAN/src/latest.tar.gz</b></tt></pre></blockquote>Now unpack, configure, build, and install:<blockquote><pre class="programlisting">% <tt class="userinput"><b>tar zxf latest.tar.gz</b></tt>         Or gunzip first, then tar xf.% <tt class="userinput"><b>cd perl-5.6.0</b></tt>                 Or 5.* for whatever number.% <tt class="userinput"><b>sh Configure -des</b></tt>             Assumes default answers.% <tt class="userinput"><b>make test &amp;&amp; make install</b></tt>     Install typically requires superuser.</pre></blockquote>This uses a conventional C development environment, so if you don'thave a C compiler, you can't compile Perl.  See the CPAN <em class="emphasis">ports</em>directory for up-to-date status on each platform to learn whether Perlcomes bundled (and if so, what version), whether you can get by withthe standard source kit, or whether you need a special port.  Downloadlinks are given for those systems that typically require special portsor for systems from vendors who normally don't provide a C compiler (orrather, who abnormally don't provide a C compiler).</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"><a href="ch00_02.htm"><img src="../gifs/txtpreva.gif" alt="Previous" border="0"></a></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_04.htm"><img src="../gifs/txtnexta.gif" alt="Next" border="0"></a></td></tr><tr><td align="left" valign="top" width="172">0.2. What's New in This Edition</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.4. Online Documentation</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 &copy; 2001</a> O'Reilly &amp; 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 + -