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