.\" Automatically generated by Pod::Man 2.25 (Pod::Simple 3.16) .\" .\" Standard preamble: .\" ======================================================================== .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 (.SS), 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 "2011-09-26" "perl v5.14.2" "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 .SH "DESCRIPTION" .IX Header "DESCRIPTION" This section of the \s-1FAQ\s0 answers questions about where to find source and documentation for Perl, support, and related matters. .SS "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 perl development team) is distributed only in source code form. You can find the latest releases at http://www.cpan.org/src/README.html . .PP Perl builds and runs on a bewildering number of platforms. Virtually all known and current Unix derivatives are supported (perl's native platform), 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. .PP Binary distributions for some proprietary platforms can be found http://www.cpan.org/ports/ directory. Because these are not part of the standard distribution, they may and 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 just what the differences are. These differences can be either positive (e.g. extensions for the features of the particular platform that are not supported in the source release of perl) or negative (e.g. might be based upon a less current source release of perl). .SS "How can I get a binary version of perl?" .IX Subsection "How can I get a binary version of perl?" (contributed by brian d foy) .PP ActiveState: Windows, Linux, Mac \s-1OS\s0 X, Solaris, \s-1AIX\s0 and HP-UX .PP .Vb 1 \& http://www.activestate.com/ .Ve .PP Sunfreeware.com: Solaris 2.5 to Solaris 10 (\s-1SPARC\s0 and x86) .PP .Vb 1 \& http://www.sunfreeware.com/ .Ve .PP Strawberry Perl: Windows, Perl 5.8.8 and 5.10.0 .PP .Vb 1 \& http://www.strawberryperl.com .Ve .PP IndigoPerl: Windows .PP .Vb 1 \& http://indigostar.com/ .Ve .SS "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 vendor should be sacrificed to the Sun gods. But that doesn't help you. .PP What you need to do is get a binary version of \f(CW\*(C`gcc\*(C'\fR for your system first. Consult the Usenet FAQs for your operating system for information on where to get such a binary version. .PP You might look around the net for a pre-built binary of Perl (or a C compiler!) that meets your needs, though: .PP For 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 Perl ready-to-use. .PP For Sun systems, SunFreeware.com provides binaries of most popular applications, including compilers and Perl. .SS "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 will eventually live on, and then type \f(CW\*(C`make install\*(C'\fR. Most other approaches are doomed to failure. .PP One simple way to check that things are in the right place is to print out the hard-coded \f(CW@INC\fR that perl looks through for libraries: .PP .Vb 1 \& % perl \-le \*(Aqprint for @INC\*(Aq .Ve .PP If this command lists any paths that don't exist on your system, then you may need to move the appropriate libraries to these locations, or create symbolic links, aliases, or shortcuts appropriately. \f(CW@INC\fR is also printed as part of the output of .PP .Vb 1 \& % perl \-V .Ve .PP You might also want to check out \&\*(L"How do I keep my own module/library directory?\*(R" in perlfaq8. .SS "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 the \&\f(CW\*(C`Configure\*(C'\fR script can't work around for any given system or architecture. .SS "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-gigabyte archive replicated on hundreds of machines all over the world. \s-1CPAN\s0 contains source code, non-native ports, documentation, scripts, and many third-party modules and extensions, designed for everything from commercial database interfaces to keyboard/screen control to web walking and \s-1CGI\s0 scripts. The master web site for \s-1CPAN\s0 is http://www.cpan.org/ and there is the \s-1CPAN\s0 Multiplexer at http://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) for how this process works. Also, http://mirror.cpan.org/ has a nice interface to the http://www.cpan.org/MIRRORED.BY mirror directory. .PP See the \s-1CPAN\s0 \s-1FAQ\s0 at http://www.cpan.org/misc/cpan\-faq.html for answers to the most frequently asked questions about \s-1CPAN\s0 including how to become a mirror. .PP \&\f(CW\*(C`CPAN/path/...\*(C'\fR is a naming convention for files available on \s-1CPAN\s0 sites. \s-1CPAN\s0 indicates the base directory of a \s-1CPAN\s0 mirror, and the rest of the path is the path from that directory to the file. For instance, if you're using ftp://ftp.funet.fi/pub/languages/perl/CPAN as your \s-1CPAN\s0 site, the file \f(CW\*(C`CPAN/misc/japh\*(C'\fR is downloadable as ftp://ftp.funet.fi/pub/languages/perl/CPAN/misc/japh . .PP Considering that, as of 2006, there are over ten thousand existing modules in the archive, one probably exists to do nearly anything you can think of. Current categories under \f(CW\*(C`CPAN/modules/by\-category/\*(C'\fR include Perl core modules; development support; operating system interfaces; networking, devices, and interprocess communication; data type utilities; database interfaces; user interfaces; interfaces to other languages; filenames, file systems, and file locking; internationalization and locale; world wide web support; server and daemon utilities; archiving and compression; image manipulation; mail and news; control flow utilities; filehandle and I/O; Microsoft Windows modules; and miscellaneous modules. .PP See http://www.cpan.org/modules/00modlist.long.html or http://search.cpan.org/ for a more complete list of modules by category. .PP \&\s-1CPAN\s0 is a free service and is not affiliated with O'Reilly Media. .SS "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. .SS "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 documentation installed 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 documentation will be different; for example, documentation might only be in \s-1HTML\s0 format. All proper perl installations have fully-accessible documentation. .PP You might also try \f(CW\*(C`perldoc perl\*(C'\fR in case your system doesn't have a proper \f(CW\*(C`man\*(C'\fR command, or it's been misinstalled. If that doesn't work, try looking in \f(CW\*(C`/usr/local/lib/perl5/pod\*(C'\fR for documentation. .PP If all else fails, consult http://perldoc.perl.org/ which has the complete documentation in \s-1HTML\s0 and \s-1PDF\s0 format. .PP Many good books have been written about Perl\*(--see the section later in perlfaq2 for more details. .PP Tutorial documents included in current or upcoming Perl releases include perltoot for objects or perlboot for a beginner's approach to objects, perlopentut for file opening semantics, perlreftut for managing references, perlretut for regular expressions, perlthrtut for threads, perldebtut for debugging, and perlxstut for linking C and Perl together. There may be more by 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 .SS "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 .Ve .PP Some years ago, comp.lang.perl was divided into those groups, and comp.lang.perl itself officially removed. While that group may still be found on some news servers, it is unwise to use it, because postings there will not appear on news servers which honour the official list of group names. Use comp.lang.perl.misc for topics which do not have a more-appropriate specific group. .PP There is also a Usenet gateway to Perl mailing lists sponsored by perl.org at nntp://nntp.perl.org , a web interface to the same lists at http://nntp.perl.org/group/ and these lists are also available under the \f(CW\*(C`perl.*\*(C'\fR hierarchy at http://groups.google.com . Other groups are listed at http://lists.perl.org/ ( also known as http://lists.cpan.org/ ). .PP A nice place to ask questions is the PerlMonks site, http://www.perlmonks.org/ , or the Perl Beginners mailing list http://lists.perl.org/showlist.cgi?name=beginners . .PP Note that none of the above are supposed to write your code for you: asking questions about particular problems or general advice is fine, but asking someone to write your code for free is not very cool. .SS "Where should I post source code?" .IX Subsection "Where should I post source code?" You should post source code to whichever group is most appropriate, but feel free to cross-post to comp.lang.perl.misc. If you want to cross-post to alt.sources, please make sure it follows their posting standards, including setting the Followup-To header line to \s-1NOT\s0 include alt.sources; see their \s-1FAQ\s0 ( http://www.faqs.org/faqs/alt\-sources\-intro/ ) for details. .PP If you're just looking for software, first use Google ( http://www.google.com ), Google's Usenet search interface ( http://groups.google.com ), and \s-1CPAN\s0 Search ( http://search.cpan.org ). This is faster and more productive than just posting a request. .SS "Perl Books" .IX Subsection "Perl Books" There are many good books on Perl. See the perlbook documentation or ( http://books.perl.org ). .SS "Which magazines have Perl content?" .IX Subsection "Which magazines have Perl content?" \&\fIThe Perl Review\fR ( http://www.theperlreview.com ) focuses on Perl almost completely (although it sometimes sneaks in an article about another language). There's also \fI\f(CI$foo\fI Magazin\fR, a German magazine dedicated to Perl, at ( http://www.foo\-magazin.de ). .PP The \fIPerl-Zeitung\fR is a German-speaking magazine for Perl beginners (see http://perl\-zeitung.at.tf ). .PP Magazines that frequently carry quality articles on Perl include \fIThe Perl Review\fR ( http://www.theperlreview.com ), \fIUnix Review\fR ( http://www.unixreview.com/ ), \fILinux Magazine\fR ( http://www.linuxmagazine.com/ ), and Usenix's newsletter/magazine to its members, \fIlogin:\fR ( http://www.usenix.org/ ). .PP The Perl columns of Randal L. Schwartz are available on the web at http://www.stonehenge.com/merlyn/WebTechniques/ , http://www.stonehenge.com/merlyn/UnixReview/ , and http://www.stonehenge.com/merlyn/LinuxMag/ . .PP The first (and for a long time, only) periodical devoted to All Things Perl, \fIThe Perl Journal\fR contains tutorials, demonstrations, case studies, announcements, contests, and much more. \fI\s-1TPJ\s0\fR has columns on web development, databases, Win32 Perl, graphical programming, regular expressions, and networking, and sponsors the Obfuscated Perl Contest and the Perl Poetry Contests. Beginning in November 2002, \fI\s-1TPJ\s0\fR moved to a reader-supported monthly e\-zine format in which subscribers can download issues as \s-1PDF\s0 documents. In 2006, \fI\s-1TPJ\s0\fR merged with Dr. Dobbs Journal (online edition). To read old \fI\s-1TPJ\s0\fR articles, see http://www.ddj.com/ or brian d foy's index of online \s-1TPJ\s0 content ( http://www.perlmonks.org/index.pl?node_id=711609 ). .SS "What mailing lists are there for Perl?" .IX Subsection "What mailing lists are there for Perl?" Most of the major modules (\f(CW\*(C`Tk\*(C'\fR, \f(CW\*(C`CGI\*(C'\fR, \f(CW\*(C`libwww\-perl\*(C'\fR) have their own mailing lists. Consult the documentation that came with the module for subscription information. .PP A comprehensive list of Perl-related mailing lists can be found at: .PP .Vb 1 \& http://lists.perl.org/ .Ve .SS "Where are the archives for comp.lang.perl.misc?" .IX Subsection "Where are the archives for comp.lang.perl.misc?" The Google search engine now carries archived and searchable newsgroup content. .PP http://groups.google.com/group/comp.lang.perl.misc/topics .PP If you have a question, you can be sure someone has already asked the same question at some point on c.l.p.m. It requires some time and patience to sift through all the content but often you will find the answer you seek. .SS "Where can I buy a commercial version of perl?" .IX Subsection "Where can I buy a commercial version of perl?" In a real sense, perl already \fIis\fR commercial software: it has a license that you can grab and carefully read to your manager. It is distributed in releases and comes in well-defined packages. There is a very large user community and an extensive literature. The comp.lang.perl.* newsgroups and several of the mailing lists provide free answers to your questions in near real-time. Perl has traditionally been supported by Larry, scores of software designers and developers, and myriad programmers, all working for free to create a useful thing to make life better for everyone. .PP However, these answers may not suffice for managers who require a purchase order from a company whom they can sue should anything go awry. Or maybe they need very serious hand-holding and contractual obligations. Shrink-wrapped CDs with perl on them are available from several sources if that will help. For example, many Perl books include a distribution of perl, as do the O'Reilly Perl Resource Kits (in both the Unix flavor and in the proprietary Microsoft flavor); the free Unix distributions also all come with perl. .SS "Where do I send bug reports?" .IX Subsection "Where do I send bug reports?" (contributed by brian d foy) .PP First, ensure that you've found an actual bug. Second, ensure you've found an actual bug. .PP If you've found a bug with the perl interpreter or one of the modules in the standard library (those that come with Perl), you can use the perlbug utility that comes with Perl (>= 5.004). It collects information about your installation to include with your message, then sends the message to the right place. .PP To determine if a module came with your version of Perl, you can use the \f(CW\*(C`Module::CoreList\*(C'\fR module. It has the information about the modules (with their versions) included with each release of Perl. .PP If \f(CW\*(C`Module::CoreList\*(C'\fR is not installed on your system, check out http://perlpunks.de/corelist . .PP Every \s-1CPAN\s0 module has a bug tracker set up in \s-1RT\s0, http://rt.cpan.org . You can submit bugs to \s-1RT\s0 either through its web interface or by email. To email a bug report, send it to bug\-@rt.cpan.org . For example, if you wanted to report a bug in \f(CW\*(C`Business::ISBN\*(C'\fR, you could send a message to bug\-Business\-ISBN@rt.cpan.org . .PP Some modules might have special reporting requirements, such as a Sourceforge or Google Code tracking system, so you should check the module documentation too. .SS "What is perl.com? Perl Mongers? pm.org? perl.org? cpan.org?" .IX Subsection "What is perl.com? Perl Mongers? pm.org? perl.org? cpan.org?" Perl.com ( http://www.perl.com/ ) used to be part of the O'Reilly Network, a subsidiary of O'Reilly Media. Although it retains most of the original content from its O'Reilly Network, it is now hosted by The Perl Foundation. .PP The Perl Foundation is an advocacy organization for the Perl language which maintains the web site ( http://www.perl.org/ ) as a general advocacy site for the Perl language. It uses the domain to provide general support services to the Perl community, including the hosting of mailing lists, web sites, and other services. There are also many other sub-domains for special topics like learning Perl, Perl news, jobs in Perl, such as: .PP .Vb 4 \& http://www.perl.org/ \& http://learn.perl.org/ \& http://jobs.perl.org/ \& http://lists.perl.org/ .Ve .PP Perl Mongers uses the pm.org domain for services related to Perl user groups, including the hosting of mailing lists and web sites. See the Perl Mongers website ( http://www.pm.org/ ) for more information about joining, starting, or requesting services for a Perl user group. .PP \&\s-1CPAN\s0, or the Comprehensive Perl Archive Network ( http://www.cpan.org/ ), is a replicated, worldwide repository of Perl software. See \fIWhat is \s-1CPAN\s0?\fR in perlfaq2. .SH "AUTHOR AND COPYRIGHT" .IX Header "AUTHOR AND COPYRIGHT" Copyright (c) 1997\-2010 Tom Christiansen, Nathan Torkington, and other authors as noted. All rights reserved. .PP This documentation is free; you can redistribute it and/or modify it under the same terms as Perl itself. .PP Irrespective of its distribution, all code examples here are in the public domain. You are permitted and encouraged to use this code and any derivatives thereof in your own programs for fun or for profit as you see fit. A simple comment in the code giving credit to the \s-1FAQ\s0 would be courteous but is not required.