This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Sync cfgperl with maint-5.005 change #3000.
[perl5.git] / pod / perlfaq2.pod
CommitLineData
68dc0745 1=head1 NAME
2
65acb1b1 3perlfaq2 - Obtaining and Learning about Perl ($Revision: 1.30 $, $Date: 1998/12/29 19:43:32 $)
68dc0745 4
5=head1 DESCRIPTION
6
7This section of the FAQ answers questions about where to find
92c2ed05 8source and documentation for Perl, support, and
68dc0745 9related matters.
10
11=head2 What machines support Perl? Where do I get it?
12
13The standard release of Perl (the one maintained by the perl
5e3006a4 14development team) is distributed only in source code form. You
65acb1b1 15can find this at http://www.perl.com/CPAN/src/latest.tar.gz , which
5e3006a4
GS
16in standard Internet format (a gzipped archive in POSIX tar format).
17
18Perl builds and runs on a bewildering number of platforms. Virtually
19all known and current Unix derivatives are supported (Perl's native
20platform), as are proprietary systems like VMS, DOS, OS/2, Windows,
21QNX, BeOS, and the Amiga. There are also the beginnings of support
22for MPE/iX.
23
24Binary distributions for some proprietary platforms, including
65acb1b1 25Apple systems, can be found http://www.perl.com/CPAN/ports/ directory.
5e3006a4
GS
26Because these are not part of the standard distribution, they may
27and in fact do differ from the base Perl port in a variety of ways.
28You'll have to check their respective release notes to see just
29what the differences are. These differences can be either positive
30(e.g. extensions for the features of the particular platform that
31are not supported in the source release of perl) or negative (e.g.
32might be based upon a less current source release of perl).
92c2ed05 33
68dc0745 34=head2 How can I get a binary version of Perl?
35
65acb1b1
TC
36If you don't have a C compiler because your vendor for whatever
37reasons did not include one with your system, the best thing to do is
68dc0745 38grab a binary version of gcc from the net and use that to compile perl
39with. CPAN only has binaries for systems that are terribly hard to
40get free compilers for, not for Unix systems.
41
65acb1b1
TC
42Some URLs that might help you are:
43
44 http://language.perl.com/info/software.html
45 http://www.perl.com/latest/
46 http://www.perl.com/CPAN/ports/
47
48If you want information on proprietary systems. A simple installation
49guide for MS-DOS is available at http://www.cs.ruu.nl/~piet/perl5dos.html
50and similarly for Windows 3.1 at http://www.cs.ruu.nl/~piet/perlwin3.html .
3fe9a6f1 51
52=head2 I don't have a C compiler on my system. How can I compile perl?
53
54Since you don't have a C compiler, you're doomed and your vendor
55should be sacrificed to the Sun gods. But that doesn't help you.
56
57What you need to do is get a binary version of gcc for your system
58first. Consult the Usenet FAQs for your operating system for
59information on where to get such a binary version.
60
68dc0745 61=head2 I copied the Perl binary from one machine to another, but scripts don't work.
62
63That's probably because you forgot libraries, or library paths differ.
64You really should build the whole distribution on the machine it will
65eventually live on, and then type C<make install>. Most other
66approaches are doomed to failure.
67
68One simple way to check that things are in the right place is to print out
46fc3d4c 69the hard-coded @INC which perl is looking for.
68dc0745 70
65acb1b1 71 % perl -e 'print join("\n",@INC)'
68dc0745 72
73If this command lists any paths which don't exist on your system, then you
74may need to move the appropriate libraries to these locations, or create
65acb1b1
TC
75symlinks, aliases, or shortcuts appropriately. @INC is also printed as
76part of the output of
77
78 % perl -V
68dc0745 79
3fe9a6f1 80You might also want to check out L<perlfaq8/"How do I keep my own
81module/library directory?">.
82
68dc0745 83=head2 I grabbed the sources and tried to compile but gdbm/dynamic loading/malloc/linking/... failed. How do I make it work?
84
85Read the F<INSTALL> file, which is part of the source distribution.
65acb1b1 86It describes in detail how to cope with most idiosyncrasies that the
68dc0745 87Configure script can't work around for any given system or
88architecture.
89
90=head2 What modules and extensions are available for Perl? What is CPAN? What does CPAN/src/... mean?
91
92CPAN stands for Comprehensive Perl Archive Network, a huge archive
93replicated on dozens of machines all over the world. CPAN contains
46fc3d4c 94source code, non-native ports, documentation, scripts, and many
68dc0745 95third-party modules and extensions, designed for everything from
96commercial database interfaces to keyboard/screen control to web
97walking and CGI scripts. The master machine for CPAN is
98ftp://ftp.funet.fi/pub/languages/perl/CPAN/, but you can use the
99address http://www.perl.com/CPAN/CPAN.html to fetch a copy from a
100"site near you". See http://www.perl.com/CPAN (without a slash at the
101end) for how this process works.
102
103CPAN/path/... is a naming convention for files available on CPAN
104sites. CPAN indicates the base directory of a CPAN mirror, and the
105rest of the path is the path from that directory to the file. For
106instance, if you're using ftp://ftp.funet.fi/pub/languages/perl/CPAN
107as your CPAN site, the file CPAN/misc/japh file is downloadable as
108ftp://ftp.funet.fi/pub/languages/perl/CPAN/misc/japh .
109
110Considering that there are hundreds of existing modules in the
111archive, one probably exists to do nearly anything you can think of.
112Current categories under CPAN/modules/by-category/ include perl core
113modules; development support; operating system interfaces; networking,
114devices, and interprocess communication; data type utilities; database
115interfaces; user interfaces; interfaces to other languages; filenames,
116file systems, and file locking; internationalization and locale; world
117wide web support; server and daemon utilities; archiving and
118compression; image manipulation; mail and news; control flow
119utilities; filehandle and I/O; Microsoft Windows modules; and
120miscellaneous modules.
121
122=head2 Is there an ISO or ANSI certified version of Perl?
123
124Certainly not. Larry expects that he'll be certified before Perl is.
125
126=head2 Where can I get information on Perl?
127
5a964f20
TC
128The complete Perl documentation is available with the perl distribution.
129If you have perl installed locally, you probably have the documentation
130installed as well: type C<man perl> if you're on a system resembling Unix.
131This will lead you to other important man pages, including how to set your
132$MANPATH. If you're not on a Unix system, access to the documentation
133will be different; for example, it might be only in HTML format. But all
134proper perl installations have fully-accessible documentation.
68dc0745 135
136You might also try C<perldoc perl> in case your system doesn't
137have a proper man command, or it's been misinstalled. If that doesn't
138work, try looking in /usr/local/lib/perl5/pod for documentation.
139
140If all else fails, consult the CPAN/doc directory, which contains the
141complete documentation in various formats, including native pod,
142troff, html, and plain text. There's also a web page at
143http://www.perl.com/perl/info/documentation.html that might help.
144
68dc0745 145Many good books have been written about Perl -- see the section below
146for more details.
147
65acb1b1
TC
148Tutorial documents are included in current or upcoming Perl releases
149include L<perltoot> for objects, L<perlopentut> for file opening
150semantics, L<perlreftut> for managing references, and L<perlxstut>
151for linking C and Perl together. There may be more by the
152time you read this. The following URLs might also be of
153assistance:
154
155 http://language.perl.com/info/documentation.html
156 http://reference.perl.com/query.cgi?tutorials
157
68dc0745 158=head2 What are the Perl newsgroups on USENET? Where do I post questions?
159
160The now defunct comp.lang.perl newsgroup has been superseded by the
161following groups:
162
163 comp.lang.perl.announce Moderated announcement group
164 comp.lang.perl.misc Very busy group about Perl in general
5a964f20 165 comp.lang.perl.moderated Moderated discussion group
68dc0745 166 comp.lang.perl.modules Use and development of Perl modules
167 comp.lang.perl.tk Using Tk (and X) from Perl
168
169 comp.infosystems.www.authoring.cgi Writing CGI scripts for the Web.
170
171There is also USENET gateway to the mailing list used by the crack
172Perl development team (perl5-porters) at
5a964f20 173news://news.perl.com/perl.porters-gw/ .
68dc0745 174
175=head2 Where should I post source code?
176
65acb1b1
TC
177You should post source code to whichever group is most appropriate, but
178feel free to cross-post to comp.lang.perl.misc. If you want to cross-post
179to alt.sources, please make sure it follows their posting standards,
180including setting the Followup-To header line to NOT include alt.sources;
181see their FAQ (http://www.faqs.org/faqs/alt-sources-intro/) for details.
68dc0745 182
5a964f20
TC
183If you're just looking for software, first use Alta Vista, Deja News, and
184search CPAN. This is faster and more productive than just posting
185a request.
186
68dc0745 187=head2 Perl Books
188
7b8d334a 189A number of books on Perl and/or CGI programming are available. A few of
68dc0745 190these are good, some are ok, but many aren't worth your money. Tom
191Christiansen maintains a list of these books, some with extensive
192reviews, at http://www.perl.com/perl/critiques/index.html.
193
5e3006a4
GS
194The incontestably definitive reference book on Perl, written by
195the creator of Perl, is now in its second edition:
68dc0745 196
197 Programming Perl (the "Camel Book"):
65acb1b1 198 by Larry Wall, Tom Christiansen, and Randal Schwartz
68dc0745 199 ISBN 1-56592-149-6 (English)
200 ISBN 4-89052-384-7 (Japanese)
5e3006a4
GS
201 URL: http://www.oreilly.com/catalog/pperl2/
202 (French, German, Italian, and Hungarian translations also
203 available)
68dc0745 204
5e3006a4
GS
205The companion volume to the Camel containing thousands
206of real-world examples, mini-tutorials, and complete programs
207(first premiering at the 1998 Perl Conference), is:
208
209 The Perl Cookbook (the "Ram Book"):
65acb1b1 210 by Tom Christiansen and Nathan Torkington,
5e3006a4
GS
211 with Foreword by Larry Wall
212 ISBN: 1-56592-243-3
213 URL: http://perl.oreilly.com/cookbook/
68dc0745 214
5a964f20
TC
215If you're already a hard-core systems programmer, then the Camel Book
216might suffice for you to learn Perl from. But if you're not, check
5e3006a4
GS
217out:
218
219 Learning Perl (the "Llama Book"):
65acb1b1 220 by Randal Schwartz and Tom Christiansen
5e3006a4
GS
221 with Foreword by Larry Wall
222 ISBN: 1-56592-284-0
223 URL: http://www.oreilly.com/catalog/lperl2/
224
225Despite the picture at the URL above, the second edition of "Llama
226Book" really has a blue cover, and is updated for the 5.004 release
227of Perl. Various foreign language editions are available, including
228I<Learning Perl on Win32 Systems> (the Gecko Book).
5a964f20
TC
229
230If you're not an accidental programmer, but a more serious and possibly
231even degreed computer scientist who doesn't need as much hand-holding as
232we try to provide in the Llama or its defurred cousin the Gecko, please
233check out the delightful book, I<Perl: The Programmer's Companion>,
234written by Nigel Chapman.
235
c8db1d39 236You can order O'Reilly books directly from O'Reilly & Associates,
5a964f20
TC
2371-800-998-9938. Local/overseas is 1-707-829-0515. If you can
238locate an O'Reilly order form, you can also fax to 1-707-829-0104.
239See http://www.ora.com/ on the Web.
240
68dc0745 241What follows is a list of the books that the FAQ authors found personally
242useful. Your mileage may (but, we hope, probably won't) vary.
243
65acb1b1 244Recommended books on (or mostly on) Perl follow; those marked with
5e3006a4 245a star may be ordered from O'Reilly.
68dc0745 246
5a964f20 247=over
68dc0745 248
5a964f20 249=item References
68dc0745 250
5a964f20
TC
251 *Programming Perl
252 by Larry Wall, Tom Christiansen, and Randal L. Schwartz
68dc0745 253
5a964f20
TC
254 *Perl 5 Desktop Reference
255 By Johan Vromans
68dc0745 256
5a964f20
TC
257=item Tutorials
258
259 *Learning Perl [2nd edition]
260 by Randal L. Schwartz and Tom Christiansen
5e3006a4 261 with foreword by Larry Wall
68dc0745 262
5a964f20
TC
263 *Learning Perl on Win32 Systems
264 by Randal L. Schwartz, Erik Olson, and Tom Christiansen,
265 with foreword by Larry Wall
68dc0745 266
5a964f20
TC
267 Perl: The Programmer's Companion
268 by Nigel Chapman
68dc0745 269
5a964f20
TC
270 Cross-Platform Perl
271 by Eric F. Johnson
68dc0745 272
5a964f20
TC
273 MacPerl: Power and Ease
274 by Vicki Brown and Chris Nandor, foreword by Matthias Neeracher
68dc0745 275
65acb1b1 276=item Task-Oriented
5a964f20
TC
277
278 *The Perl Cookbook
279 by Tom Christiansen and Nathan Torkington
280 with foreword by Larry Wall
281
282 Perl5 Interactive Course [2nd edition]
283 by Jon Orwant
284
285 *Advanced Perl Programming
286 by Sriram Srinivasan
68dc0745 287
5a964f20
TC
288 Effective Perl Programming
289 by Joseph Hall
68dc0745 290
5a964f20
TC
291=item Special Topics
292
293 *Mastering Regular Expressions
294 by Jeffrey Friedl
295
296 How to Set up and Maintain a World Wide Web Site [2nd edition]
297 by Lincoln Stein
298
299=back
300
301=head2 Perl in Magazines
302
303The first and only periodical devoted to All Things Perl, I<The
304Perl Journal> contains tutorials, demonstrations, case studies,
305announcements, contests, and much more. TPJ has columns on web
306development, databases, Win32 Perl, graphical programming, regular
5e3006a4
GS
307expressions, and networking, and sponsors the Obfuscated Perl
308Contest. It is published quarterly under the gentle hand of its
309editor, Jon Orwant. See http://www.tpj.com/ or send mail to
65acb1b1 310subscriptions@tpj.com .
5a964f20
TC
311
312Beyond this, magazines that frequently carry high-quality articles
313on Perl are I<Web Techniques> (see http://www.webtechniques.com/),
c8db1d39 314I<Performance Computing> (http://www.performance-computing.com/), and Usenix's
5a964f20
TC
315newsletter/magazine to its members, I<login:>, at http://www.usenix.org/.
316Randal's Web Technique's columns are available on the web at
317http://www.stonehenge.com/merlyn/WebTechniques/.
68dc0745 318
319=head2 Perl on the Net: FTP and WWW Access
320
321To get the best (and possibly cheapest) performance, pick a site from
322the list below and use it to grab the complete list of mirror sites.
65acb1b1 323>From there you can find the quickest site for you. Remember, the
68dc0745 324following list is I<not> the complete list of CPAN mirrors.
325
65acb1b1
TC
326 http://www.perl.com/CPAN-local
327 http://www.perl.com/CPAN (redirects to an ftp mirror)
68dc0745 328 http://www.perl.org/CPAN
329 ftp://ftp.funet.fi/pub/languages/perl/CPAN/
330 http://www.cs.ruu.nl/pub/PERL/CPAN/
331 ftp://ftp.cs.colorado.edu/pub/perl/CPAN/
332
333=head2 What mailing lists are there for perl?
334
335Most of the major modules (tk, CGI, libwww-perl) have their own
336mailing lists. Consult the documentation that came with the module for
65acb1b1
TC
337subscription information. The Perl Institute attempts to maintain a
338list of mailing lists at:
68dc0745 339
65acb1b1 340 http://www.perl.org/maillist.html
68dc0745 341
65acb1b1 342=head2 Archives of comp.lang.perl.misc
68dc0745 343
65acb1b1
TC
344Have you tried Deja News or Alta Vista? Those are the
345best archives. Just look up "*perl*" as a newsgroup.
68dc0745 346
65acb1b1 347 http://www.dejanews.com/dnquery.xp?QRY=&DBS=2&ST=PS&defaultOp=AND&LNG=ALL&format=terse&showsort=date&maxhits=25&subjects=&groups=*perl*&authors=&fromdate=&todate=
68dc0745 348
65acb1b1 349You'll probably want to trim that down a bit, though.
68dc0745 350
351ftp.cis.ufl.edu:/pub/perl/comp.lang.perl.*/monthly has an almost
352complete collection dating back to 12/89 (missing 08/91 through
35312/93). They are kept as one large file for each month.
354
355You'll probably want more a sophisticated query and retrieval mechanism
356than a file listing, preferably one that allows you to retrieve
357articles using a fast-access indices, keyed on at least author, date,
358subject, thread (as in "trn") and probably keywords. The best
359solution the FAQ authors know of is the MH pick command, but it is
360very slow to select on 18000 articles.
361
362If you have, or know where can be found, the missing sections, please
363let perlfaq-suggestions@perl.com know.
364
68dc0745 365=head2 Where can I buy a commercial version of Perl?
366
65acb1b1
TC
367In a real sense, Perl already I<is> commercial software: It has a licence
368that you can grab and carefully read to your manager. It is distributed
369in releases and comes in well-defined packages. There is a very large
370user community and an extensive literature. The comp.lang.perl.*
371newsgroups and several of the mailing lists provide free answers to your
372questions in near real-time. Perl has traditionally been supported by
373Larry, scores of software designers and developers, and myriads of
374programmers, all working for free to create a useful thing to make life
375better for everyone.
68dc0745 376
377However, these answers may not suffice for managers who require a
65acb1b1
TC
378purchase order from a company whom they can sue should anything go awry.
379Or maybe they need very serious hand-holding and contractual obligations.
380Shrink-wrapped CDs with perl on them are available from several sources if
381that will help. For example, many perl books carry a perl distribution
382on them, as do the O'Reily Perl Resource Kits (in both the Unix flavor
383and in the proprietary Microsoft flavor); the free Unix distributions
384also all come with Perl.
68dc0745 385
386Or you can purchase a real support contract. Although Cygnus historically
387provided this service, they no longer sell support contracts for Perl.
388Instead, the Paul Ingram Group will be taking up the slack through The
389Perl Clinic. The following is a commercial from them:
390
391"Do you need professional support for Perl and/or Oraperl? Do you need
392a support contract with defined levels of service? Do you want to pay
393only for what you need?
394
395"The Paul Ingram Group has provided quality software development and
396support services to some of the world's largest corporations for ten
397years. We are now offering the same quality support services for Perl
398at The Perl Clinic. This service is led by Tim Bunce, an active perl
399porter since 1994 and well known as the author and maintainer of the
400DBI, DBD::Oracle, and Oraperl modules and author/co-maintainer of The
401Perl 5 Module List. We also offer Oracle users support for Perl5
402Oraperl and related modules (which Oracle is planning to ship as part
403of Oracle Web Server 3). 20% of the profit from our Perl support work
404will be donated to The Perl Institute."
405
65acb1b1 406For more information, contact The Perl Clinic:
68dc0745 407
408 Tel: +44 1483 424424
409 Fax: +44 1483 419419
410 Web: http://www.perl.co.uk/
411 Email: perl-support-info@perl.co.uk or Tim.Bunce@ig.co.uk
412
65acb1b1 413See also www.perl.com for updates on tutorials, training, and support.
5e3006a4 414
68dc0745 415=head2 Where do I send bug reports?
416
417If you are reporting a bug in the perl interpreter or the modules
5a964f20 418shipped with perl, use the I<perlbug> program in the perl distribution or
65acb1b1 419mail your report to perlbug@perl.com .
68dc0745 420
46fc3d4c 421If you are posting a bug with a non-standard port (see the answer to
68dc0745 422"What platforms is Perl available for?"), a binary distribution, or a
46fc3d4c 423non-standard module (such as Tk, CGI, etc), then please see the
68dc0745 424documentation that came with it to determine the correct place to post
425bugs.
426
5a964f20 427Read the perlbug(1) man page (perl5.004 or later) for more information.
68dc0745 428
65acb1b1 429=head2 What is perl.com?
68dc0745 430
65acb1b1 431The perl.com domain is owned by Tom Christiansen, who created it as a
5a964f20
TC
432public service long before perl.org came about. Despite the name, it's a
433pretty non-commercial site meant to be a clearinghouse for information
434about all things Perlian, accepting no paid advertisements, bouncy
435happy gifs, or silly java applets on its pages. The Perl Home Page at
436http://www.perl.com/ is currently hosted on a T3 line courtesy of Songline
437Systems, a software-oriented subsidiary of O'Reilly and Associates.
65acb1b1 438Other starting points include
5a964f20 439
65acb1b1
TC
440 http://language.perl.com/
441 http://conference.perl.com/
442 http://reference.perl.com/
68dc0745 443
444=head1 AUTHOR AND COPYRIGHT
445
65acb1b1 446Copyright (c) 1997-1999 Tom Christiansen and Nathan Torkington.
5a964f20
TC
447All rights reserved.
448
c8db1d39 449When included as an integrated part of the Standard Distribution
c2611fb3 450of Perl or of its documentation (printed or otherwise), this work is
c8db1d39
TC
451covered under Perl's Artistic Licence. For separate distributions of
452all or part of this FAQ outside of that, see L<perlfaq>.
453
454Irrespective of its distribution, all code examples here are public
455domain. You are permitted and encouraged to use this code and any
456derivatives thereof in your own programs for fun or for profit as you
457see fit. A simple comment in the code giving credit to the FAQ would
458be courteous but is not required.
65acb1b1 459