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