Get mad compiling as C++. (At least for me)
[p5sagit/p5-mst-13.2.git] / pod / perlfaq.pod
index 419d973..771a23c 100644 (file)
 =head1 NAME
 
-perlfaq - frequently asked questions about Perl ($Date: 2002/11/13 06:23:50 $)
+perlfaq - frequently asked questions about Perl
 
 =head1 DESCRIPTION
 
-The perlfaq is structured into the following documents:
+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
+
+The perlfaq comes with the standard Perl distribution, so if you have Perl
+you should have the perlfaq. You should also have the C<perldoc> tool
+that let's you read the L<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 can view the source tree at
+https://svn.perl.org/modules/perlfaq/trunk/ (which is outside of the
+main Perl source tree).  The SVN 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
+
+You can mail corrections, additions, and suggestions to
+C<< <perlfaq-workers AT perl DOT org> >>. 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.
+
+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.
+
+=head2 What will happen if you mail your Perl programming problems to the authors?
+
+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.
+
+If you have a question that isn't in the FAQ and you would like help with
+it, try the resources in L<perlfaq2>.
+
+=head1 CREDITS
+
+Tom Christiansen wrote the original perlfaq then expanded it with the
+help of Nat Torkington.  The perlfaq-workers maintain current document
+and the dezinens 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.
+
+=head1 AUTHOR AND COPYRIGHT
+
+Tom Christainsen wrote the original version of this document.
+brian d foy C<< <bdfoy@cpan.org> >> wrote this version. See the
+individual perlfaq documents for additional copyright information.
+
+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
 
-=head2 perlfaq: Structural overview of the FAQ.
+=over 4
+
+=item perlfaq  - this document
+
+=item perlfaq1 - General Questions About Perl
+
+=item perlfaq2 - Obtaining and Learning about Perl
+
+=item perlfaq3 - Programming Tools
+
+=item perlfaq4 - Data Manipulation
+
+=item perlfaq5 - Files and Formats
+
+=item perlfaq6 - Regular Expressions
+
+=item perlfaq7 - General Perl Language Issues
+
+=item perlfaq8 - System Interaction
 
-This document.
+=item perlfaq9 - Networking
+
+=back
+
+=head1 The Questions
 
 =head2 L<perlfaq1>: General Questions About Perl
 
@@ -31,11 +123,15 @@ Which version of Perl should I use?
 
 =item *
 
-What are perl4 and perl5?
+What are Perl 4, Perl 5, or Perl 6?
 
 =item *
 
-What is perl6?
+What was Ponie?
+
+=item *
+
+What is Perl 6?
 
 =item *
 
@@ -75,33 +171,32 @@ 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
 
 
 =head2 L<perlfaq2>: Obtaining and Learning about Perl
 
-Where to find source and documentation for Perl, support,
-and related matters.
+Where to find source and documentation for Perl, support, and related matters.
 
 =over 4
 
 =item *
 
-What machines support Perl?  Where do I get it?
+What machines support perl?  Where do I get it?
 
 =item *
 
-How can I get a binary version of Perl?
+How can I get a binary version of perl?
 
 =item *
 
-I don't have a C compiler on my system.  How can I compile perl?
+I don't have a C compiler. How can I build my own Perl interpreter?
 
 =item *
 
-I copied the Perl binary from one machine to another, but scripts don't work.
+I copied the perl binary from one machine to another, but scripts don't work.
 
 =item *
 
@@ -133,11 +228,7 @@ Perl Books
 
 =item *
 
-Perl in Magazines
-
-=item *
-
-Perl on the Net: FTP and WWW Access
+Which magazines have Perl content?
 
 =item *
 
@@ -145,11 +236,11 @@ What mailing lists are there for Perl?
 
 =item *
 
-Archives of comp.lang.perl.misc
+Where are the archives for comp.lang.perl.misc?
 
 =item *
 
-Where can I buy a commercial version of Perl?
+Where can I buy a commercial version of perl?
 
 =item *
 
@@ -226,10 +317,6 @@ How can I use X or Tk with Perl?
 
 =item *
 
-How can I generate simple menus without using CGI or Tk?
-
-=item *
-
 How can I make my Perl program run faster?
 
 =item *
@@ -258,10 +345,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 *
@@ -282,12 +365,11 @@ Where can I learn about object-oriented Perl programming?
 
 =item *
 
-Where can I learn about linking C with Perl? [h2xs, xsubpp]
+Where can I learn about linking C with Perl?
 
 =item *
 
-I've read perlembed, perlguts, etc., but I can't embed perl in
-my C program; what am I doing wrong?
+I've read perlembed, perlguts, etc., but I can't embed perl in my C program; what am I doing wrong?
 
 =item *
 
@@ -302,8 +384,7 @@ What's MakeMaker?
 
 =head2 L<perlfaq4>: Data Manipulation
 
-Manipulating numbers, dates, strings, arrays, hashes, and
-miscellaneous data issues.
+Manipulating numbers, dates, strings, arrays, hashes, and miscellaneous data issues.
 
 =over 4
 
@@ -313,6 +394,10 @@ Why am I getting long decimals (eg, 19.9499999999999) instead of the numbers I s
 
 =item *
 
+Why is int() broken?
+
+=item *
+
 Why isn't my octal data interpreted correctly?
 
 =item *
@@ -321,7 +406,7 @@ Does Perl have a round() function?  What about ceil() and floor()?  Trig functio
 
 =item *
 
-How do I convert between numeric representations?
+How do I convert between numeric representations/bases/radixes?
 
 =item *
 
@@ -349,7 +434,7 @@ How do I get a random number between X and Y?
 
 =item *
 
-How do I find the week-of-the-year/day-of-the-year?
+How do I find the day or week of the year?
 
 =item *
 
