📄 perlfaq2.1
字号:
.\" Automatically generated by Pod::Man 2.16 (Pod::Simple 3.05).\".\" Standard preamble:.\" ========================================================================.de Sh \" Subsection heading.br.if t .Sp.ne 5.PP\fB\\$1\fR.PP...de Sp \" Vertical space (when we can't use .PP).if t .sp .5v.if n .sp...de Vb \" Begin verbatim text.ft CW.nf.ne \\$1...de Ve \" End verbatim text.ft R.fi...\" Set up some character translations and predefined strings. \*(-- will.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left.\" double quote, and \*(R" will give a right double quote. \*(C+ will.\" give a nicer C++. Capital omega is used to do unbreakable dashes and.\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff,.\" nothing in troff, for use with C<>..tr \(*W-.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'.ie n \{\. ds -- \(*W-. ds PI pi. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch. ds L" "". ds R" "". ds C` "". ds C' ""'br\}.el\{\. ds -- \|\(em\|. ds PI \(*p. ds L" ``. ds R" '''br\}.\".\" Escape single quotes in literal strings from groff's Unicode transform..ie \n(.g .ds Aq \(aq.el .ds Aq '.\".\" If the F register is turned on, we'll generate index entries on stderr for.\" titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and index.\" entries marked with X<> in POD. Of course, you'll have to process the.\" output yourself in some meaningful fashion..ie \nF \{\. de IX. tm Index:\\$1\t\\n%\t"\\$2"... nr % 0. rr F.\}.el \{\. de IX...\}.\".\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2)..\" Fear. Run. Save yourself. No user-serviceable parts.. \" fudge factors for nroff and troff.if n \{\. ds #H 0. ds #V .8m. ds #F .3m. ds #[ \f1. ds #] \fP.\}.if t \{\. ds #H ((1u-(\\\\n(.fu%2u))*.13m). ds #V .6m. ds #F 0. ds #[ \&. ds #] \&.\}. \" simple accents for nroff and troff.if n \{\. ds ' \&. ds ` \&. ds ^ \&. ds , \&. ds ~ ~. ds /.\}.if t \{\. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u". ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'.\}. \" troff and (daisy-wheel) nroff accents.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'.ds 8 \h'\*(#H'\(*b\h'-\*(#H'.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#].ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#].ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#].ds ae a\h'-(\w'a'u*4/10)'e.ds Ae A\h'-(\w'A'u*4/10)'E. \" corrections for vroff.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'. \" for low resolution devices (crt and lpr).if \n(.H>23 .if \n(.V>19 \\{\. ds : e. ds 8 ss. ds o a. ds d- d\h'-1'\(ga. ds D- D\h'-1'\(hy. ds th \o'bp'. ds Th \o'LP'. ds ae ae. ds Ae AE.\}.rm #[ #] #H #V #F C.\" ========================================================================.\".IX Title "PERLFAQ2 1".TH PERLFAQ2 1 "2007-12-18" "perl v5.10.0" "Perl Programmers Reference Guide".\" For nroff, turn off justification. Always turn off hyphenation; it makes.\" way too many mistakes in technical documents..if n .ad l.nh.SH "NAME"perlfaq2 \- Obtaining and Learning about Perl ($Revision: 10144 $).SH "DESCRIPTION".IX Header "DESCRIPTION"This section of the \s-1FAQ\s0 answers questions about where to findsource and documentation for Perl, support, andrelated matters..Sh "What machines support perl? Where do I get it?".IX Subsection "What machines support perl? Where do I get it?"The standard release of perl (the one maintained by the perldevelopment team) is distributed only in source code form. Youcan find this at http://www.cpan.org/src/latest.tar.gz , whichis in a standard Internet format (a gzipped archive in \s-1POSIX\s0 tar format)..PPPerl builds and runs on a bewildering number of platforms. Virtuallyall known and current Unix derivatives are supported (perl's nativeplatform), as are other systems like \s-1VMS\s0, \s-1DOS\s0, \s-1OS/2\s0, Windows,\&\s-1QNX\s0, BeOS, \s-1OS\s0 X, MPE/iX and the Amiga..PPBinary distributions for some proprietary platforms, includingApple systems, can be found http://www.cpan.org/ports/ directory.Because these are not part of the standard distribution, they mayand in fact do differ from the base perl port in a variety of ways.You'll have to check their respective release notes to see justwhat the differences are. These differences can be either positive(e.g. extensions for the features of the particular platform thatare not supported in the source release of perl) or negative (e.g.might be based upon a less current source release of perl)..Sh "How can I get a binary version of perl?".IX Subsection "How can I get a binary version of perl?"For Windows, ActiveState provides a pre-built Perl for free:.PP.Vb 1\& http://www.activestate.com/.Ve.PPSunfreeware.com provides binaries for many utilities, includingPerl, for Solaris on both Intel and \s-1SPARC\s0 hardware:.PP.Vb 1\& http://www.sunfreeware.com/.Ve.PPIf you don't have a C compiler because your vendor for whateverreasons did not include one with your system, the best thing to do isgrab a binary version of gcc from the net and use that to compile perlwith. \s-1CPAN\s0 only has binaries for systems that are terribly hard toget free compilers for, not for Unix systems..PPSome URLs that might help you are:.PP.Vb 2\& http://www.cpan.org/ports/\& http://www.perl.com/pub/language/info/software.html.Ve.PPSomeone looking for a perl for Win16 might look to Laszlo Molnar'sdjgpp port in http://www.cpan.org/ports/#msdos , which comes withclear installation instructions..Sh "I don't have a C compiler. How can I build my own Perl interpreter?".IX Subsection "I don't have a C compiler. How can I build my own Perl interpreter?"Since you don't have a C compiler, you're doomed and your vendorshould be sacrificed to the Sun gods. But that doesn't help you..PPWhat you need to do is get a binary version of gcc for your systemfirst. Consult the Usenet FAQs for your operating system forinformation on where to get such a binary version..PPYou might look around the net for a pre-built binary of Perl (or a C compiler!) that meets your needs, though:.PPFor Windows, Vanilla Perl ( http://vanillaperl.com/ ) and Strawberry Perl( http://strawberryperl.com/ ) come with a bundled C compiler. ActivePerl is a pre-compiled version of Perlready-to-use..PPFor Sun systems, SunFreeware.com provides binaries of most popular applications, including compilers and Perl..Sh "I copied the perl binary from one machine to another, but scripts don't work.".IX Subsection "I copied the perl binary from one machine to another, but scripts don't work."That's probably because you forgot libraries, or library paths differ.You really should build the whole distribution on the machine it willeventually live on, and then type \f(CW\*(C`make install\*(C'\fR. Most otherapproaches are doomed to failure..PPOne simple way to check that things are in the right place is to print outthe hard-coded \f(CW@INC\fR that perl looks through for libraries:.PP.Vb 1\& % perl \-le \*(Aqprint for @INC\*(Aq.Ve.PPIf this command lists any paths that don't exist on your system, then youmay need to move the appropriate libraries to these locations, or createsymbolic links, aliases, or shortcuts appropriately. \f(CW@INC\fR is also printed aspart of the output of.PP.Vb 1\& % perl \-V.Ve.PPYou might also want to check out\&\*(L"How do I keep my own module/library directory?\*(R" in perlfaq8..Sh "I grabbed the sources and tried to compile but gdbm/dynamic loading/malloc/linking/... failed. How do I make it work?".IX Subsection "I grabbed the sources and tried to compile but gdbm/dynamic loading/malloc/linking/... failed. How do I make it work?"Read the \fI\s-1INSTALL\s0\fR file, which is part of the source distribution.It describes in detail how to cope with most idiosyncrasies that theConfigure script can't work around for any given system orarchitecture..Sh "What modules and extensions are available for Perl? What is \s-1CPAN\s0? What does CPAN/src/... mean?".IX Subsection "What modules and extensions are available for Perl? What is CPAN? What does CPAN/src/... mean?"\&\s-1CPAN\s0 stands for Comprehensive Perl Archive Network, a multi-gigabytearchive replicated on hundreds of machines all over the world. \s-1CPAN\s0contains source code, non-native ports, documentation, scripts, andmany third-party modules and extensions, designed for everything fromcommercial database interfaces to keyboard/screen control to webwalking and \s-1CGI\s0 scripts. The master web site for \s-1CPAN\s0 ishttp://www.cpan.org/ and there is the \s-1CPAN\s0 Multiplexer athttp://www.cpan.org/CPAN.html which will choose a mirror near you via\&\s-1DNS\s0. See http://www.perl.com/CPAN (without a slash at the end) forhow this process works. Also, http://mirror.cpan.org/ has a niceinterface to the http://www.cpan.org/MIRRORED.BY mirror directory..PPSee the \s-1CPAN\s0 \s-1FAQ\s0 at http://www.cpan.org/misc/cpan\-faq.html for answersto the most frequently asked questions about \s-1CPAN\s0 including how tobecome a mirror..PPCPAN/path/... is a naming convention for files available on \s-1CPAN\s0sites. \s-1CPAN\s0 indicates the base directory of a \s-1CPAN\s0 mirror, and therest of the path is the path from that directory to the file. Forinstance, if you're using ftp://ftp.funet.fi/pub/languages/perl/CPANas your \s-1CPAN\s0 site, the file CPAN/misc/japh is downloadable asftp://ftp.funet.fi/pub/languages/perl/CPAN/misc/japh ..PPConsidering that, as of 2006, there are over ten thousand existingmodules in the archive, one probably exists to do nearly anything youcan think of. Current categories under CPAN/modules/by\-category/include Perl core modules; development support; operating systeminterfaces; networking, devices, and interprocess communication; datatype utilities; database interfaces; user interfaces; interfaces toother languages; filenames, file systems, and file locking;internationalization and locale; world wide web support; server anddaemon utilities; archiving and compression; image manipulation; mailand news; control flow utilities; filehandle and I/O; MicrosoftWindows modules; and miscellaneous modules..PPSee http://www.cpan.org/modules/00modlist.long.html orhttp://search.cpan.org/ for a more complete list of modules bycategory..PP\&\s-1CPAN\s0 is a free service and is not affiliated with O'Reilly Media..Sh "Is there an \s-1ISO\s0 or \s-1ANSI\s0 certified version of Perl?".IX Subsection "Is there an ISO or ANSI certified version of Perl?"Certainly not. Larry expects that he'll be certified before Perl is..Sh "Where can I get information on Perl?".IX Subsection "Where can I get information on Perl?"The complete Perl documentation is available with the Perl distribution.If you have Perl installed locally, you probably have the documentationinstalled as well: type \f(CW\*(C`man perl\*(C'\fR if you're on a system resembling Unix.This will lead you to other important man pages, including how to set your\&\f(CW$MANPATH\fR. If you're not on a Unix system, access to the documentationwill be different; for example, documentation might only be in \s-1HTML\s0 format. Allproper perl installations have fully-accessible documentation..PPYou might also try \f(CW\*(C`perldoc perl\*(C'\fR in case your system doesn'thave a proper man command, or it's been misinstalled. If that doesn'twork, try looking in /usr/local/lib/perl5/pod for documentation..PPIf all else fails, consult http://perldoc.perl.org/ which has thecomplete documentation in \s-1HTML\s0 and \s-1PDF\s0 format..PPMany good books have been written about Perl\*(--see the section later inperlfaq2 for more details..PPTutorial documents are included in current or upcoming Perl releasesinclude perltoot for objects or perlboot for a beginner'sapproach to objects, perlopentut for file opening semantics,perlreftut for managing references, perlretut for regularexpressions, perlthrtut for threads, perldebtut for debugging,and perlxstut for linking C and Perl together. There may be moreby the time you read this. These URLs might also be useful:.PP.Vb 2\& http://perldoc.perl.org/\& http://bookmarks.cpan.org/search.cgi?cat=Training%2FTutorials.Ve.Sh "What are the Perl newsgroups on Usenet? Where do I post questions?".IX Subsection "What are the Perl newsgroups on Usenet? Where do I post questions?"Several groups devoted to the Perl language are on Usenet:.PP.Vb 5\& comp.lang.perl.announce Moderated announcement group\& comp.lang.perl.misc High traffic general Perl discussion\& comp.lang.perl.moderated Moderated discussion group\& comp.lang.perl.modules Use and development of Perl modules\& comp.lang.perl.tk Using Tk (and X) from Perl\&\& comp.infosystems.www.authoring.cgi Writing CGI scripts for the Web..Ve.PPSome years ago, comp.lang.perl was divided into those groups, andcomp.lang.perl itself officially removed. While that group may stillbe found on some news servers, it is unwise to use it, becausepostings there will not appear on news servers which honour theofficial list of group names. Use comp.lang.perl.misc for topicswhich do not have a more-appropriate specific group..PPThere is also a Usenet gateway to Perl mailing lists sponsored byperl.org at nntp://nntp.perl.org , a web interface to the same lists
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -