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