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