X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=pod%2Fperlfaq.pod;h=586282326b6db371914becdf1d173474a53c65c5;hb=be5387481edebd42425976c372ac3dbafe134bde;hp=bb1935e3dc55d2b98450888adfc198f93485929c;hpb=58103a2e295c15d87c7ce0bd8dd83d7e110adac4;p=p5sagit%2Fp5-mst-13.2.git diff --git a/pod/perlfaq.pod b/pod/perlfaq.pod index bb1935e..5862823 100644 --- a/pod/perlfaq.pod +++ b/pod/perlfaq.pod @@ -1,72 +1,88 @@ =head1 NAME -perlfaq - frequently asked questions about Perl ($Date: 2005/12/30 15:04:07 $) +perlfaq - frequently asked questions about Perl =head1 DESCRIPTION -The perlfaq is divided into several documents based on topics. A table -of contents is at the end of this document. +The perlfaq comprises several documents that answer the most commonly +asked questions about Perl and Perl programming. It's divided by topic +into nine major sections outlined in this document. =head2 Where to get the perlfaq -Extracts of the perlfaq are posted regularly to -comp.lang.perl.misc. It is available on many web sites: -http://www.perldoc.com/ and http://faq.perl.org/ +The perlfaq comes with the standard Perl distribution, so if you have Perl +you should have the perlfaq. You should also have the C tool +that lets you read the L: -=head2 How to contribute to the perlfaq + $ perldoc perlfaq + +Besides your local system, you can find the perlfaq on the web, including +at http://perldoc.perl.org/ . + +The perlfaq is an evolving document and you can read the latest version +at http://faq.perl.org/ . The perlfaq-workers periodically post extracts +of the latest perlfaq to comp.lang.perl.misc. -You may mail corrections, additions, and suggestions to -perlfaq-workers@perl.org . This alias should not be used to -I FAQs. It's for fixing the current FAQ. Send -questions to the comp.lang.perl.misc newsgroup. You can -view the source tree at http://cvs.perl.org/cvsweb/perlfaq/ -(which is outside of the main Perl source tree). The CVS -repository notes all changes to the FAQ. +You can view the source tree at +https://github.com/briandfoy/perlfaq (which is outside of the +main Perl source tree). The git repository notes all changes to the FAQ +and holds the latest version of the working documents and may vary +significantly from the version distributed with the latest version of +Perl. Check the repository before sending your corrections. + +=head2 How to contribute to the perlfaq -=head2 What will happen if you mail your Perl programming problems to the authors +You can mail corrections, additions, and suggestions to +C<< >>. The perlfaq volunteers use this +address to coordinate their efforts and track the perlfaq development. +They appreciate your contributions to the FAQ but do not have time to +provide individual help, so don't use this address to ask FAQs. -Your questions will probably go unread, unless they're -suggestions of new questions to add to the FAQ, in which -case they should have gone to the perlfaq-workers@perl.org -instead. +The perlfaq server posts extracts of the perlfaq to that newsgroup every +6 hours (or so), and the community of volunteers reviews and updates the +answers. If you'd like to help review and update the answers, check out +comp.lang.perl.misc. -You should have read section 2 of this faq. There you would -have learned that comp.lang.perl.misc is the appropriate -place to go for free advice. If your question is really -important and you require a prompt and correct answer, you -should hire a consultant. +You can also fork the git repository for the perlfaq and send a pull +request so the main repository can pull your changes. The repository +is at: -=head1 Credits + https://github.com/briandfoy/perlfaq -The original perlfaq was written by Tom Christiansen, then expanded -by collaboration between Tom and Nathan Torkington. The current -document is maintained by the perlfaq-workers (perlfaq-workers@perl.org). -Several people have contributed answers, corrections, and comments. +=head2 What will happen if you mail your Perl programming problems to the authors? -=head1 Author and Copyright Information +The perlfaq-workers like to keep all traffic on the perlfaq-workers list +so that everyone can see the work being done (and the work that needs to +be done). The mailing list serves as an official record. If you email the +authors or maintainers directly, you'll probably get a reply asking you +to post to the mailing list. If you don't get a reply, it probably means +that the person never saw the message or didn't have time to deal with +it. Posting to the list allows the volunteers with time to deal with it +when others are busy. -Copyright (c) 1997-2005 Tom Christiansen, Nathan Torkington, and -other contributors noted in the answers. +If you have a question that isn't in the FAQ and you would like help with +it, try the resources in L. -All rights reserved. +=head1 CREDITS -=head2 Bundled Distributions +Tom Christiansen wrote the original perlfaq then expanded it with the +help of Nat Torkington. The perlfaq-workers maintain current document +and the denizens of comp.lang.perl.misc regularly review and update the +FAQ. Several people have contributed answers, corrections, and comments, +and the perlfaq notes those contributions wherever appropriate. -This documentation is free; you can redistribute it and/or modify it -under the same terms as Perl itself. +=head1 AUTHOR AND COPYRIGHT -Irrespective of its distribution, all code examples in these files -are hereby placed into the public domain. You are permitted and -encouraged to use this code in your own programs for fun -or for profit as you see fit. A simple comment in the code giving -credit would be courteous but is not required. +Copyright (c) 1997-2009 Tom Christiansen, Nathan Torkington, and +other authors as noted. All rights reserved. -=head2 Disclaimer +Tom Christainsen wrote the original version of this document. +brian d foy C<< >> wrote this version. See the +individual perlfaq documents for additional copyright information. -This information is offered in good faith and in the hope that it may -be of use, but is not guaranteed to be correct, up to date, or suitable -for any particular purpose whatsoever. The authors accept no liability -in respect of this information or its use. +This document is available under the same terms as Perl itself. Code +examples in all the perlfaq documents are in the public domain. Use +them as you see fit and at your own risk with no warranty from anyone. =head1 Table of Contents @@ -92,13 +108,10 @@ in respect of this information or its use. =item perlfaq9 - Networking - =back - =head1 The Questions - =head2 L: General Questions About Perl Very general, high-level questions about Perl. @@ -119,15 +132,15 @@ Which version of Perl should I use? =item * -What are perl4, perl5, or perl6? +What are Perl 4, Perl 5, or Perl 6? =item * -What is Ponie? +What was Ponie? =item * -What is perl6? +What is Perl 6? =item * @@ -167,7 +180,7 @@ Where can I get a list of Larry Wall witticisms? =item * -How can I convince my sysadmin/supervisor/employees to use version 5/5.6.1/Perl instead of some other language? +How can I convince others to use Perl? =back @@ -224,11 +237,7 @@ Perl Books =item * -Perl in Magazines - -=item * - -Perl on the Net: FTP and WWW Access +Which magazines have Perl content? =item * @@ -236,7 +245,7 @@ What mailing lists are there for Perl? =item * -Archives of comp.lang.perl.misc +Where are the archives for comp.lang.perl.misc? =item * @@ -313,7 +322,7 @@ How can I use curses with Perl? =item * -How can I use X or Tk with Perl? +How can I write a GUI (X, Tk, Gtk, etc.) in Perl? =item * @@ -345,10 +354,6 @@ How can I compile my Perl program into byte code or C? =item * -How can I compile Perl into Java? - -=item * - How can I get C<#!perl> to work on [MS-DOS,NT,...]? =item * @@ -462,7 +467,7 @@ How do I find yesterday's date? =item * -Does Perl have a Year 2000 problem? Is Perl Y2K compliant? +Does Perl have a Year 2000 problem? Is Perl Y2K compliant? =item * @@ -614,6 +619,10 @@ How do I process an entire hash? =item * +How do I merge two hashes? + +=item * + What happens if I add or remove keys from a hash while iterating over it? =item * @@ -711,7 +720,7 @@ How do I flush/unbuffer an output filehandle? Why must I do this? =item * -How do I change one line in a file/delete a line in a file/insert a line in the middle of a file/append to the beginning of a file? +How do I change, delete, or insert a line in a file, or append to the beginning of a file? =item * @@ -751,6 +760,10 @@ How can I write() into a string? =item * +How can I open a filehandle to a string? + +=item * + How can I output my numbers with commas added? =item * @@ -857,6 +870,18 @@ How do I select a random line from a file? Why do I get weird spaces when I print an array of lines? +=item * + +How do I traverse a directory tree? + +=item * + +How do I delete a directory tree? + +=item * + +How do I copy an entire directory? + =back @@ -880,6 +905,10 @@ How can I pull out lines between two patterns that are themselves on different l =item * +How do I match XML, HTML, or other nasty, ugly things with a regex? + +=item * + I put a regular expression into $/ but it didn't work. What's wrong? =item * @@ -956,7 +985,7 @@ How can I match strings with multibyte characters? =item * -How do I match a pattern that is supplied by the user? +How do I match a regular expression that's in a variable? =back @@ -1005,6 +1034,10 @@ How do I create a module? =item * +How do I adopt or take over a module already on CPAN? + +=item * + How do I create a class? =item * @@ -1065,7 +1098,7 @@ Why can't a method included in this same file be found? =item * -How can I find out my current package? +How can I find out my current or calling package? =item * @@ -1327,7 +1360,7 @@ How do I download a file from the user's machine? How do I open a file on anoth =item * -How do I make a pop-up menu in HTML? +How do I make an HTML pop-up menu with Perl? =item *