summaryrefslogtreecommitdiff
path: root/Master/tlpkg/tlperl/lib/pods/perlfaq.pod
diff options
context:
space:
mode:
Diffstat (limited to 'Master/tlpkg/tlperl/lib/pods/perlfaq.pod')
-rw-r--r--Master/tlpkg/tlperl/lib/pods/perlfaq.pod239
1 files changed, 84 insertions, 155 deletions
diff --git a/Master/tlpkg/tlperl/lib/pods/perlfaq.pod b/Master/tlpkg/tlperl/lib/pods/perlfaq.pod
index 614ff564a93..449c0a2de84 100644
--- a/Master/tlpkg/tlperl/lib/pods/perlfaq.pod
+++ b/Master/tlpkg/tlperl/lib/pods/perlfaq.pod
@@ -8,81 +8,41 @@ 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
+=head2 Where to find 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 lets you read the L<perlfaq>:
+The perlfaq is an evolving document. Read the latest version at
+L<http://learn.perl.org/faq/>. It is also included in the standard Perl
+distribution.
- $ perldoc perlfaq
+=head2 How to use the perlfaq
-Besides your local system, you can find the perlfaq on the web, including
-at http://perldoc.perl.org/ .
+The C<perldoc> command line tool is part of the standard Perl distribution. To
+read the perlfaq:
-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.
+ $ perldoc perlfaq
-The perlfaq documents are in the perl source tree (see
-L<perlgit>). 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.
+To search the perlfaq question headings:
-=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.
-
-You can also fork the perl repository, make your changes, and send them
-to Perl 5 Porters. See L<perlgit>.
-
-=head2 What will happen if you mail your Perl programming problems to the authors?
+ $ perldoc -q open
-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
+=head2 How to contribute to the perlfaq
-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.
+Review L<https://github.com/perl-doc-cats/perlfaq/wiki>. If you don't find
+your suggestion create an issue or pull request against
+L<https://github.com/perl-doc-cats/perlfaq>.
-=head1 AUTHOR AND COPYRIGHT
+Once approved, changes are merged into L<https://github.com/tpf/perlfaq>, the
+repository which drives L<http://learn.perl.org/faq/>, and they are
+distributed with the next Perl 5 release.
-Tom Christiansen 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.
+=head2 What if my question isn't answered in the FAQ?
-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).
+Try the resources in L<perlfaq2>.
-=head1 Table of Contents
+=head1 TABLE OF CONTENTS
=over 4
-=item perlfaq - this document
-
=item perlfaq1 - General Questions About Perl
=item perlfaq2 - Obtaining and Learning about Perl
@@ -99,15 +59,15 @@ them as you see fit (and at your own risk with no warranty from anyone).
=item perlfaq8 - System Interaction
-=item perlfaq9 - Networking
+=item perlfaq9 - Web, Email and Networking
=back
-=head1 The Questions
+=head1 THE QUESTIONS
=head2 L<perlfaq1>: General Questions About Perl
-Very general, high-level questions about Perl.
+This section of the FAQ answers very general, high-level questions about Perl.
=over 4
@@ -129,10 +89,6 @@ What are Perl 4, Perl 5, or Perl 6?
=item *
-What was Ponie?
-
-=item *
-
What is Perl 6?
=item *
@@ -161,18 +117,10 @@ What's the difference between "perl" and "Perl"?
=item *
-Is it a Perl program or a Perl script?
-
-=item *
-
What is a JAPH?
=item *
-Where can I get a list of Larry Wall witticisms?
-
-=item *
-
How can I convince others to use Perl?
=back
@@ -180,17 +128,17 @@ How can I convince others to use Perl?
=head2 L<perlfaq2>: Obtaining and Learning about Perl
-Where to find source and documentation for Perl, support, and related matters.
+This section of the FAQ answers questions about 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 *
@@ -198,19 +146,15 @@ 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.
-
-=item *
-
-I grabbed the sources and tried to compile but gdbm/dynamic loading/malloc/linking/... failed. How do I make it work?
+I copied the Perl binary from one machine to another, but scripts don't work.
=item *
-What modules and extensions are available for Perl? What is CPAN? What does CPAN/src/... mean?
+I grabbed the sources and tried to compile but gdbm/dynamic loading/malloc/linking/... failed. How do I make it work?
=item *
-Is there an ISO or ANSI certified version of Perl?
+What modules and extensions are available for Perl? What is CPAN?
=item *
@@ -218,11 +162,11 @@ Where can I get information on Perl?
=item *
-What are the Perl newsgroups on Usenet? Where do I post questions?
+What is perl.com? Perl Mongers? pm.org? perl.org? cpan.org?
=item *
-Where should I post source code?
+Where can I post questions?
=item *
@@ -234,30 +178,26 @@ Which magazines have Perl content?
=item *
-What mailing lists are there for Perl?
+Which Perl blogs should I read?
=item *
-Where are the archives for comp.lang.perl.misc?
+What mailing lists are there for Perl?
=item *
-Where can I buy a commercial version of perl?
+Where can I buy a commercial version of Perl?
=item *
Where do I send bug reports?
-=item *
-
-What is perl.com? Perl Mongers? pm.org? perl.org? cpan.org?
-
=back
=head2 L<perlfaq3>: Programming Tools
-Programmer tools and programming support.
+This section of the FAQ answers questions related to programmer tools and programming support.
=over 4
@@ -271,10 +211,6 @@ How can I use Perl interactively?
=item *
-Is there a Perl shell?
-
-=item *
-
How do I find which modules are installed on my system?
=item *
@@ -295,10 +231,6 @@ Is there a pretty-printer (formatter) for Perl?
=item *
-Is there a ctags for Perl?
-
-=item *
-
Is there an IDE or Windows Perl Editor?
=item *
@@ -386,7 +318,7 @@ What's MakeMaker?
=head2 L<perlfaq4>: Data Manipulation
-Manipulating numbers, dates, strings, arrays, hashes, and miscellaneous data issues.
+This section of the FAQ answers questions related to manipulating numbers, dates, strings, arrays, hashes, and miscellaneous data issues.
=over 4
@@ -404,7 +336,7 @@ Why isn't my octal data interpreted correctly?
=item *
-Does Perl have a round() function? What about ceil() and floor()? Trig functions?
+Does Perl have a round() function? What about ceil() and floor()? Trig functions?
=item *
@@ -560,7 +492,7 @@ How can I tell whether a certain element is contained in a list or array?
=item *
-How do I compute the difference of two arrays? How do I compute the intersection of two arrays?
+How do I compute the difference of two arrays? How do I compute the intersection of two arrays?
=item *
@@ -676,6 +608,10 @@ How can I check if a key exists in a multilevel hash?
=item *
+How can I prevent addition of unwanted keys into a hash?
+
+=item *
+
How do I handle binary data correctly?
=item *
@@ -707,13 +643,13 @@ How do I pack arrays of doubles or floats for XS code?
=head2 L<perlfaq5>: Files and Formats
-I/O and the "f" issues: filehandles, flushing, formats, and footers.
+This section deals with I/O and the "f" issues: filehandles, flushing, formats, and footers.
=over 4
=item *
-How do I flush/unbuffer an output filehandle? Why must I do this?
+How do I flush/unbuffer an output filehandle? Why must I do this?
=item *
@@ -745,7 +681,7 @@ How can I manipulate fixed-record-length files?
=item *
-How can I make a filehandle local to a subroutine? How do I pass filehandles between subroutines? How do I make an array of filehandles?
+How can I make a filehandle local to a subroutine? How do I pass filehandles between subroutines? How do I make an array of filehandles?
=item *
@@ -781,11 +717,7 @@ Why do I sometimes get an "Argument list too long" when I use E<lt>*E<gt>?
=item *
-Is there a leak/bug in glob()?
-
-=item *
-
-How can I open a file with a leading ">" or trailing blanks?
+How can I open a file with a leading "E<gt>" or trailing blanks?
=item *
@@ -833,7 +765,7 @@ How can I read in a file by paragraphs?
=item *
-How can I read a single character from a file? From the keyboard?
+How can I read a single character from a file? From the keyboard?
=item *
@@ -853,7 +785,7 @@ How do I close a file descriptor by number?
=item *
-Why can't I use "C:\temp\foo" in DOS paths? Why 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 *
@@ -861,7 +793,7 @@ Why doesn't glob("*.*") get all the files?
=item *
-Why does Perl let me delete read-only files? Why does C<-i> clobber protected files? Isn't this a bug in Perl?
+Why does Perl let me delete read-only files? Why does C<-i> clobber protected files? Isn't this a bug in Perl?
=item *
@@ -888,7 +820,7 @@ How do I copy an entire directory?
=head2 L<perlfaq6>: 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).
+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 can be handled with regular expressions, but those answers are found elsewhere in this document (in perlfaq9 : "How do I decode or create those %-encodings on the web" and perlfaq4 : "How do I determine whether a scalar is a number/whole/integer/float", to be precise).
=over 4
@@ -922,7 +854,7 @@ How can I make C<\w> match national character sets?
=item *
-How can I match a locale-smart version of C</[a-zA-Z]/>?
+How can I match a locale-smart version of C</[a-zA-Z]/> ?
=item *
@@ -993,7 +925,7 @@ How do I match a regular expression that's in a variable?
=head2 L<perlfaq7>: General Perl Language Issues
-General Perl language issues that don't clearly fit into any of the other sections.
+This section deals with general Perl language issues that don't clearly fit into any of the other sections.
=over 4
@@ -1063,7 +995,7 @@ How do I create a static variable?
=item *
-What's the difference between dynamic and lexical (static) scoping? Between local() and my()?
+What's the difference between dynamic and lexical (static) scoping? Between local() and my()?
=item *
@@ -1075,7 +1007,7 @@ What's the difference between deep and shallow binding?
=item *
-Why doesn't "my($foo) = E<lt>FILEE<gt>;" work right?
+Why doesn't "my($foo) = E<lt>$fhE<gt>;" work right?
=item *
@@ -1122,7 +1054,7 @@ What does "bad interpreter" mean?
=head2 L<perlfaq8>: System Interaction
-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.
+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.
=over 4
@@ -1200,7 +1132,7 @@ How can I do an atexit() or setjmp()/longjmp()? (Exception handling)
=item *
-Why doesn't my sockets program work under System V (Solaris)? What does the error message "Protocol not supported" mean?
+Why doesn't my sockets program work under System V (Solaris)? What does the error message "Protocol not supported" mean?
=item *
@@ -1260,7 +1192,7 @@ Is there a way to hide perl's command line from programs such as "ps"?
=item *
-I {changed directory, modified my environment} in a perl script. How come the change disappeared when I exited the script? How do I get my changes to be visible?
+I {changed directory, modified my environment} in a perl script. How come the change disappeared when I exited the script? How do I get my changes to be visible?
=item *
@@ -1329,23 +1261,23 @@ What is socket.ph and where do I get it?
=back
-=head2 L<perlfaq9>: Networking
+=head2 L<perlfaq9>: Web, Email and Networking
-Networking, the internet, and a few on the web.
+This section deals with questions related to running web sites, sending and receiving email as well as general networking.
=over 4
=item *
-What is the correct form of response from a CGI script?
+Should I use a web framework?
=item *
-My CGI script runs from the command line but not the browser. (500 Server Error)
+Which web framework should I use?
=item *
-How can I get better error messages from a CGI program?
+What is Plack and PSGI?
=item *
@@ -1357,14 +1289,6 @@ How do I extract URLs?
=item *
-How do I download a file from the user's machine? How do I open a file on another machine?
-
-=item *
-
-How do I make an HTML pop-up menu with Perl?
-
-=item *
-
How do I fetch an HTML file?
=item *
@@ -1385,11 +1309,7 @@ How do I put a password on my web pages?
=item *
-How do I edit my .htpasswd and .htgroup files with Perl?
-
-=item *
-
-How do I make sure users can't enter values into a form that cause my CGI script to do bad things?
+How do I make sure users can't enter values into a form that causes my CGI script to do bad things?
=item *
@@ -1397,10 +1317,6 @@ How do I parse a mail header?
=item *
-How do I decode a CGI form?
-
-=item *
-
How do I check a valid mail address?
=item *
@@ -1409,11 +1325,11 @@ How do I decode a MIME/BASE64 string?
=item *
-How do I return the user's mail address?
+How do I find the user's mail address?
=item *
-How do I send mail?
+How do I send email?
=item *
@@ -1421,7 +1337,7 @@ How do I use MIME to make an attachment to a mail message?
=item *
-How do I read mail?
+How do I read email?
=item *
@@ -1429,11 +1345,7 @@ How do I find out my hostname, domainname, or IP address?
=item *
-How do I fetch a news article or the active newsgroups?
-
-=item *
-
-How do I fetch/put an FTP file?
+How do I fetch/put an (S)FTP file?
=item *
@@ -1442,3 +1354,20 @@ How can I do RPC in Perl?
=back
+
+=head1 CREDITS
+
+Tom Christiansen wrote the original perlfaq then expanded it with the
+help of Nat Torkington. brian d foy substantialy edited and expanded
+the perlfaq. perlfaq-workers and others have also supplied feedback,
+patches and corrections over the years.
+
+=head1 AUTHOR AND COPYRIGHT
+
+Tom Christiansen 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).