From: Jarkko Hietaniemi Date: Mon, 8 Apr 2002 18:56:58 +0000 (+0000) Subject: FAQ sync. (Ignoring the few URL differences for now.) X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=f05bbc4047b4e519eb0edbaf2fce2004f4838d1a;p=p5sagit%2Fp5-mst-13.2.git FAQ sync. (Ignoring the few URL differences for now.) p4raw-id: //depot/perl@15813 --- diff --git a/pod/perlfaq1.pod b/pod/perlfaq1.pod index dcaed06..5ca94c9 100644 --- a/pod/perlfaq1.pod +++ b/pod/perlfaq1.pod @@ -1,6 +1,6 @@ =head1 NAME -perlfaq1 - General Questions About Perl ($Revision: 1.7 $, $Date: 2002/02/21 14:49:15 $) +perlfaq1 - General Questions About Perl ($Revision: 1.8 $, $Date: 2002/04/07 18:46:13 $) =head1 DESCRIPTION @@ -37,7 +37,7 @@ are a rag-tag band of highly altruistic individuals committed to producing better software for free than you could hope to purchase for money. You may snoop on pending developments via the archives at http://www.xray.mpe.mpg.de/mailing-lists/perl5-porters/ -and http://archive.develooper.com/perl5-porters@perl.org/ +and http://archive.develooper.com/perl5-porters@perl.org/ or the news gateway nntp://nntp.perl.org/perl.perl5.porters or its web interface at http://nntp.perl.org/group/perl.perl5.porters , or read the faq at http://perlhacker.org/p5p-faq , diff --git a/pod/perlfaq2.pod b/pod/perlfaq2.pod index 4555714..04e7351 100644 --- a/pod/perlfaq2.pod +++ b/pod/perlfaq2.pod @@ -1,6 +1,6 @@ =head1 NAME -perlfaq2 - Obtaining and Learning about Perl ($Revision: 1.9 $, $Date: 2002/03/09 21:01:13 $) +perlfaq2 - Obtaining and Learning about Perl ($Revision: 1.11 $, $Date: 2002/04/08 15:39:59 $) =head1 DESCRIPTION @@ -185,8 +185,8 @@ following groups: There is also a Usenet gateway to Perl mailing lists sponsored by perl.org at nntp://nntp.perl.org, or a web interface to the same lists at -http://nntp.perl.org/group/ . Other groups are listed at -http://lists.perl.org/ +http://nntp.perl.org/group/. Other groups are listed at +http://lists.perl.org/ . =head2 Where should I post source code? @@ -197,8 +197,8 @@ including setting the Followup-To header line to NOT include alt.sources; see their FAQ ( http://www.faqs.org/faqs/alt-sources-intro/ ) for details. If you're just looking for software, first use Google -( http://www.google.com/ ), Google's usenet search interface -( http://groups.google.com/ ), and CPAN Search ( http://search.cpan.org/ ). +( http://www.google.com ), Google's usenet search interface +( http://groups.google.com ), and CPAN Search ( http://search.cpan.org ). This is faster and more productive than just posting a request. =head2 Perl Books @@ -375,7 +375,7 @@ development, databases, Win32 Perl, graphical programming, regular expressions, and networking, and sponsors the Obfuscated Perl Contest and the Perl Poetry Contests. As of mid-2001, the dead tree version of TPJ will be published as a quarterly supplement of SysAdmin -magazine ( http://www.sysadmin.com/ ) For more details on TPJ, +magazine ( http://www.sysadminmag.com/ ) For more details on TPJ, see http://www.tpj.com/ Beyond this, magazines that frequently carry quality articles on @@ -394,7 +394,7 @@ http://www.stonehenge.com/merlyn/LinuxMag/ . To get the best performance, pick a site from the list below and use it to grab the complete list of mirror sites -which is at /CPAN/MIRRORED.BY or at http://mirror.cpan.org/ +which is at /CPAN/MIRRORED.BY or at http://mirror.cpan.org/ . From there you can find the quickest site for you. Remember, the following list is I the complete list of CPAN mirrors (the complete list contains 165 sites as of January 2001): @@ -407,7 +407,6 @@ following list is I the complete list of CPAN mirrors ftp://ftp.uvsq.fr/pub/perl/CPAN/ ftp://ftp.funet.fi/pub/languages/perl/CPAN/ ftp://ftp.dti.ad.jp/pub/lang/CPAN/ - ftp://mirror.aarnet.edu.au/pub/perl/CPAN/ ftp://cpan.if.usp.br/pub/mirror/CPAN/ One may also use xx.cpan.org where "xx" is the 2-letter country code diff --git a/pod/perlfaq3.pod b/pod/perlfaq3.pod index 2ac18e7..9a2908d 100644 --- a/pod/perlfaq3.pod +++ b/pod/perlfaq3.pod @@ -1,6 +1,6 @@ =head1 NAME -perlfaq3 - Programming Tools ($Revision: 1.15 $, $Date: 2002/02/11 19:29:52 $) +perlfaq3 - Programming Tools ($Revision: 1.17 $, $Date: 2002/04/08 15:39:59 $) =head1 DESCRIPTION @@ -154,9 +154,9 @@ for indenting, ^D is for undenting, and ^O is for blockdenting-- as it were. A more complete example, with comments, can be found at http://www.cpan.org/authors/id/TOMC/scripts/toms.exrc.gz -The a2ps http://www-inf.enst.fr/%7Edemaille/a2ps/black+white.ps.gz does +The a2ps http://www-inf.enst.fr/%7Edemaille/a2ps/black+white.ps does lots of things related to generating nicely printed output of -documents, as does enscript at http://people.ssh.fi/mtr/genscript/ +documents, as does enscript at http://people.ssh.fi/mtr/genscript/ . =head2 Is there a ctags for Perl? @@ -191,7 +191,7 @@ Perl, a Visual Studio.NET plug-in is currently (early 2001) in beta =item The Object System -( http://www.castlelink.co.uk/object_system/ ) is a Perl web +(http://www.castlelink.co.uk/object_system/) is a Perl web applications development IDE, apparently for any platform that runs Perl. @@ -240,11 +240,11 @@ information, although some allow you to save files as "Text Only". You can also download text editors designed specifically for programming, such as Textpad ( http://www.textpad.com/ ) and UltraEdit -( http://www.ultraedit.com/ ), among others. +( http://www.ultraedit.com ), among others. If you are using MacOS, the same concerns apply. MacPerl (for Classic environments) comes with a simple editor. -Popular external editors are BBEdit ( http://www.bbedit.com/ ) +Popular external editors are BBEdit ( http://www.bbedit.com ) or Alpha ( http://alpha.olm.net/ ). MacOS X users can use Unix editors as well. @@ -285,7 +285,8 @@ win32: http://www.cs.vu.nl/%7Etmgil/vi.html =back For vi lovers in general, Windows or elsewhere: -http://www.thomer.com/thomer/vi/vi.html + + http://www.thomer.com/thomer/vi/vi.html nvi ( http://www.bostic.com/vi/ , available from CPAN in src/misc/) is yet another vi clone, unfortunately not available for Windows, but in @@ -384,7 +385,7 @@ For a complete version of Tom Christiansen's vi configuration file, see http://www.cpan.org/authors/Tom_Christiansen/scripts/toms.exrc.gz , the standard benchmark file for vi emulators. The file runs best with nvi, the current version of vi out of Berkeley, which incidentally can be built -with an embedded Perl interpreter--see http://www.cpan.org/src/misc/ +with an embedded Perl interpreter--see http://www.cpan.org/src/misc . =head2 Where can I get perl-mode for emacs? @@ -655,7 +656,7 @@ anything a module written in C can. For more on mod_perl, see http://perl.apache.org/ With the FCGI module (from CPAN) and the mod_fastcgi -module ( available from http://www.fastcgi.com/ ) each of your Perl +module (available from http://www.fastcgi.com/) each of your Perl programs becomes a permanent CGI daemon process. Both of these solutions can have far-reaching effects on your system diff --git a/pod/perlfaq4.pod b/pod/perlfaq4.pod index b530516..bedc668 100644 --- a/pod/perlfaq4.pod +++ b/pod/perlfaq4.pod @@ -1,6 +1,6 @@ =head1 NAME -perlfaq4 - Data Manipulation ($Revision: 1.19 $, $Date: 2002/03/11 22:15:19 $) +perlfaq4 - Data Manipulation ($Revision: 1.20 $, $Date: 2002/04/07 18:46:13 $) =head1 DESCRIPTION @@ -1335,28 +1335,21 @@ lists, or you could just do something like this with an array: If you either have Perl 5.8.0 or later installed, or if you have Scalar-List-Utils 1.03 or later installed, you can say: - use List::Util 'shuffle'; + use List::Util 'shuffle'; @shuffled = shuffle(@list); -If not, you can use this: +If not, you can use a Fisher-Yates shuffle. - # fisher_yates_shuffle - # generate a random permutation of an array in place - # As in shuffling a deck of cards - # sub fisher_yates_shuffle { my $deck = shift; # $deck is a reference to an array my $i = @$deck; - while (--$i) { + while ($i--) { my $j = int rand ($i+1); @$deck[$i,$j] = @$deck[$j,$i]; } } -And here is an example of using it: - - # # shuffle my mpeg collection # my @mpeg =