source: trunk/third/perl/pod/perlfaq2.pod @ 17035

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