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