This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Unused 'cv'
[perl5.git] / pod / perlfaq2.pod
... / ...
CommitLineData
1=head1 NAME
2
3perlfaq2 - Obtaining and Learning about Perl ($Revision: 10144 $)
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
35For Windows, ActiveState provides a pre-built Perl for free:
36
37 http://www.activestate.com/
38
39Sunfreeware.com provides binaries for many utilities, including
40Perl, for Solaris on both Intel and SPARC hardware:
41
42 http://www.sunfreeware.com/
43
44If you don't have a C compiler because your vendor for whatever
45reasons did not include one with your system, the best thing to do is
46grab a binary version of gcc from the net and use that to compile perl
47with. CPAN only has binaries for systems that are terribly hard to
48get free compilers for, not for Unix systems.
49
50Some URLs that might help you are:
51
52 http://www.cpan.org/ports/
53 http://www.perl.com/pub/language/info/software.html
54
55Someone looking for a perl for Win16 might look to Laszlo Molnar's
56djgpp port in http://www.cpan.org/ports/#msdos , which comes with
57clear installation instructions.
58
59=head2 I don't have a C compiler. How can I build my own Perl interpreter?
60
61Since you don't have a C compiler, you're doomed and your vendor
62should be sacrificed to the Sun gods. But that doesn't help you.
63
64What you need to do is get a binary version of gcc for your system
65first. Consult the Usenet FAQs for your operating system for
66information on where to get such a binary version.
67
68You might look around the net for a pre-built binary of Perl (or a
69C compiler!) that meets your needs, though:
70
71For Windows, Vanilla Perl ( http://vanillaperl.com/ ) and Strawberry Perl
72( http://strawberryperl.com/ ) come with a
73bundled C compiler. ActivePerl is a pre-compiled version of Perl
74ready-to-use.
75
76For Sun systems, SunFreeware.com provides binaries of most popular
77applications, including compilers and Perl.
78
79=head2 I copied the perl binary from one machine to another, but scripts don't work.
80
81That's probably because you forgot libraries, or library paths differ.
82You really should build the whole distribution on the machine it will
83eventually live on, and then type C<make install>. Most other
84approaches are doomed to failure.
85
86One simple way to check that things are in the right place is to print out
87the hard-coded @INC that perl looks through for libraries:
88
89 % perl -le 'print for @INC'
90
91If this command lists any paths that don't exist on your system, then you
92may need to move the appropriate libraries to these locations, or create
93symbolic links, aliases, or shortcuts appropriately. @INC is also printed as
94part of the output of
95
96 % perl -V
97
98You might also want to check out
99L<perlfaq8/"How do I keep my own module/library directory?">.
100
101=head2 I grabbed the sources and tried to compile but gdbm/dynamic loading/malloc/linking/... failed. How do I make it work?
102
103Read the F<INSTALL> file, which is part of the source distribution.
104It describes in detail how to cope with most idiosyncrasies that the
105Configure script can't work around for any given system or
106architecture.
107
108=head2 What modules and extensions are available for Perl? What is CPAN? What does CPAN/src/... mean?
109
110CPAN stands for Comprehensive Perl Archive Network, a multi-gigabyte
111archive replicated on hundreds of machines all over the world. CPAN
112contains source code, non-native ports, documentation, scripts, and
113many third-party modules and extensions, designed for everything from
114commercial database interfaces to keyboard/screen control to web
115walking and CGI scripts. The master web site for CPAN is
116http://www.cpan.org/ and there is the CPAN Multiplexer at
117http://www.cpan.org/CPAN.html which will choose a mirror near you via
118DNS. See http://www.perl.com/CPAN (without a slash at the end) for
119how this process works. Also, http://mirror.cpan.org/ has a nice
120interface to the http://www.cpan.org/MIRRORED.BY mirror directory.
121
122See the CPAN FAQ at http://www.cpan.org/misc/cpan-faq.html for answers
123to the most frequently asked questions about CPAN including how to
124become a mirror.
125
126CPAN/path/... is a naming convention for files available on CPAN
127sites. CPAN indicates the base directory of a CPAN mirror, and the
128rest of the path is the path from that directory to the file. For
129instance, if you're using ftp://ftp.funet.fi/pub/languages/perl/CPAN
130as your CPAN site, the file CPAN/misc/japh is downloadable as
131ftp://ftp.funet.fi/pub/languages/perl/CPAN/misc/japh .
132
133Considering that, as of 2006, there are over ten thousand existing
134modules in the archive, one probably exists to do nearly anything you
135can think of. Current categories under CPAN/modules/by-category/
136include Perl core modules; development support; operating system
137interfaces; networking, devices, and interprocess communication; data
138type utilities; database interfaces; user interfaces; interfaces to
139other languages; filenames, file systems, and file locking;
140internationalization and locale; world wide web support; server and
141daemon utilities; archiving and compression; image manipulation; mail
142and news; control flow utilities; filehandle and I/O; Microsoft
143Windows modules; and miscellaneous modules.
144
145See http://www.cpan.org/modules/00modlist.long.html or
146http://search.cpan.org/ for a more complete list of modules by
147category.
148
149CPAN is a free service and is not affiliated with O'Reilly Media.
150
151=head2 Is there an ISO or ANSI certified version of Perl?
152
153Certainly not. Larry expects that he'll be certified before Perl is.
154
155=head2 Where can I get information on Perl?
156
157The complete Perl documentation is available with the Perl distribution.
158If you have Perl installed locally, you probably have the documentation
159installed as well: type C<man perl> if you're on a system resembling Unix.
160This will lead you to other important man pages, including how to set your
161$MANPATH. If you're not on a Unix system, access to the documentation
162will be different; for example, documentation might only be in HTML format. All
163proper perl installations have fully-accessible documentation.
164
165You might also try C<perldoc perl> in case your system doesn't
166have a proper man command, or it's been misinstalled. If that doesn't
167work, try looking in /usr/local/lib/perl5/pod for documentation.
168
169If all else fails, consult http://perldoc.perl.org/ which has the
170complete documentation in HTML and PDF format.
171
172Many good books have been written about Perl--see the section later in
173L<perlfaq2> for more details.
174
175Tutorial documents are included in current or upcoming Perl releases
176include L<perltoot> for objects or L<perlboot> for a beginner's
177approach to objects, L<perlopentut> for file opening semantics,
178L<perlreftut> for managing references, L<perlretut> for regular
179expressions, L<perlthrtut> for threads, L<perldebtut> for debugging,
180and L<perlxstut> for linking C and Perl together. There may be more
181by the time you read this. These URLs might also be useful:
182
183 http://perldoc.perl.org/
184 http://bookmarks.cpan.org/search.cgi?cat=Training%2FTutorials
185
186=head2 What are the Perl newsgroups on Usenet? Where do I post questions?
187
188Several groups devoted to the Perl language are on Usenet:
189
190 comp.lang.perl.announce Moderated announcement group
191 comp.lang.perl.misc High traffic general Perl discussion
192 comp.lang.perl.moderated Moderated discussion group
193 comp.lang.perl.modules Use and development of Perl modules
194 comp.lang.perl.tk Using Tk (and X) from Perl
195
196 comp.infosystems.www.authoring.cgi Writing CGI scripts for the Web.
197
198Some years ago, comp.lang.perl was divided into those groups, and
199comp.lang.perl itself officially removed. While that group may still
200be found on some news servers, it is unwise to use it, because
201postings there will not appear on news servers which honour the
202official list of group names. Use comp.lang.perl.misc for topics
203which do not have a more-appropriate specific group.
204
205There is also a Usenet gateway to Perl mailing lists sponsored by
206perl.org at nntp://nntp.perl.org , a web interface to the same lists
207at http://nntp.perl.org/group/ and these lists are also available
208under the C<perl.*> hierarchy at http://groups.google.com . Other
209groups are listed at http://lists.perl.org/ ( also known as
210http://lists.cpan.org/ ).
211
212A nice place to ask questions is the PerlMonks site,
213http://www.perlmonks.org/ , or the Perl Beginners mailing list
214http://lists.perl.org/showlist.cgi?name=beginners .
215
216Note that none of the above are supposed to write your code for you:
217asking questions about particular problems or general advice is fine,
218but asking someone to write your code for free is not very cool.
219
220=head2 Where should I post source code?
221
222You should post source code to whichever group is most appropriate, but
223feel free to cross-post to comp.lang.perl.misc. If you want to cross-post
224to alt.sources, please make sure it follows their posting standards,
225including setting the Followup-To header line to NOT include alt.sources;
226see their FAQ ( http://www.faqs.org/faqs/alt-sources-intro/ ) for details.
227
228If you're just looking for software, first use Google
229( http://www.google.com ), Google's usenet search interface
230( http://groups.google.com ), and CPAN Search ( http://search.cpan.org ).
231This is faster and more productive than just posting a request.
232
233=head2 Perl Books
234
235A number of books on Perl and/or CGI programming are available. A few
236of these are good, some are OK, but many aren't worth your money.
237There is a list of these books, some with extensive reviews, at
238http://books.perl.org/ . If you don't see your book listed here, you
239can write to perlfaq-workers@perl.org .
240
241The incontestably definitive reference book on Perl, written by
242the creator of Perl, is Programming Perl:
243
244 Programming Perl (the "Camel Book"):
245 by Larry Wall, Tom Christiansen, and Jon Orwant
246 ISBN 0-596-00027-8 [3rd edition July 2000]
247 http://www.oreilly.com/catalog/pperl3/
248 (English, translations to several languages are also available)
249
250The companion volume to the Camel containing thousands
251of real-world examples, mini-tutorials, and complete programs is:
252
253 The Perl Cookbook (the "Ram Book"):
254 by Tom Christiansen and Nathan Torkington,
255 with Foreword by Larry Wall
256 ISBN 0-596-00313-7 [2nd Edition August 2003]
257 http://www.oreilly.com/catalog/perlckbk2/
258
259If you're already a seasoned programmer, then the Camel Book might
260suffice for you to learn Perl. If you're not, check out the
261Llama book:
262
263 Learning Perl
264 by Randal L. Schwartz, Tom Phoenix, and brian d foy
265 ISBN 0-596-10105-8 [4th edition July 2005]
266 http://www.oreilly.com/catalog/learnperl4/
267
268And for more advanced information on writing larger programs,
269presented in the same style as the Llama book, continue your education
270with the Alpaca book:
271
272 Intermediate Perl (the "Alpaca Book")
273 by Randal L. Schwartz and brian d foy, with Tom Phoenix (foreword by Damian Conway)
274 ISBN 0-596-10206-2 [1st edition March 2006]
275 http://www.oreilly.com/catalog/lrnperlorm/
276
277Addison-Wesley ( http://www.awlonline.com/ ) and Manning
278( http://www.manning.com/ ) are also publishers of some fine Perl books
279such as I<Object Oriented Programming with Perl> by Damian Conway and
280I<Network Programming with Perl> by Lincoln Stein.
281
282An excellent technical book discounter is Bookpool at
283http://www.bookpool.com/ where a 30% discount or more is not unusual.
284
285What follows is a list of the books that the FAQ authors found personally
286useful. Your mileage may (but, we hope, probably won't) vary.
287
288Recommended books on (or mostly on) Perl follow.
289
290=over 4
291
292=item References
293
294 Programming Perl
295 by Larry Wall, Tom Christiansen, and Jon Orwant
296 ISBN 0-596-00027-8 [3rd edition July 2000]
297 http://www.oreilly.com/catalog/pperl3/
298
299 Perl 5 Pocket Reference
300 by Johan Vromans
301 ISBN 0-596-00032-4 [3rd edition May 2000]
302 http://www.oreilly.com/catalog/perlpr3/
303
304=item Tutorials
305
306 Beginning Perl
307 by James Lee
308 ISBN 1-59059-391-X [2nd edition August 2004]
309 http://apress.com/book/bookDisplay.html?bID=344
310
311 Elements of Programming with Perl
312 by Andrew L. Johnson
313 ISBN 1-884777-80-5 [1st edition October 1999]
314 http://www.manning.com/johnson/
315
316 Learning Perl
317 by Randal L. Schwartz, Tom Phoenix, and brian d foy
318 ISBN 0-596-10105-8 [4th edition July 2005]
319 http://www.oreilly.com/catalog/learnperl4/
320
321 Intermediate Perl (the "Alpaca Book")
322 by Randal L. Schwartz and brian d foy, with Tom Phoenix (foreword by Damian Conway)
323 ISBN 0-596-10206-2 [1st edition March 2006]
324 http://www.oreilly.com/catalog/intermediateperl/
325
326 Mastering Perl
327 by brian d foy
328 ISBN 0-596-52724-1 [1st edition July 2007]
329 http://www.oreilly.com/catalog/9780596527242/
330
331=item Task-Oriented
332
333 Writing Perl Modules for CPAN
334 by Sam Tregar
335 ISBN 1-59059-018-X [1st edition Aug 2002]
336 http://apress.com/book/bookDisplay.html?bID=14
337
338 The Perl Cookbook
339 by Tom Christiansen and Nathan Torkington
340 with foreword by Larry Wall
341 ISBN 1-56592-243-3 [1st edition August 1998]
342 http://www.oreilly.com/catalog/cookbook/
343
344 Effective Perl Programming
345 by Joseph Hall
346 ISBN 0-201-41975-0 [1st edition 1998]
347 http://www.awl.com/
348
349 Real World SQL Server Administration with Perl
350 by Linchi Shea
351 ISBN 1-59059-097-X [1st edition July 2003]
352 http://apress.com/book/bookDisplay.html?bID=171
353
354=item Special Topics
355
356 Perl Best Practices
357 by Damian Conway
358 ISBN: 0-596-00173-8 [1st edition July 2005]
359 http://www.oreilly.com/catalog/perlbp/
360
361 Higher Order Perl
362 by Mark-Jason Dominus
363 ISBN: 1558607013 [1st edition March 2005]
364 http://hop.perl.plover.com/
365
366 Perl 6 Now: The Core Ideas Illustrated with Perl 5
367 by Scott Walters
368 ISBN 1-59059-395-2 [1st edition December 2004]
369 http://apress.com/book/bookDisplay.html?bID=355
370
371 Mastering Regular Expressions
372 by Jeffrey E. F. Friedl
373 ISBN 0-596-00289-0 [2nd edition July 2002]
374 http://www.oreilly.com/catalog/regex2/
375
376 Network Programming with Perl
377 by Lincoln Stein
378 ISBN 0-201-61571-1 [1st edition 2001]
379 http://www.awlonline.com/
380
381 Object Oriented Perl
382 Damian Conway
383 with foreword by Randal L. Schwartz
384 ISBN 1-884777-79-1 [1st edition August 1999]
385 http://www.manning.com/conway/
386
387 Data Munging with Perl
388 Dave Cross
389 ISBN 1-930110-00-6 [1st edition 2001]
390 http://www.manning.com/cross
391
392 Mastering Perl/Tk
393 by Steve Lidie and Nancy Walsh
394 ISBN 1-56592-716-8 [1st edition January 2002]
395 http://www.oreilly.com/catalog/mastperltk/
396
397 Extending and Embedding Perl
398 by Tim Jenness and Simon Cozens
399 ISBN 1-930110-82-0 [1st edition August 2002]
400 http://www.manning.com/jenness
401
402 Perl Debugger Pocket Reference
403 by Richard Foley
404 ISBN 0-596-00503-2 [1st edition January 2004]
405 http://www.oreilly.com/catalog/perldebugpr/
406
407 Pro Perl Debugging
408 by Richard Foley with Andy Lester
409 ISBN 1-59059-454-1 [1st edition July 2005]
410 http://www.apress.com/book/view/1590594541
411
412=back
413
414=head2 Which magazines have Perl content?
415
416I<The Perl Review> ( http://www.theperlreview.com ) focuses on Perl
417almost completely (although it sometimes sneaks in an article about
418another language). There's also I<$foo Magazin>, a german magazine
419dedicated to Perl, at ( http://www.foo-magazin.de ).
420
421Magazines that frequently carry quality articles on Perl include I<The
422Perl Review> ( http://www.theperlreview.com ), I<Unix Review> (
423http://www.unixreview.com/ ), I<Linux Magazine> (
424http://www.linuxmagazine.com/ ), and Usenix's newsletter/magazine to
425its members, I<login:> ( http://www.usenix.org/ )
426
427The Perl columns of Randal L. Schwartz are available on the web at
428http://www.stonehenge.com/merlyn/WebTechniques/ ,
429http://www.stonehenge.com/merlyn/UnixReview/ , and
430http://www.stonehenge.com/merlyn/LinuxMag/ .
431
432The first (and for a long time, only) periodical devoted to All Things
433Perl, I<The Perl Journal> contains tutorials, demonstrations, case
434studies, announcements, contests, and much more. I<TPJ> has columns
435on web development, databases, Win32 Perl, graphical programming,
436regular expressions, and networking, and sponsors the Obfuscated Perl
437Contest and the Perl Poetry Contests. Beginning in November 2002, TPJ
438moved to a reader-supported monthly e-zine format in which subscribers
439can download issues as PDF documents. In 2006, TPJ merged with Dr.
440Dobbs Journal (online edition). To read old TPJ articles, see
441http://www.ddj.com/ .
442
443=head2 What mailing lists are there for Perl?
444
445Most of the major modules (Tk, CGI, libwww-perl) have their own
446mailing lists. Consult the documentation that came with the module for
447subscription information.
448
449A comprehensive list of Perl related mailing lists can be found at:
450
451 http://lists.perl.org/
452
453=head2 Where are the archives for comp.lang.perl.misc?
454
455The Google search engine now carries archived and searchable newsgroup
456content.
457
458http://groups.google.com/groups?group=comp.lang.perl.misc
459
460If you have a question, you can be sure someone has already asked the
461same question at some point on c.l.p.m. It requires some time and patience
462to sift through all the content but often you will find the answer you
463seek.
464
465=head2 Where can I buy a commercial version of perl?
466
467In a real sense, perl already I<is> commercial software: it has a license
468that you can grab and carefully read to your manager. It is distributed
469in releases and comes in well-defined packages. There is a very large
470user community and an extensive literature. The comp.lang.perl.*
471newsgroups and several of the mailing lists provide free answers to your
472questions in near real-time. Perl has traditionally been supported by
473Larry, scores of software designers and developers, and myriad
474programmers, all working for free to create a useful thing to make life
475better for everyone.
476
477However, these answers may not suffice for managers who require a
478purchase order from a company whom they can sue should anything go awry.
479Or maybe they need very serious hand-holding and contractual obligations.
480Shrink-wrapped CDs with perl on them are available from several sources if
481that will help. For example, many Perl books include a distribution of perl,
482as do the O'Reilly Perl Resource Kits (in both the Unix flavor
483and in the proprietary Microsoft flavor); the free Unix distributions
484also all come with perl.
485
486=head2 Where do I send bug reports?
487
488If you are reporting a bug in the perl interpreter or the modules
489shipped with Perl, use the I<perlbug> program in the Perl distribution or
490mail your report to perlbug@perl.org or at http://rt.perl.org/perlbug/ .
491
492For Perl modules, you can submit bug reports to the Request Tracker set
493up at http://rt.cpan.org .
494
495If you are posting a bug with a non-standard port (see the answer to
496"What platforms is perl available for?"), a binary distribution, or a
497non-standard module (such as Tk, CGI, etc), then please see the
498documentation that came with it to determine the correct place to post
499bugs.
500
501Read the perlbug(1) man page (perl5.004 or later) for more information.
502
503=head2 What is perl.com? Perl Mongers? pm.org? perl.org? cpan.org?
504
505Perl.com at http://www.perl.com/ is part of the O'Reilly Network, a
506subsidiary of O'Reilly Media.
507
508The Perl Foundation is an advocacy organization for the Perl language
509which maintains the web site http://www.perl.org/ as a general
510advocacy site for the Perl language. It uses the domain to provide
511general support services to the Perl community, including the hosting
512of mailing lists, web sites, and other services. There are also many
513other sub-domains for special topics like learning Perl, Perl news, jobs
514in Perl, such as:
515
516 http://learn.perl.org/
517 http://use.perl.org/
518 http://jobs.perl.org/
519 http://lists.perl.org/
520
521Perl Mongers uses the pm.org domain for services related to Perl user
522groups, including the hosting of mailing lists and web sites. See the
523Perl user group web site at http://www.pm.org/ for more information about
524joining, starting, or requesting services for a Perl user group.
525
526http://www.cpan.org/ is the Comprehensive Perl Archive Network,
527a replicated worldwide repository of Perl software, see
528the I<What is CPAN?> question earlier in this document.
529
530=head1 REVISION
531
532Revision: $Revision: 10144 $
533
534Date: $Date: 2007-10-31 13:50:01 +0100 (Wed, 31 Oct 2007) $
535
536See L<perlfaq> for source control details and availability.
537
538=head1 AUTHOR AND COPYRIGHT
539
540Copyright (c) 1997-2007 Tom Christiansen, Nathan Torkington, and
541other authors as noted. All rights reserved.
542
543This documentation is free; you can redistribute it and/or modify it
544under the same terms as Perl itself.
545
546Irrespective of its distribution, all code examples here are in the public
547domain. You are permitted and encouraged to use this code and any
548derivatives thereof in your own programs for fun or for profit as you
549see fit. A simple comment in the code giving credit to the FAQ would
550be courteous but is not required.