@@ -373,7 +458,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 *
 
@@ -453,7 +538,7 @@ What's wrong with always quoting "$vars"?
 
 =item *
 
-Why don't my <<HERE documents work?
+Why don't my E<lt>E<lt>HERE documents work?
 
 =item *
 
@@ -622,7 +707,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 *
 
@@ -634,6 +719,10 @@ How can I use Perl's C<-i> option from within a program?
 
 =item *
 
+How can I copy a file?
+
+=item *
+
 How do I make a temporary file name?
 
 =item *
@@ -670,7 +759,7 @@ How come when I open a file read-write it wipes it out?
 
 =item *
 
-Why do I sometimes get an "Argument list too long" when I use <*>?
+Why do I sometimes get an "Argument list too long" when I use E<lt>*E<gt>?
 
 =item *
 
@@ -690,7 +779,7 @@ How can I lock a file?
 
 =item *
 
-Why can't I just open(FH, ">file.lock")?
+Why can't I just open(FH, "E<gt>file.lock")?
 
 =item *
 
@@ -746,7 +835,7 @@ How do I close a file descriptor by number?
 
 =item *
 
-Why can't I use "C:\temp\foo" in DOS paths?  What doesn't `C:\temp\foo.exe` work?
+Why can't I use "C:\temp\foo" in DOS paths?  Why doesn't `C:\temp\foo.exe` work?
 
 =item *
 
@@ -769,7 +858,7 @@ Why do I get weird spaces when I print an array of lines?
 
 =head2 L<perlfaq6>: Regular Expressions
 
-Pattern matching and regular expressions.
+This section is surprisingly small because the rest of the FAQ is littered with answers involving regular expressions. For example, decoding a URL and checking whether something is a number are handled with regular expressions, but those answers are found elsewhere in this document (in L<perlfaq9>: "How do I decode or create those %-encodings on the web" and L<perlfaq4>: "How do I determine whether a scalar is a number/whole/integer/float", to be precise).
 
 =over 4
 
@@ -855,7 +944,7 @@ Are Perl regexes DFAs or NFAs?  Are they POSIX compliant?
 
 =item *
 
-What's wrong with using grep or map in a void context?
+What's wrong with using grep in a void context?
 
 =item *
 
@@ -863,15 +952,14 @@ 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
 
 
 =head2 L<perlfaq7>: General Perl Language Issues
 
-General Perl language issues that don't clearly fit into any of the
-other sections.
+General Perl language issues that don't clearly fit into any of the other sections.
 
 =over 4
 
@@ -949,7 +1037,7 @@ What's the difference between deep and shallow binding?
 
 =item *
 
-Why doesn't "my($foo) = <FILE>;" work right?
+Why doesn't "my($foo) = E<lt>FILEE<gt>;" work right?
 
 =item *
 
@@ -987,13 +1075,16 @@ How do I clear a package?
 
 How can I use a variable as a variable name?
 
+=item *
+
+What does "bad interpreter" mean?
+
 =back
 
 
 =head2 L<perlfaq8>: System Interaction
 
-Interprocess communication (IPC), control over the user-interface
-(keyboard, screen and pointing devices).
+This section of the Perl FAQ covers questions involving operating system interaction. Topics include interprocess communication (IPC), control over the user-interface (keyboard, screen and pointing devices), and most anything else not related to data manipulation. Read the FAQs and documentation specific to the port of perl to your operating system (eg, L<perlvms>, L<perlplan9>, ...). These should contain more detailed information on the vagaries of your perl.
 
 =over 4
 
@@ -1171,6 +1262,10 @@ How do I open a file without blocking?
 
 =item *
 
+How do I tell the difference between errors from the shell and perl?
+
+=item *
+
 How do I install a module from CPAN?
 
 =item *
@@ -1187,7 +1282,7 @@ How do I add the directory my program lives in to the module/library search path
 
 =item *
 
-How do I add a directory to my include path at runtime?
+How do I add a directory to my include path (@INC) at runtime?
 
 =item *
 
@@ -1228,7 +1323,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 *
 
@@ -1292,7 +1387,7 @@ How do I read mail?
 
 =item *
 
-How do I find out my hostname/domainname/IP address?
+How do I find out my hostname, domainname, or IP address?
 
 =item *
 
@@ -1309,61 +1404,3 @@ How can I do RPC in Perl?
 =back
 
 
-=head1 About the perlfaq documents
-
-=head2 Where to get the perlfaq
-
-This document is posted regularly to comp.lang.perl.announce and
-several other related newsgroups.  It is available on many
-web sites: http://www.perldoc.com/ and http://perlfaq.cpan.org/ .
-
-=head2 How to contribute to the perlfaq
-
-You may mail corrections, additions, and suggestions to
-perlfaq-workers@perl.org .  This alias should not be 
-used to I<ask> FAQs.  It's for fixing the current FAQ.
-Send questions to the comp.lang.perl.misc newsgroup.
-
-=head2 What will happen if you mail your Perl programming problems to the authors
-
-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.
-
-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.
-
-=head1 Credits
-
-When I first began the Perl FAQ in the late 80s, I never realized it
-would have grown to over a hundred pages, nor that Perl would ever become
-so popular and widespread.  This document could not have been written
-without the tremendous help provided by Larry Wall and the rest of the
-Perl Porters.
-
-=head1 Author and Copyright Information
-
-Copyright (c) 1997-2002 Tom Christiansen and Nathan Torkington.
-All rights reserved.
-
-=head2 Bundled Distributions
-
-This documentation is free; you can redistribute it and/or modify it
-under the same terms as Perl itself.
-
-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.
-
-=head2 Disclaimer
-
-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.
-
-=back