Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

459 lines
19 KiB

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