perl.perlfaq.workers http://www.nntp.perl.org/group/perl.perlfaq.workers/ ... Copyright 1998-2014 perl.org Wed, 03 Sep 2014 04:36:05 +0000 ask@perl.org Re: Update in perlop by Shlomi Fish Hi Prateek,<br/><br/>On Wed, 4 Sep 2013 12:19:17 +0000<br/>&quot;Balasundaram, Prateek&quot; &lt;Prateek.Balasundaram@sig.com&gt; wrote:<br/><br/>&gt; Hello all,<br/>&gt; <br/>&gt; In the section:<br/>&gt; http://perldoc.perl.org/perlop.html#Auto-increment-and-Auto-decrement<br/>&gt; <br/>&gt; I believe this line is incorrect:<br/>&gt; &quot;undef is always treated as numeric, and in particular is changed to 0 before<br/>&gt; incrementing (so that a post-increment of an undef value will return 0 rather<br/>&gt; than undef).&quot;<br/>&gt; <br/>&gt; Upon testing:<br/>&gt; $ perl -le &#39;$val=undef;print(&quot;Initial Value: $val&quot;);$val++;print(&quot;Incremented<br/>&gt; Value: $val&quot;);&#39; <br/>&gt; Initial Value:<br/>&gt; Incremented Value: 1<br/>&gt; <br/><br/>What is meant by that is that if you do:<br/><br/>shlomif@telaviv1:~$ perl -le &#39;use Data::Dumper; $x=undef; my $y = ($x++);print<br/>Dumper([$y])&#39;<br/>$VAR1 = [<br/> 0<br/> ];<br/><br/>shlomif@telaviv1:~$ <br/><br/>Hope it helps.<br/><br/>Regards,<br/><br/> Shlomi Fish<br/><br/>&gt; It seems that the post-increment value of undef will be 1, not 0 as the<br/>&gt; documentation states.<br/>&gt; <br/>&gt; Regards,<br/>&gt; Prateek<br/>&gt; --<br/>&gt; Prateek Balasundaram<br/>&gt; prateek.balasundaram@sig.com<br/>&gt; (484)562-1281<br/>&gt; <br/><br/>-- <br/>-----------------------------------------------------------------<br/>Shlomi Fish http://www.shlomifish.org/<br/>List of Text Processing Tools - http://shlom.in/text-proc<br/><br/>Electrical Engineering studies. In the Technion. Been there. Done that. Forgot<br/>a lot. Remember too much.<br/><br/>Please reply to list if it&#39;s a mailing list post - http://shlom.in/reply .<br/> http://www.nntp.perl.org/group/perl.perlfaq.workers/2013/09/msg717.html Thu, 05 Sep 2013 05:40:32 +0000 Update in perlop by Balasundaram, Prateek Hello all,<br/><br/>In the section: http://perldoc.perl.org/perlop.html#Auto-increment-and-Auto-decrement<br/><br/>I believe this line is incorrect:<br/>&quot;undef is always treated as numeric, and in particular is changed to 0 before incrementing (so that a post-increment of an undef value will return 0 rather than undef).&quot;<br/><br/>Upon testing:<br/>$ perl -le &#39;$val=undef;print(&quot;Initial Value: $val&quot;);$val++;print(&quot;Incremented Value: $val&quot;);&#39;<br/>Initial Value:<br/>Incremented Value: 1<br/><br/>It seems that the post-increment value of undef will be 1, not 0 as the documentation states.<br/><br/>Regards,<br/>Prateek<br/>--<br/>Prateek Balasundaram<br/>prateek.balasundaram@sig.com<br/>(484)562-1281<br/><br/><br/><br/>________________________________<br/><br/>IMPORTANT: The information contained in this email and/or its attachments is confidential. If you are not the intended recipient, please notify the sender immediately by reply and immediately delete this message and all its attachments. Any review, use, reproduction, disclosure or dissemination of this message or any attachment by an unintended recipient is strictly prohibited. Neither this message nor any attachment is intended as or should be construed as an offer, solicitation or recommendation to buy or sell any security or other financial instrument. Neither the sender, his or her employer nor any of their respective affiliates makes any warranties as to the completeness or accuracy of any of the information contained herein or that this message or any of its attachments is free of viruses.<br/> http://www.nntp.perl.org/group/perl.perlfaq.workers/2013/09/msg716.html Wed, 04 Sep 2013 18:52:31 +0000 Re: Strawberry Perl Installing CPAN modules by Leo Lapworth Hi,<br/><br/>On 21 September 2011 16:04, Perl developer &lt;perldevelopment@gmail.com&gt;wrote:<br/><br/>&gt; I need help regarding install of CPAN modules in strawberry perl.<br/>&gt;<br/>&gt; I have a question about Perl connectivity to Teradata.<br/>&gt;<br/><br/>This is the third mailing list I have seen you post this to.<br/><br/>You are getting help on the beginners list - please do not keep posting to<br/>other lists as well.<br/><br/>Thanks<br/><br/>Leo<br/><br/> http://www.nntp.perl.org/group/perl.perlfaq.workers/2011/09/msg715.html Wed, 21 Sep 2011 12:05:42 +0000 Fwd: Strawberry Perl Installing CPAN modules by Perl developer I need help regarding install of CPAN modules in strawberry perl.<br/><br/>I have a question about Perl connectivity to Teradata.<br/><br/>I have been using Active Perl 5.12 on Windows xp since one year. I tried<br/>installing a perl module from CPAN<br/>and I got errors while performing the following steps.<br/>perl makefile.pl<br/>n|d(make)<br/>n|d(make) install<br/><br/>Recently I downloaded strawberry perl 5.12.3.0 and download CPAN module<br/>named DBD::Teradata-1.52.<br/>Using cpan client, I could download cpan module(get command).<br/>Files related to the module are created at<br/>C:\strawberry\cpan\build\DBD-Teradata-1.52-tLHaX2<br/><br/>But I get errors while installing them using<br/><br/>perl makefile.pl(This setp ran successfully)<br/>dmake<br/>dmake install<br/><br/><br/>The following is the error log. Is it becuase of the compilers I am using.<br/><br/>C:\strawberry\cpan\build\DBD-Teradata-1.52-tLHaX2&gt;perl Makefile.PL<br/><br/><br/> *** Configuring DBD::Teradata (feature-limited free edition)...<br/><br/><br/>***************************************************************<br/>*<br/>* !!!NOTE TO INSTALLERS!!!<br/>*<br/>* DBD::Teradata will be built using the following<br/>* directives:<br/>* Libraries:<br/>* Include files: -IC:\PROGRA~1\NCR\TERADA~1\cli\inc<br/>* Compile flags:<br/>*<br/>* If your CLI2 libraries and/or include files are in another<br/>* location, please update the TDAT_DBD_CLI_LIB and<br/>* TDAT_DBD_CLI_INC environment variables before running<br/>* Makefile.PL.<br/>*<br/>***************************************************************<br/><br/>Checking for DBI, 1.40 or later ... ok<br/>Checking for Math::BigInt, 1.73 or later ... ok<br/>Checking if your kit is complete...<br/>Looks good<br/>Writing Makefile for DBD::Teradata<br/><br/>C:\strawberry\cpan\build\DBD-Teradata-1.52-tLHaX2&gt;dmake<br/>cp lib/DBD/Teradata.pm blib\lib\DBD\Teradata.pm<br/>C:\strawberry\perl\bin\perl.exe C:\strawberry\perl\lib\ExtUtils\xsubpp<br/> -typemap<br/> C:\strawberry\perl\lib\ExtUtils\typemap Teradata.xs &gt; Teradata.xsc &amp;&amp;<br/>C:\straw<br/>berry\perl\bin\perl.exe -MExtUtils::Command -e &quot;mv&quot; -- Teradata.xsc<br/>Teradata.c<br/>Please specify prototyping behavior for Teradata.xs (see perlxs manual)<br/>gcc -c -IC:\PROGRA~1\NCR\TERADA~1\cli\inc -s -O2 -DWIN32<br/>-DHAVE_DES_FCRYPT<br/> -DUSE_SITECUSTOMIZE -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS<br/>-fno-strict-ali<br/>asing -mms-bitfields -DPERL_MSVCRT_READFIX -s -O2 -DVERSION=\&quot;1.52\&quot;<br/>-DXS_VERSION=\&quot;1.52\&quot; &quot;-IC:\strawberry\perl\lib\CORE&quot; Teradata.c<br/>Teradata.xs:5:22: coptypes.h: No such file or directory<br/>Teradata.xs:6:21: dbcarea.h: No such file or directory<br/>Teradata.xs:7:20: coperr.h: No such file or directory<br/>Teradata.xs:8:20: parcel.h: No such file or directory<br/>Teradata.xs:34: error: syntax error before &quot;DBCAREA&quot;<br/>Teradata.xs:34: warning: no semicolon at end of struct or union<br/>Teradata.xs:35: warning: data definition has no type or storage class<br/>Teradata.xs: In function `XS_DBD__Teradata__Cli_tdxs_set_debug&#39;:<br/>Teradata.xs:57: error: syntax error before &quot;dbcp&quot;<br/>Teradata.xs:58: error: `dbcp&#39; undeclared (first use in this function)<br/>Teradata.xs:58: error: (Each undeclared identifier is reported only once<br/>Teradata.xs:58: error: for each function it appears in.)<br/>Teradata.xs: In function `XS_DBD__Teradata__Cli_tdxs_init_dbcarea&#39;:<br/>Teradata.xs:67: error: syntax error before &quot;dbc_ctx&quot;<br/>Teradata.xs:68: error: `DBCAREA&#39; undeclared (first use in this function)<br/>Teradata.xs:68: error: `dbcp&#39; undeclared (first use in this function)<br/>Teradata.xs:72: error: `dbc_ctx&#39; undeclared (first use in this function)<br/>Teradata.xs:72: error: syntax error before &#39;)&#39; token<br/>Teradata.xs:78: error: `EM_OK&#39; undeclared (first use in this function)<br/>Teradata.xs: In function `XS_DBD__Teradata__Cli_tdxs_get_connection&#39;:<br/>Teradata.xs:101: error: syntax error before &quot;dbc_ctx&quot;<br/>Teradata.xs:102: error: `DBCAREA&#39; undeclared (first use in this function)<br/>Teradata.xs:102: error: `dbcp&#39; undeclared (first use in this function)<br/>Teradata.xs:102: error: `dbc_ctx&#39; undeclared (first use in this function)<br/>Teradata.xs:149: error: `DBFCON&#39; undeclared (first use in this function)<br/>Teradata.xs:156: error: `EM_OK&#39; undeclared (first use in this function)<br/>Teradata.xs:176: error: `DBFFET&#39; undeclared (first use in this function)<br/>Teradata.xs:184: error: `PclLSN&#39; undeclared (first use in this function)<br/>Teradata.xs:188: error: `PclSUCCESS&#39; undeclared (first use in this function)<br/>Teradata.xs:191: error: `PclFAILURE&#39; undeclared (first use in this function)<br/>Teradata.xs:192: error: `PclERROR&#39; undeclared (first use in this function)<br/>Teradata.xs:204: error: `PclENDSTATEMENT&#39; undeclared (first use in this<br/>function<br/>)<br/>Teradata.xs:205: error: `PclENDREQUEST&#39; undeclared (first use in this<br/>function)<br/>Teradata.xs:213: error: `REQEXHAUST&#39; undeclared (first use in this function)<br/>Teradata.xs:234: error: `DBFERQ&#39; undeclared (first use in this function)<br/>Teradata.xs: In function `XS_DBD__Teradata__Cli_tdxs_get_tdat_release&#39;:<br/>Teradata.xs:256: error: `dbc_ctx&#39; undeclared (first use in this function)<br/>Teradata.xs:256: error: syntax error before &#39;)&#39; token<br/>Teradata.xs:257: error: `DBCAREA&#39; undeclared (first use in this function)<br/>Teradata.xs:257: error: `dbcp&#39; undeclared (first use in this function)<br/>Teradata.xs: In function `XS_DBD__Teradata__Cli_tdxs_cleanup&#39;:<br/>Teradata.xs:272: error: syntax error before &quot;dbc_ctx&quot;<br/>Teradata.xs:273: error: `DBCAREA&#39; undeclared (first use in this function)<br/>Teradata.xs:273: error: `dbcp&#39; undeclared (first use in this function)<br/>Teradata.xs:273: error: `dbc_ctx&#39; undeclared (first use in this function)<br/>Teradata.xs:277: error: `DBFDSC&#39; undeclared (first use in this function)<br/>Teradata.xs:280: error: `EM_OK&#39; undeclared (first use in this function)<br/>Teradata.xs: In function `XS_DBD__Teradata__Cli_tdxs_send_request&#39;:<br/>Teradata.xs:302: error: syntax error before &quot;dbc_ctx&quot;<br/>Teradata.xs:303: error: `DBCAREA&#39; undeclared (first use in this function)<br/>Teradata.xs:303: error: `dbcp&#39; undeclared (first use in this function)<br/>Teradata.xs:303: error: `dbc_ctx&#39; undeclared (first use in this function)<br/>Teradata.xs:334: error: `DBFIRQ&#39; undeclared (first use in this function)<br/>Teradata.xs:337: error: `EM_OK&#39; undeclared (first use in this function)<br/>Teradata.xs: In function `XS_DBD__Teradata__Cli_tdxs_wait_for_response&#39;:<br/>Teradata.xs:358: error: `EM_OK&#39; undeclared (first use in this function)<br/>Teradata.xs: In function `XS_DBD__Teradata__Cli_tdxs_get_response&#39;:<br/>Teradata.xs:384: error: `dbc_ctx&#39; undeclared (first use in this function)<br/>Teradata.xs:384: error: syntax error before &#39;)&#39; token<br/>Teradata.xs:385: error: `DBCAREA&#39; undeclared (first use in this function)<br/>Teradata.xs:385: error: `dbcp&#39; undeclared (first use in this function)<br/>Teradata.xs:413: error: `DBFFET&#39; undeclared (first use in this function)<br/>Teradata.xs:414: error: `EM_OK&#39; undeclared (first use in this function)<br/>Teradata.xs:426: error: `EM_NODATA&#39; undeclared (first use in this function)<br/>Teradata.xs: In function `XS_DBD__Teradata__Cli_tdxs_end_request&#39;:<br/>Teradata.xs:447: error: syntax error before &quot;dbc_ctx&quot;<br/>Teradata.xs:448: error: `DBCAREA&#39; undeclared (first use in this function)<br/>Teradata.xs:448: error: `dbcp&#39; undeclared (first use in this function)<br/>Teradata.xs:448: error: `dbc_ctx&#39; undeclared (first use in this function)<br/>Teradata.xs:449: error: `EM_OK&#39; undeclared (first use in this function)<br/>Teradata.xs:455: error: `DBFERQ&#39; undeclared (first use in this function)<br/>Teradata.xs: In function `XS_DBD__Teradata__Cli_tdxs_abort_request&#39;:<br/>Teradata.xs:474: error: syntax error before &quot;dbc_ctx&quot;<br/>Teradata.xs:475: error: `DBCAREA&#39; undeclared (first use in this function)<br/>Teradata.xs:475: error: `dbcp&#39; undeclared (first use in this function)<br/>Teradata.xs:475: error: `dbc_ctx&#39; undeclared (first use in this function)<br/>Teradata.xs:476: error: `EM_OK&#39; undeclared (first use in this function)<br/>Teradata.xs:482: error: `DBFABT&#39; undeclared (first use in this function)<br/>Teradata.xs: In function `XS_DBD__Teradata__Cli_tdxs_test_leak&#39;:<br/>Teradata.xs:504: error: `dbc_ctx&#39; undeclared (first use in this function)<br/>Teradata.xs:504: error: syntax error before &#39;)&#39; token<br/>Teradata.xs:505: error: `DBCAREA&#39; undeclared (first use in this function)<br/>Teradata.xs:505: error: `dbcp&#39; undeclared (first use in this function)<br/>Teradata.xs:528: error: `DBFIRQ&#39; undeclared (first use in this function)<br/>Teradata.xs:530: error: `EM_OK&#39; undeclared (first use in this function)<br/>Teradata.xs:545: error: `DBFFET&#39; undeclared (first use in this function)<br/>Teradata.xs:555: error: `DBFERQ&#39; undeclared (first use in this function)<br/>dmake.exe: Error code 129, while making &#39;Teradata.o&#39;<br/><br/> http://www.nntp.perl.org/group/perl.perlfaq.workers/2011/09/msg714.html Wed, 21 Sep 2011 12:02:26 +0000 Changes to PerlFAQ process by Leo Lapworth Dear PerlFAQ Workers,<br/><br/>You&#39;re probably aware that after many years of looking after the perlfaq<br/>brian d foy moved on from running it about a month ago.<br/><br/>At the request of several people I&#39;ve taken it on.<br/><br/>A few changes are happening..<br/><br/>- PerlFAQ is now dual-life (it lives as a CPAN module AND in Perl core),<br/> the Perl core will be updated from the CPAN version.<br/><br/>- Please make changes/pull requests against<br/> https://github.com/perl-doc-cats/perlfaq<br/><br/>- Please open issues for discussion here:<br/> https://github.com/perl-doc-cats/perlfaq/issues<br/><br/>See https://github.com/perl-doc-cats/perlfaq/wiki for general over view...<br/>when we are ready to put a new version on CPAN I will merge<br/>perl-doc-cats/perlfaq<br/>to https://github.com/tpf/perlfaq which will always be the same as the<br/>version on CPAN and the source of http://faq.perl.org/<br/><br/>The mailing list will continue to exist for now, but I&#39;d like discussions<br/>to move more to github issues where it is easier to comment on specific<br/>patches and relate patches to issues.<br/><br/>There will be a new website as well, which will look like this:<br/>http://leo.cuckoo.org/faq/html/perlfaq.html<br/><br/>I am keen to have all the current perlfaq&#39;s reviewed in detail..<br/><br/>1) Are they still frequently asked?<br/>2) Is the answer still correct?<br/>3) Is the answer still the best answer?<br/>4) Would a link to an authoritative answer be better than trying to<br/> maintain information in the faq (there is lots of duplication<br/> in perl documentation, and now lots of it is out of date, I don&#39;t<br/> want to perpetuate this)?<br/><br/>So any help is really appreciated!<br/><br/>Many thanks<br/><br/>Leo<br/><br/> http://www.nntp.perl.org/group/perl.perlfaq.workers/2011/09/msg713.html Thu, 01 Sep 2011 01:09:30 +0000 Fwd: Error in Perlfaq6 by Meir Michanie ---------- Forwarded message ----------<br/>From: Meir Michanie &lt;meirgotroot@gmail.com&gt;<br/>Date: Wed, Aug 17, 2011 at 10:53 AM<br/>Subject: Re: Error in Perlfaq6<br/>To: brian.d.foy@gmail.com<br/><br/><br/>&nbsp;perlfaq6 - Regular Expressions ($Revision: 1.38 $, $Date: 2005/12/31<br/>00:54:37 $)<br/><br/><br/>On Wed, Aug 17, 2011 at 10:52 AM, Meir Michanie &lt;meirgotroot@gmail.com&gt; wrote:<br/>&gt; Hi Brian,<br/>&gt; The foreach loop should have the following line of code instead:<br/>&gt; if (/\b$pattern\b/i){print ; next LINE;}<br/>&gt;<br/>&gt; ==================================================<br/>&gt; How do I efficiently match many regular expressions at once?<br/>&gt;<br/>&gt; &nbsp; &nbsp; &nbsp; ( contributed by brian d foy )<br/>&gt;<br/>&gt; &nbsp; &nbsp; &nbsp; Avoid asking Perl to compile a regular expression every time<br/>&gt; you want to match it. &nbsp;In this example, perl must recompile the<br/>&gt; regular expression<br/>&gt; &nbsp; &nbsp; &nbsp; for every iteration of the foreach() loop since it has no way<br/>&gt; to know what $pattern will be.<br/>&gt;<br/>&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; @patterns = qw( foo bar baz );<br/>&gt;<br/>&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; LINE: while( &lt;&gt; )<br/>&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {<br/>&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; foreach $pattern ( @patterns )<br/>&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {<br/>&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; print if /\b$pattern\b/i;<br/>&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; next LINE;<br/>&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br/>&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br/>&gt; ===================================================<br/>&gt;<br/> http://www.nntp.perl.org/group/perl.perlfaq.workers/2011/08/msg712.html Mon, 22 Aug 2011 06:47:29 +0000 Re: Quick usability enhancement to perlfaq.pod by Matthew Horsfall My mistake,<br/><br/>I meant perlfaq.pod in the subject.<br/><br/>-- Matthew Horsfall (alh)<br/><br/>On Sun, Jul 31, 2011 at 8:34 PM, Matthew Horsfall &lt;wolfsage@gmail.com&gt;wrote:<br/><br/>&gt; Hello,<br/>&gt;<br/>&gt; I believe the following minor change may help new users / browsers of<br/>&gt; perlfaq.pod make better use of the perlfaq:<br/>&gt;<br/>&gt; mhorsfall@Fireforge:~/my-perl$ git show<br/>&gt; commit 15e42d2617514e42a0c1e082d6d9b5175c52b5f5<br/>&gt; Author: Matthew Horsfall &lt;wolfsage@gmail.com&gt;<br/>&gt; Date: Sun Jul 31 20:18:57 2011 -0400<br/>&gt;<br/>&gt; Add quick note to perlfaq main page about searching the perlfaq<br/>&gt;<br/>&gt; diff --git a/pod/perlfaq.pod b/pod/perlfaq.pod<br/>&gt; index 9ca88c8..61b8f3b 100644<br/>&gt; --- a/pod/perlfaq.pod<br/>&gt; +++ b/pod/perlfaq.pod<br/>&gt; @@ -16,6 +16,12 @@ that lets you read the L&lt;perlfaq&gt;:<br/>&gt;<br/>&gt; $ perldoc perlfaq<br/>&gt;<br/>&gt; +or search the L&lt;perlfaq&gt; question headings:<br/>&gt; +<br/>&gt; + $ perldoc -q open<br/>&gt; +<br/>&gt; +See C&lt;perldoc&gt; for more information.<br/>&gt; +<br/>&gt; Besides your local system, you can find the perlfaq on the web, including<br/>&gt; at http://perldoc.perl.org/ .<br/>&gt;<br/>&gt; The patch can be found at:<br/>&gt; https://github.com/wolfsage/perl/commit/15e42d2617514e42a0c1e082d6d9b5175c52b5f5<br/>&gt;<br/>&gt; Thanks for your consideration,<br/>&gt;<br/>&gt; -- Matthew Horsfall (alh)<br/>&gt;<br/><br/> http://www.nntp.perl.org/group/perl.perlfaq.workers/2011/07/msg711.html Sun, 31 Jul 2011 23:44:09 +0000 Quick usability enhancement to perldoc.pod by Matthew Horsfall Hello,<br/><br/>I believe the following minor change may help new users / browsers of<br/>perlfaq.pod make better use of the perlfaq:<br/><br/>mhorsfall@Fireforge:~/my-perl$ git show<br/>commit 15e42d2617514e42a0c1e082d6d9b5175c52b5f5<br/>Author: Matthew Horsfall &lt;wolfsage@gmail.com&gt;<br/>Date: Sun Jul 31 20:18:57 2011 -0400<br/><br/> Add quick note to perlfaq main page about searching the perlfaq<br/><br/>diff --git a/pod/perlfaq.pod b/pod/perlfaq.pod<br/>index 9ca88c8..61b8f3b 100644<br/>--- a/pod/perlfaq.pod<br/>+++ b/pod/perlfaq.pod<br/>@@ -16,6 +16,12 @@ that lets you read the L&lt;perlfaq&gt;:<br/><br/> $ perldoc perlfaq<br/><br/>+or search the L&lt;perlfaq&gt; question headings:<br/>+<br/>+ $ perldoc -q open<br/>+<br/>+See C&lt;perldoc&gt; for more information.<br/>+<br/> Besides your local system, you can find the perlfaq on the web, including<br/> at http://perldoc.perl.org/ .<br/><br/>The patch can be found at:<br/>https://github.com/wolfsage/perl/commit/15e42d2617514e42a0c1e082d6d9b5175c52b5f5<br/><br/>Thanks for your consideration,<br/><br/>-- Matthew Horsfall (alh)<br/><br/> http://www.nntp.perl.org/group/perl.perlfaq.workers/2011/07/msg710.html Sun, 31 Jul 2011 23:44:07 +0000 Correction in perlfaq by Chankey Pathak Sir I was going through the perlfaq and I found an error.<br/><br/>Check this: http://perldoc.perl.org/perlfaq.html#NAME<br/><br/>&lt;http://perldoc.perl.org/perlfaq.html#NAME&gt;Post: Where to get the perlfaq<br/><br/>The perlfaq documents are in the perl source tree (see<br/>perlgit&lt;http://perldoc.perl.org/perlgit.html&gt;<br/>).<br/><br/>*The URL of perlgit is invalid. It doesn&#39;t exist. Please correct this.*<br/>*<br/>*<br/>*<br/>*<br/>*Thank you!*<br/><br/><br/>-- <br/>Regards,<br/>Chankey Pathak &lt;http://chankeypathak.blogspot.com&gt;<br/><br/> http://www.nntp.perl.org/group/perl.perlfaq.workers/2011/07/msg709.html Sat, 16 Jul 2011 15:47:54 +0000 perlfaq5: skip comment line by Jerome Reybert Hi,<br/><br/>this is a suggestion for the perlfaq5. In this FAQ, you suggest to use<br/>this command to skip commented lines when reading a file.<br/><br/> next if /^\s+#/; # skip comment lines<br/><br/>You should replace s+ by s*, since s+ will only take into account lines<br/>with at least one space before #.<br/><br/>I know this is just an example. But if you just copy paste the line, it<br/>can leads to errors.<br/><br/>Regards,<br/><br/>-- <br/>J&eacute;r&ocirc;me<br/> http://www.nntp.perl.org/group/perl.perlfaq.workers/2011/07/msg708.html Fri, 01 Jul 2011 01:59:58 +0000 Character encoding issue in perlfaq4.html (Data: Hashes section) by Nick Morrott Hey,<br/><br/>Whilst reading through the &quot;Data: Hashes&quot; section of the FAQ I noticed<br/>what appears to be a UTF-8 to ISO-8859-1 to HTML entity char<br/>conversion error in brian d foy&#39;s entry about multilevel hash checks<br/>(the last item in the section,<br/>&quot;http://faq.perl.org/perlfaq4.html#How_can_I_check_if_a&quot;).<br/><br/>Specifically, the word &quot;na&iuml;ve&quot; contains an incorrectly-encoded &quot;LATIN<br/>SMALL LETTER I WITH DIAERESIS&quot; character, which is instead shown using<br/>2 HTML entities (&amp;Atilde;&amp;macr;) that reflect the 2 bytes the UTF-8<br/>encoding of this character uses (C3 AF). I think the correct HTML<br/>entity to use instead would be &quot;&amp;iuml;&quot;.<br/><br/>Cheers,<br/>Nick<br/> http://www.nntp.perl.org/group/perl.perlfaq.workers/2011/04/msg707.html Wed, 27 Apr 2011 00:31:13 +0000 Re: Grammatical error in FAQ 8.45 by brian d foy [[ This message was both posted and mailed: see<br/> the &quot;To,&quot; &quot;Cc,&quot; and &quot;Newsgroups&quot; headers for details. ]]<br/><br/>In article &lt;849BA556-4DBF-44C9-9FCB-03FDDB825C84@masonsmusic.co.uk&gt;,<br/>Justin Catterall &lt;justin@masonsmusic.co.uk&gt; wrote:<br/><br/><br/>&gt; It has come to my attention that in FAQ 8.45 (How do I install a <br/>&gt; module from CPAN?) a line reads:<br/><br/>I&#39;ll fix this in the next update.<br/><br/>Thanks,<br/> http://www.nntp.perl.org/group/perl.perlfaq.workers/2011/02/msg706.html Sat, 19 Feb 2011 15:54:38 +0000 Grammatical error in FAQ 8.45 by Justin Catterall <br/>Dear perlfaq workers,<br/><br/>It has come to my attention that in FAQ 8.45 (How do I install a <br/>module from CPAN?) a line reads:<br/><br/> using the &quot;cpan&quot; command the comes with Perl. You can give it a <br/>list of<br/><br/>To be more grammatically correct I believe this should be:<br/> using the &quot;cpan&quot; command that comes with Perl. You can give it a <br/>list of<br/><br/>This error was seen in one of the regular FAQ posts to newsgroup <br/>comp.lang.perl.misc, and is not in my Debian, or Mac OS X versions.<br/><br/>-- <br/>Justin C, by the sea.<br/><br/> http://www.nntp.perl.org/group/perl.perlfaq.workers/2011/02/msg705.html Fri, 18 Feb 2011 08:19:02 +0000 Re: FAQ 4.17 How do I find yesterday's date? by brian d foy [[ This message was both posted and mailed: see<br/> the &quot;To,&quot; &quot;Cc,&quot; and &quot;Newsgroups&quot; headers for details. ]]<br/><br/>In article &lt;4D502FE7.9040106@cox.net&gt;, James Wright<br/>&lt;monkey_vegas@cox.net&gt; wrote:<br/><br/>&gt; Since the faq is for the current released version of Perl, where <br/>&gt; Time::Piece and Time::Seconds are in core (but DateTime and Date::Calc <br/>&gt; are not), wouldn&#39;t a Time::Piece / Time::Seconds answer be better than <br/>&gt; the ones using non-core modules or the too complicated one using <br/>&gt; Time::Local, something like<br/><br/>Good suggestion, <br/><br/>I&#39;ll make this a patch on my next pass through the perlfaq.<br/><br/>Thanks, :)<br/> http://www.nntp.perl.org/group/perl.perlfaq.workers/2011/02/msg704.html Thu, 10 Feb 2011 19:05:26 +0000 Re: FAQ 4.14 How can I compare two dates and find the difference? by brian d foy [[ This message was both posted and mailed: see<br/> the &quot;To,&quot; &quot;Cc,&quot; and &quot;Newsgroups&quot; headers for details. ]]<br/><br/>In article &lt;4D503604.90001@cox.net&gt;, James Wright<br/>&lt;monkey_vegas@cox.net&gt; wrote:<br/><br/>&gt; Perhaps mention the core Time::Piece + Time::Seconds modules before the <br/>&gt; non-core modules here?<br/><br/>Good suggestion. I&#39;ll make this patch on my next documentation cycle.<br/><br/>Thanks,<br/> http://www.nntp.perl.org/group/perl.perlfaq.workers/2011/02/msg703.html Thu, 10 Feb 2011 19:04:38 +0000 Re: FAQ 4.14 How can I compare two dates and find the difference? by James Wright On 02/06/11 03:00, PerlFAQ Server wrote:<br/>&gt; This is an excerpt from the latest version perlfaq4.pod, which<br/>&gt; comes with the standard Perl distribution. These postings aim to<br/>&gt; reduce the number of repeated questions as well as allow the community<br/>&gt; to review and update the answers. The latest version of the complete<br/>&gt; perlfaq is at http://faq.perl.org .<br/>&gt;<br/>&gt; --------------------------------------------------------------------<br/>&gt;<br/>&gt; 4.14: How can I compare two dates and find the difference?<br/>&gt;<br/>&gt; (contributed by brian d foy)<br/>&gt;<br/>&gt; You could just store all your dates as a number and then subtract. Life<br/>&gt; isn&#39;t always that simple though. If you want to work with formatted<br/>&gt; dates, the &quot;Date::Manip&quot;, &quot;Date::Calc&quot;, or &quot;DateTime&quot; modules can help<br/>&gt; you.<br/>&gt;<br/>&gt;<br/>&gt;<br/>&gt; --------------------------------------------------------------------<br/>&gt;<br/>&gt; The perlfaq-workers, a group of volunteers, maintain the perlfaq. They<br/>&gt; are not necessarily experts in every domain where Perl might show up,<br/>&gt; so please include as much information as possible and relevant in any<br/>&gt; corrections. The perlfaq-workers also don&#39;t have access to every<br/>&gt; operating system or platform, so please include relevant details for<br/>&gt; corrections to examples that do not work on particular platforms.<br/>&gt; Working code is greatly appreciated.<br/>&gt;<br/>&gt; If you&#39;d like to help maintain the perlfaq, see the details in<br/>&gt; perlfaq.pod.<br/><br/>Perhaps mention the core Time::Piece + Time::Seconds modules before the <br/>non-core modules here? Could also add an example, like this:<br/><br/>use Time::Piece;<br/>use Time::Seconds;<br/><br/>my $date_one = Time::Piece-&gt;strptime(&#39;Feb 1 2011&#39;, &#39;%b %d %Y&#39;);<br/>my $date_two = Time::Piece-&gt;strptime(&#39;Dec 31 2010&#39;, &#39;%b %d %Y&#39;);<br/><br/>my $date_diff = $date_one - $date_two;<br/>print &quot;Difference is: &quot;, $date_diff-&gt;days, &quot; days\n&quot;;<br/><br/>In fact, couldn&#39;t &#39;mention Time::Piece and/or Time::Seconds&#39; be applied <br/>to most of the answers in perlfaq4? As an example, &#39;How can I take a <br/>string and turn it into epoch seconds?&#39; can be answered by referring to <br/>the strptime function in Time::Piece. And Time::Piece has the methods <br/>to answer all the questions in &#39;How can I find the Julian Day?&#39;<br/><br/><br/><br/><br/> http://www.nntp.perl.org/group/perl.perlfaq.workers/2011/02/msg702.html Wed, 09 Feb 2011 01:16:26 +0000 Re: FAQ 4.17 How do I find yesterday's date? by James Wright On 02/07/11 03:00, PerlFAQ Server wrote:<br/>&gt; This is an excerpt from the latest version perlfaq4.pod, which<br/>&gt; comes with the standard Perl distribution. These postings aim to<br/>&gt; reduce the number of repeated questions as well as allow the community<br/>&gt; to review and update the answers. The latest version of the complete<br/>&gt; perlfaq is at http://faq.perl.org .<br/>&gt;<br/>&gt; --------------------------------------------------------------------<br/>&gt;<br/>&gt; 4.17: How do I find yesterday&#39;s date?<br/>&gt;<br/>&gt; (contributed by brian d foy)<br/>&gt;<br/>&gt; Use one of the Date modules. The &quot;DateTime&quot; module makes it simple, and<br/>&gt; give you the same time of day, only the day before.<br/>&gt;<br/>&gt; use DateTime;<br/>&gt;<br/>&gt; my $yesterday = DateTime-&gt;now-&gt;subtract( days =&gt; 1 );<br/>&gt;<br/>&gt; print &quot;Yesterday was $yesterday\n&quot;;<br/>&gt;<br/>&gt; You can also use the &quot;Date::Calc&quot; module using its &quot;Today_and_Now&quot;<br/>&gt; function.<br/>&gt;<br/>&gt; use Date::Calc qw( Today_and_Now Add_Delta_DHMS );<br/>&gt;<br/>&gt; my @date_time = Add_Delta_DHMS( Today_and_Now(), -1, 0, 0, 0 );<br/>&gt;<br/>&gt; print &quot;@date_time\n&quot;;<br/>&gt;<br/>&gt; Most people try to use the time rather than the calendar to figure out<br/>&gt; dates, but that assumes that days are twenty-four hours each. For most<br/>&gt; people, there are two days a year when they aren&#39;t: the switch to and<br/>&gt; from summer time throws this off. Let the modules do the work.<br/>&gt;<br/>&gt; If you absolutely must do it yourself (or can&#39;t use one of the modules),<br/>&gt; here&#39;s a solution using &quot;Time::Local&quot;, which comes with Perl:<br/>&gt;<br/>&gt; # contributed by Gunnar Hjalmarsson<br/>&gt; use Time::Local;<br/>&gt; my $today = timelocal 0, 0, 12, ( localtime )[3..5];<br/>&gt; my ($d, $m, $y) = ( localtime $today-86400 )[3..5];<br/>&gt; printf &quot;Yesterday: %d-%02d-%02d\n&quot;, $y+1900, $m+1, $d;<br/>&gt;<br/>&gt; In this case, you measure the day starting at noon, and subtract 24<br/>&gt; hours. Even if the length of the calendar day is 23 or 25 hours, you&#39;ll<br/>&gt; still end up on the previous calendar day, although not at noon. Since<br/>&gt; you don&#39;t care about the time, the one hour difference doesn&#39;t matter<br/>&gt; and you end up with the previous date.<br/>&gt;<br/>&gt;<br/>&gt;<br/>&gt; --------------------------------------------------------------------<br/>&gt;<br/>&gt; The perlfaq-workers, a group of volunteers, maintain the perlfaq. They<br/>&gt; are not necessarily experts in every domain where Perl might show up,<br/>&gt; so please include as much information as possible and relevant in any<br/>&gt; corrections. The perlfaq-workers also don&#39;t have access to every<br/>&gt; operating system or platform, so please include relevant details for<br/>&gt; corrections to examples that do not work on particular platforms.<br/>&gt; Working code is greatly appreciated.<br/>&gt;<br/>&gt; If you&#39;d like to help maintain the perlfaq, see the details in<br/>&gt; perlfaq.pod.<br/><br/>Since the faq is for the current released version of Perl, where <br/>Time::Piece and Time::Seconds are in core (but DateTime and Date::Calc <br/>are not), wouldn&#39;t a Time::Piece / Time::Seconds answer be better than <br/>the ones using non-core modules or the too complicated one using <br/>Time::Local, something like:<br/><br/>use Time::Piece;<br/>use Time::Seconds;<br/><br/>my $yesterday = localtime() - ONE_DAY;<br/>print &quot;Yesterday was $yesterday\n&quot;;<br/><br/><br/>or<br/><br/>use Time::Piece ();<br/>use Time::Seconds ();<br/><br/>my $yesterday = Time::Piece::localtime() - Time::Seconds::ONE_DAY;<br/>print &quot;Yesterday was $yesterday\n&quot;;<br/><br/> http://www.nntp.perl.org/group/perl.perlfaq.workers/2011/02/msg701.html Wed, 09 Feb 2011 01:16:25 +0000 Re: Contribution for Perlfaq3 by brian d foy In article &lt;E1PApyu-0005R1-BB@davesource.com&gt;, David Ljung Madison<br/>&lt;dave@davesource.com&gt; wrote:<br/><br/>&gt; First of all, thank you for all the work for creating the perlfaq, it&#39;s<br/>&gt; a great resource.<br/>&gt; <br/>&gt; However, in perlfaq3 there is this question:<br/>&gt; <br/>&gt; &quot;How can I hide the source for my Perl program?&quot;<br/>&gt; <br/>&gt; The answer is very one-sided. Further discussion is up at perlmonks:<br/>&gt; <br/>&gt; http://www.perlmonks.org/?node_id=867535<br/>&gt; <br/>&gt; Regardless of whether a plug for my specific free (cost) solution<br/>&gt; is added, I think it would be worth mentioning that there *are*<br/>&gt; tools for accomplishing this with various costs and tradeoffs.<br/><br/>I think the perlfaq3 answer already says that there are tools and that<br/>they have trade-offs. I don&#39;t see this as one-sided. It&#39;s not denying<br/>the existence of other tools.<br/><br/>You write on http://marginalhacks.com/Hacks/perlc/ :<br/><br/>---<br/>These answers are mostly true, and also a big copout. Ignoring the<br/>practicality of hiding the code in most situations just because someone<br/>can get the code is like deciding to not lock your house anymore, just<br/>because locks can be picked.<br/>---<br/><br/>The analogy misses the point. <br/><br/>If I lock my house and someone picks the lock, that one person (or<br/>crew) has access to my house. The risk to that one person is immediate<br/>death if they choose poorly. When my house is compromised, I can fix it<br/>to once again restrict access to everyone. And, picking my lock only<br/>gives someone access to my house, not all houses.<br/><br/>When someone hacks your encoding of your script, the entire internet<br/>now has it. Indeed, one of the biggest problems is that only one person<br/>has to do the work to make it available for everyone. The risk to that<br/>one person is insignificant. That&#39;s one of the reasons that software<br/>piracy is such a problem: for most people it&#39;s virtually no work at<br/>all, and you can&#39;t reverse that. It doesn&#39;t matter that there are<br/>potentially few people who can accomplish this because it only takes<br/>one person.<br/><br/>Not only that, when someone compromises your tool, it not only affects<br/>the thing that you&#39;re trying hide, but all the things that everyone is<br/>trying to hide with your tool. People like to publish their exploits,<br/>after all (there is even one in Mastering Perl).<br/><br/>So, the history of software anti-piracy has been an arms race. Anything<br/>you do is obsolete shortly.<br/> http://www.nntp.perl.org/group/perl.perlfaq.workers/2010/10/msg700.html Tue, 26 Oct 2010 22:17:49 +0000 Contribution for Perlfaq3 by David Ljung Madison <br/>First of all, thank you for all the work for creating the perlfaq, it&#39;s<br/>a great resource.<br/><br/>However, in perlfaq3 there is this question:<br/><br/>&quot;How can I hide the source for my Perl program?&quot;<br/><br/>The answer is very one-sided. Further discussion is up at perlmonks:<br/><br/> http://www.perlmonks.org/?node_id=867535<br/><br/>Regardless of whether a plug for my specific free (cost) solution<br/>is added, I think it would be worth mentioning that there *are*<br/>tools for accomplishing this with various costs and tradeoffs.<br/><br/>Taking the hard line that source code hiding is bad is one thing, but it<br/>isn&#39;t the answer to the FAQ. Or at least it would be less disingenious<br/>if the FAQ said something along the lines of:<br/><br/> &quot;There isn&#39;t a perfect solution to hiding your source code,<br/> and since we think it&#39;s wrong to hide your source code, we<br/> won&#39;t discuss the imperfect solutions here&quot;<br/><br/><br/>And yes, I know there are ways to get around all of the solutions, <br/>including my own. And I can also pick the lock to your house. :)<br/><br/>Dave++<br/><br/>---------------------------------------------------------------------------<br/>Dave Ljung Madison http://GetDave.com/ 415.341.5555<br/>--------- Rome did not create a great empire by having meetings, ----------<br/> they did it by killing all those who opposed them.<br/> http://www.nntp.perl.org/group/perl.perlfaq.workers/2010/10/msg699.html Tue, 26 Oct 2010 14:26:03 +0000 Re: FAQ 4.72 How do I determine whether a scalar is a number/whole/integer/float? by brian d foy [[ This message was both posted and mailed: see<br/> the &quot;To,&quot; &quot;Cc,&quot; and &quot;Newsgroups&quot; headers for details. ]]<br/><br/>In article &lt;4CB3903D.80509@uwaterloo.ca&gt;, David Canzi<br/>&lt;dmcanzi@uwaterloo.ca&gt; wrote:<br/><br/>&gt; Suggested change to simplify some regular expressions:<br/><br/>I used this opportunity to also convert the example to given-when. The<br/>change is a13ded5516803d9baff49d9177619361dcc9d083.<br/> http://www.nntp.perl.org/group/perl.perlfaq.workers/2010/10/msg698.html Wed, 13 Oct 2010 20:27:43 +0000 FAQ 4.72 How do I determine whether a scalar is a number/whole/integer/float? by David Canzi Suggested change to simplify some regular expressions:<br/><br/>*** FAQ_4.72_before Mon Oct 11 18:07:09 2010<br/>--- FAQ_4.72_after Mon Oct 11 18:09:57 2010<br/>***************<br/>*** 9,13 ****<br/> if (/^[+-]?\d+$/) { print &quot;is a +/- integer\n&quot; }<br/>! if (/^-?\d+\.?\d*$/) { print &quot;is a real number\n&quot; }<br/>! if (/^-?(?:\d+(?:\.\d*)?|\.\d+)$/) { print &quot;is a decimal <br/>number\n&quot; }<br/>! if (/^([+-]?)(?=\d|\.\d)\d*(\.\d*)?([Ee]([+-]?\d+))?$/)<br/> { print &quot;a C float\n&quot; }<br/>--- 9,12 ----<br/> if (/^[+-]?\d+$/) { print &quot;is a +/- integer\n&quot; }<br/>! if (/^-?(?:\d+\.?|\.\d)\d*$/) { print &quot;is a decimal <br/>number\n&quot; }<br/>! if (/^[+-]?(?=\.?\d)\d*\.?\d*(e[+-]?\d+)?$/i)<br/> { print &quot;a C float\n&quot; }<br/><br/>The regex /^-?\d+\.?\d*$/ is deleted because it doesn&#39;t match<br/>numeric strings like &#39;.5&#39; with no digits before the decimal point,<br/>and is otherwise equivalent to the regex on the next line. The<br/>other two regexes are simplified.<br/><br/> http://www.nntp.perl.org/group/perl.perlfaq.workers/2010/10/msg697.html Tue, 12 Oct 2010 05:49:46 +0000 Re: The canonical source for perlfaq is now the perl reop by Craig A. Berry On Tue, Aug 24, 2010 at 9:45 PM, Craig A. Berry &lt;craig.a.berry@gmail.com&gt; wrote:<br/>&gt; On Tue, Aug 24, 2010 at 7:02 PM, brian d foy &lt;brian.d.foy@gmail.com&gt; wrote:<br/>&gt;&gt; In article<br/>&gt;&gt; &lt;AANLkTinkUqcz0-Hw4DH74FHy6cEUiNnznBQR07YacyyU@mail.gmail.com&gt;, Craig<br/>&gt;&gt; A. Berry &lt;craig.a.berry@gmail.com&gt; wrote:<br/>&gt;&gt;<br/>&gt;&gt;&gt; In that case should the following entry in perl5122delta.pod be<br/>&gt;&gt;&gt; changed to reflect the newest new canonical location?<br/>&gt;&gt;&gt;<br/>&gt;&gt;&gt; =item *<br/>&gt;&gt;&gt;<br/>&gt;&gt;&gt; The version of L&lt;perlfaq&gt; shipped with the perl core has been updated to the<br/>&gt;&gt;&gt; latest official FAQ version as available at<br/>&gt;&gt;&gt; L&lt;git://github.com/briandfoy/perlfaq.git&gt;.<br/><br/>I&#39;ve updated the perldelta entry in a way that should have us covered<br/>regardless of whether we have a somewhat recent sync or the very<br/>latest sync in 5.12.2:<br/><br/>http://perl5.git.perl.org/perl.git/commitdiff/9342ced95cfdcab3480a86d0245d06193082139b<br/><br/>Let me know if anything isn&#39;t right about that, or, better yet, just fix it.<br/> http://www.nntp.perl.org/group/perl.perlfaq.workers/2010/08/msg696.html Wed, 25 Aug 2010 01:01:08 +0000 Re: The canonical source for perlfaq is now the perl reop by Craig A. Berry On Tue, Aug 24, 2010 at 7:02 PM, brian d foy &lt;brian.d.foy@gmail.com&gt; wrote:<br/>&gt; In article<br/>&gt; &lt;AANLkTinkUqcz0-Hw4DH74FHy6cEUiNnznBQR07YacyyU@mail.gmail.com&gt;, Craig<br/>&gt; A. Berry &lt;craig.a.berry@gmail.com&gt; wrote:<br/>&gt;<br/>&gt;&gt; In that case should the following entry in perl5122delta.pod be<br/>&gt;&gt; changed to reflect the newest new canonical location?<br/>&gt;&gt;<br/>&gt;&gt; =item *<br/>&gt;&gt;<br/>&gt;&gt; The version of L&lt;perlfaq&gt; shipped with the perl core has been updated to the<br/>&gt;&gt; latest official FAQ version as available at<br/>&gt;&gt; L&lt;git://github.com/briandfoy/perlfaq.git&gt;.<br/>&gt;<br/>&gt; Well, it should point to whereever you synced it from.<br/><br/>Actually I didn&#39;t sync anything, you did:<br/><br/>http://perl5.git.perl.org/perl.git/commitdiff/d12d61c<br/><br/>and then Merijn requested that it get pulled to maint, and a couple of<br/>us voted +1, and then someone (can&#39;t remember who) cherry picked it.<br/><br/>&gt; My github repo<br/>&gt; is now behind my branch in the main repo.<br/>&gt;<br/>&gt; It would be nice to have my latest perlfaq updates cherrypicked into<br/>&gt; the maintenance branch though.<br/><br/>Which gets us back to what you said in your original post:<br/><br/>&gt; The only question is who and when to pull the new versions into blead.<br/><br/>I think the who should be you and the when should be some intersection<br/>of whenever you feel like it and whenever it seems like publishing an<br/>update is worthwhile, such as when we&#39;re approaching a release. It<br/>might be a little late to do another sync before 5.12.2, but in any<br/>case I think it has to go into blead first.<br/> http://www.nntp.perl.org/group/perl.perlfaq.workers/2010/08/msg695.html Wed, 25 Aug 2010 00:33:31 +0000 Re: The canonical source for perlfaq is now the perl reop by brian d foy In article<br/>&lt;AANLkTinkUqcz0-Hw4DH74FHy6cEUiNnznBQR07YacyyU@mail.gmail.com&gt;, Craig<br/>A. Berry &lt;craig.a.berry@gmail.com&gt; wrote:<br/><br/>&gt; In that case should the following entry in perl5122delta.pod be<br/>&gt; changed to reflect the newest new canonical location?<br/>&gt; <br/>&gt; =item *<br/>&gt; <br/>&gt; The version of L&lt;perlfaq&gt; shipped with the perl core has been updated to the<br/>&gt; latest official FAQ version as available at<br/>&gt; L&lt;git://github.com/briandfoy/perlfaq.git&gt;.<br/><br/>Well, it should point to whereever you synced it from. My github repo<br/>is now behind my branch in the main repo.<br/><br/>It would be nice to have my latest perlfaq updates cherrypicked into<br/>the maintenance branch though.<br/> http://www.nntp.perl.org/group/perl.perlfaq.workers/2010/08/msg694.html Tue, 24 Aug 2010 17:02:18 +0000 Re: The canonical source for perlfaq is now the perl reop by Craig A. Berry On Sat, Aug 21, 2010 at 12:32 PM, brian d foy &lt;brian.d.foy@gmail.com&gt; wrote:<br/>&gt; [[ This message was both posted and mailed: see<br/>&gt; &nbsp; the &quot;To,&quot; &quot;Cc,&quot; and &quot;Newsgroups&quot; headers for details. ]]<br/>&gt;<br/>&gt; Now that the perl sources are in git (meaning committers can easily<br/>&gt; have their own branches), it&#39;s kinda silly to have the perlfaq over in<br/>&gt; a separate repo. I&#39;m going to keep my perlfaq tools over there, but now<br/>&gt; the canonical source for the perlfaqN.pod docs are in the regular perl<br/>&gt; source tree. I&#39;ve created a briandfoy/perlfaq branch for that and I&#39;ll<br/>&gt; just work in there. No more cross repo syncing and all that bother.<br/><br/>In that case should the following entry in perl5122delta.pod be<br/>changed to reflect the newest new canonical location?<br/><br/>=item *<br/><br/>The version of L&lt;perlfaq&gt; shipped with the perl core has been updated to the<br/>latest official FAQ version as available at<br/>L&lt;git://github.com/briandfoy/perlfaq.git&gt;.<br/> http://www.nntp.perl.org/group/perl.perlfaq.workers/2010/08/msg693.html Mon, 23 Aug 2010 23:50:45 +0000 The canonical source for perlfaq is now the perl reop by brian d foy [[ This message was both posted and mailed: see<br/> the &quot;To,&quot; &quot;Cc,&quot; and &quot;Newsgroups&quot; headers for details. ]]<br/><br/>Now that the perl sources are in git (meaning committers can easily<br/>have their own branches), it&#39;s kinda silly to have the perlfaq over in<br/>a separate repo. I&#39;m going to keep my perlfaq tools over there, but now<br/>the canonical source for the perlfaqN.pod docs are in the regular perl<br/>source tree. I&#39;ve created a briandfoy/perlfaq branch for that and I&#39;ll<br/>just work in there. No more cross repo syncing and all that bother.<br/><br/>The only question is who and when to pull the new versions into blead.<br/> http://www.nntp.perl.org/group/perl.perlfaq.workers/2010/08/msg692.html Sat, 21 Aug 2010 10:32:31 +0000 Re: About "How do I decode or create those %-encodings on the web?" by Peter Valdemar Mørch &gt; You can always CC authors, but always get it into something that other<br/>&gt; people can see. That&#39;s why we have RT. Out of date docs can&#39;t be<br/>&gt; trusted to tell you what to do. :)<br/><br/>Ok, so I created:<br/>https://rt.cpan.org/Public/Bug/Display.html?id=59077<br/><br/>:-)<br/><br/> http://www.nntp.perl.org/group/perl.perlfaq.workers/2010/07/msg691.html Sun, 04 Jul 2010 14:56:09 +0000 Re: About "How do I decode or create those %-encodings on the web?" by brian d foy In article<br/>&lt;dbee2d8d-1bc1-427c-8dbc-d1ead9ca624e@c33g2000yqm.googlegroups.com&gt;,<br/>Peter Valdemar M&oslash;rch &lt;pmorch@gmail.com&gt; wrote:<br/><br/>&gt; Although I&#39;m affraid you might be right, I&#39;m trying to do the best I<br/>&gt; know how:<br/>&gt; <br/>&gt; From perldoc CGI (e.g. http://perldoc.perl.org/CGI.html):<br/>&gt; &gt; Address bug reports and comments to: lstein@cshl.org.<br/><br/>You can always CC authors, but always get it into something that other<br/>people can see. That&#39;s why we have RT. Out of date docs can&#39;t be<br/>trusted to tell you what to do. :)<br/> http://www.nntp.perl.org/group/perl.perlfaq.workers/2010/07/msg690.html Fri, 02 Jul 2010 14:40:29 +0000 Re: About "How do I decode or create those %-encodings on the web?" by Peter Valdemar Mørch Although I&#39;m affraid you might be right, I&#39;m trying to do the best I<br/>know how:<br/><br/>From perldoc CGI (e.g. http://perldoc.perl.org/CGI.html):<br/>&gt; Address bug reports and comments to: lstein@cshl.org.<br/><br/>:-(<br/><br/>Peter<br/><br/> http://www.nntp.perl.org/group/perl.perlfaq.workers/2010/07/msg689.html Fri, 02 Jul 2010 04:35:31 +0000 Re: About "How do I decode or create those %-encodings on the web?" by brian d foy [[ This message was both posted and mailed: see<br/> the &quot;To,&quot; &quot;Cc,&quot; and &quot;Newsgroups&quot; headers for details. ]]<br/><br/>In article<br/>&lt;0bf7e3ae-a65d-4718-a2e8-b5e27429a84b@s9g2000yqd.googlegroups.com&gt;,<br/>Peter Valdemar M&oslash;rch &lt;pmorch@gmail.com&gt; wrote:<br/><br/>&gt; On Jun 27, 4:27&nbsp;am, brian.d....@gmail.com (brian d foy) wrote:<br/>&gt; &gt; &gt; I suggest one of:<br/>&gt; &gt; &gt; * Document escape and unescape in perldoc CGI (please, please,<br/>&gt; &gt; &gt; please!)<br/>&gt; &gt; &gt; * Elaborate on how this escaping and unescaping can be achieved using<br/>&gt; &gt; &gt; only the documented interface<br/>&gt; &gt;<br/>&gt; &gt; Patches welcome :)<br/>&gt; <br/>&gt; CC: Lincoln D. Stein, author of CGI.pm<br/><br/>If you are making patches to modules, you should probably post them to<br/>their RT queue (or whatever issue tracking they use). As far as I know,<br/>Lincoln has passed on maintainership of CGI.pm so sending patches to<br/>him is not a good way to get the right people to notice them. <br/><br/>Note that sending any patches to personal email or unrelated mailing<br/>lists is probably the best way to have them ignored. :)<br/> http://www.nntp.perl.org/group/perl.perlfaq.workers/2010/07/msg688.html Thu, 01 Jul 2010 12:40:57 +0000 Re: About "How do I decode or create those %-encodings on the web?" by Peter Valdemar Mørch On Jun 27, 4:27&nbsp;am, brian.d....@gmail.com (brian d foy) wrote:<br/>&gt; &gt; I suggest one of:<br/>&gt; &gt; * Document escape and unescape in perldoc CGI (please, please,<br/>&gt; &gt; please!)<br/>&gt; &gt; * Elaborate on how this escaping and unescaping can be achieved using<br/>&gt; &gt; only the documented interface<br/>&gt;<br/>&gt; Patches welcome :)<br/><br/>CC: Lincoln D. Stein, author of CGI.pm<br/><br/>Yeah, as soon as I hit &quot;Send&quot; I realized that was a very probable<br/>repsonse :-) Ok, so here goes. Also available at http://pastebin.com/bPRq0Nsj<br/>in case Google Groups mangles or does line wrapping:<br/><br/>--- orig.CGI.pm 2010-01-29 15:41:54.000000000 +0100<br/>+++ CGI.pm 2010-06-28 08:56:49.000000000 +0200<br/>@@ -255,6 +255,7 @@<br/> &#39;:html&#39; =&gt; [qw/:html2 :html3 :html4 :netscape/],<br/> &#39;:standard&#39; =&gt; [qw/:html2 :html3 :html4 :form :cgi/],<br/> &#39;:push&#39; =&gt; [qw/multipart_init multipart_start multipart_end<br/>multipart_final/],<br/>+ &#39;:escape&#39; =&gt; [qw/escape unescape/],<br/> &#39;:all&#39; =&gt; [qw/:html2 :html3 :netscape :form :cgi :internal :html4/]<br/> );<br/><br/>@@ -4878,6 +4879,10 @@<br/><br/> Import all HTML-generating shortcuts (i.e. &#39;html2&#39;, &#39;html3&#39;, &#39;html4&#39;<br/>and &#39;netscape&#39;)<br/><br/>+=item B&lt;:escape&gt;<br/>+<br/>+Import the escape and unescape methods<br/>+<br/> =item B&lt;:standard&gt;<br/><br/> Import &quot;standard&quot; features, &#39;html2&#39;, &#39;html3&#39;, &#39;html4&#39;, &#39;form&#39; and<br/>&#39;cgi&#39;.<br/>@@ -5698,6 +5703,20 @@<br/> ),<br/> hr;<br/><br/>+=head2 ESCAPING/ENCODING AND UNESCAPING/DECODING URL STRINGS<br/>+<br/>+URL parameters are encoded in what is also known as Percent-encoding<br/>+L&lt;http://en.wikipedia.org/wiki/Percent-encoding&gt;<br/>+<br/>+ use CGI &#39;:escape&#39;;<br/>+ my $string = &quot;Hello World&quot;;<br/>+ my $escaped = escape($string);<br/>+ print $escaped, &quot;\n&quot;;<br/>+ die &quot;How could unescape(escape($string)) ne $string&quot;<br/>+ unless unescape($escaped) eq $string;<br/>+<br/>+prints out &quot;Hello%20World&quot;<br/>+<br/> =head2 PROVIDING ARGUMENTS TO HTML SHORTCUTS<br/><br/> The HTML methods will accept zero, one or multiple arguments. If you<br/><br/>Peter<br/><br/> http://www.nntp.perl.org/group/perl.perlfaq.workers/2010/06/msg687.html Mon, 28 Jun 2010 03:29:06 +0000 Re: About "How do I decode or create those %-encodings on the web?" by Peter Valdemar Mørch On Jun 27, 4:27&nbsp;am, brian.d....@gmail.com (brian d foy) wrote:<br/>&gt; Patches welcome :)<br/><br/><br/>CC: Lincoln D. Stein, author of CGI.pm<br/><br/>Yeah, as soon as I hit &quot;Send&quot; I realized that was a very probable<br/>repsonse :-) Ok, so here goes. Also available at http://pastebin.com/bPRq0Nsj<br/>in case Google Groups mangles or does line wrapping:<br/><br/>--- orig.CGI.pm 2010-01-29 15:41:54.000000000 +0100<br/>+++ CGI.pm 2010-06-28 08:56:49.000000000 +0200<br/>@@ -255,6 +255,7 @@<br/> &#39;:html&#39; =&gt; [qw/:html2 :html3 :html4 :netscape/],<br/> &#39;:standard&#39; =&gt; [qw/:html2 :html3 :html4 :form :cgi/],<br/> &#39;:push&#39; =&gt; [qw/multipart_init multipart_start multipart_end<br/>multipart_final/],<br/>+ &#39;:escape&#39; =&gt; [qw/escape unescape/],<br/> &#39;:all&#39; =&gt;<br/>[qw/:html2 :html3 :netscape :form :cgi :internal :html4/]<br/> );<br/><br/>@@ -4878,6 +4879,10 @@<br/><br/> Import all HTML-generating shortcuts (i.e. &#39;html2&#39;, &#39;html3&#39;, &#39;html4&#39;<br/>and &#39;netscape&#39;)<br/><br/>+=item B&lt;:escape&gt;<br/>+<br/>+Import the escape and unescape methods<br/>+<br/> =item B&lt;:standard&gt;<br/><br/> Import &quot;standard&quot; features, &#39;html2&#39;, &#39;html3&#39;, &#39;html4&#39;, &#39;form&#39; and<br/>&#39;cgi&#39;.<br/>@@ -5698,6 +5703,20 @@<br/> ),<br/> hr;<br/><br/>+=head2 ESCAPING/ENCODING AND UNESCAPING/DECODING URL STRINGS<br/>+<br/>+URL parameters are encoded in what is also known as Percent-encoding<br/>+L&lt;http://en.wikipedia.org/wiki/Percent-encoding&gt;<br/>+<br/>+ use CGI &#39;:escape&#39;;<br/>+ my $string = &quot;Hello World&quot;;<br/>+ my $escaped = escape($string);<br/>+ print $escaped, &quot;\n&quot;;<br/>+ die &quot;How could unescape(escape($string)) ne $string&quot;<br/>+ unless unescape($escaped) eq $string;<br/>+<br/>+prints out &quot;Hello%20World&quot;<br/>+<br/> =head2 PROVIDING ARGUMENTS TO HTML SHORTCUTS<br/><br/> The HTML methods will accept zero, one or multiple arguments. If you<br/><br/>Peter<br/><br/> http://www.nntp.perl.org/group/perl.perlfaq.workers/2010/06/msg686.html Mon, 28 Jun 2010 02:57:47 +0000 Re: About "How do I decode or create those %-encodings on the web?" by brian d foy [[ This message was both posted and mailed: see<br/> the &quot;To,&quot; &quot;Cc,&quot; and &quot;Newsgroups&quot; headers for details. ]]<br/><br/>In article<br/>&lt;f6bd282d-ddd2-4709-9c15-145a85ff5cdb@j4g2000yqh.googlegroups.com&gt;,<br/>Peter Valdemar M&oslash;rch &lt;4ux6as402@sneakemail.com&gt; wrote:<br/><br/><br/>&gt; I suggest one of:<br/>&gt; * Document escape and unescape in perldoc CGI (please, please,<br/>&gt; please!)<br/>&gt; * Elaborate on how this escaping and unescaping can be achieved using<br/>&gt; only the documented interface<br/><br/>Patches welcome :)<br/> http://www.nntp.perl.org/group/perl.perlfaq.workers/2010/06/msg685.html Sat, 26 Jun 2010 19:27:44 +0000 About "How do I decode or create those %-encodings on the web?" by Peter Valdemar Mørch perlfaq9 has the above question, and the answer begins:<br/>&gt; If you are writing a CGI script, you should be using the CGI.pm module<br/>&gt; that comes with perl, or some other equivalent module.<br/><br/>And yes, CGI imports escape and unescape from CGI::Utils but perldoc<br/>CGI::Utils says:<br/>&gt; DESCRIPTION: no public subroutines<br/><br/>So I guess using CGI::escape and CGI::unescape amounts to using<br/>undocumented features of CGI.<br/><br/>In light of that, I suggest the answer to the FAQ to be misleading. At<br/>least I have no idea how to &quot;decode or create those %-encodings on the<br/>web&quot; from reading perldoc CGI.<br/><br/>I suggest one of:<br/>* Document escape and unescape in perldoc CGI (please, please,<br/>please!)<br/>* Elaborate on how this escaping and unescaping can be achieved using<br/>only the documented interface<br/><br/>In any event, I find the FAQ answer is not currently useful as far as<br/>CGI goes.<br/><br/>Peter<br/><br/> http://www.nntp.perl.org/group/perl.perlfaq.workers/2010/06/msg684.html Wed, 23 Jun 2010 05:58:56 +0000 Re: [DOC PATCH] Reference 5.12 release in perlfaq by brian d foy [[ This message was both posted and mailed: see<br/> the &quot;To,&quot; &quot;Cc,&quot; and &quot;Newsgroups&quot; headers for details. ]]<br/><br/>Can you put the patch in the message body (or fork the github repo and<br/>send me a pull request)?<br/><br/>Thanks,<br/> http://www.nntp.perl.org/group/perl.perlfaq.workers/2010/04/msg683.html Mon, 19 Apr 2010 20:26:28 +0000 [DOC PATCH] Reference 5.12 release in perlfaq by Paul Johnson <br/>-- <br/>Paul Johnson - paul@pjcj.net<br/>http://www.pjcj.net<br/><br/> http://www.nntp.perl.org/group/perl.perlfaq.workers/2010/04/msg682.html Sun, 18 Apr 2010 02:51:13 +0000 Re: The Official p5p FAQ by Abigail On Mon, Mar 29, 2010 at 12:18:37PM -0500, Craig A. Berry wrote:<br/>&gt; On Sun, Mar 28, 2010 at 4:46 PM, PerlFAQ Server &lt;joe@example.com&gt; wrote:<br/>&gt; &gt; This is a test posting of the official p5p FAQ in<br/>&gt; &gt; preparation for a periodic posting. It&#39;s not an automatic<br/>&gt; &gt; posting yet.<br/>&gt; <br/>&gt; Sounds promising.<br/>&gt; <br/>&gt; &gt; &nbsp;What&#39;s the pumpking?<br/>&gt; &gt; &nbsp; &nbsp;The pumpking is the person who holds the patch pumpkin for Perl itself,<br/>&gt; &gt; &nbsp; &nbsp;what other projects call the &quot;release engineer&quot;. For perl 5.8, the<br/>&gt; &gt; &nbsp; &nbsp;pumpking was Jarkko Hietaniemi. For perl 5.10, that was Hugo van der<br/>&gt; &gt; &nbsp; &nbsp;Sanden.<br/>&gt; <br/>&gt; Er, see perlhist. I think Hugo was going to do it, maybe did one<br/>&gt; 5.9.x development release, but had other obligations. Rafael actually<br/>&gt; did 5.10.0. And there have been maint pumpkings, but we&#39;re currently<br/>&gt; without any, so maybe that&#39;s not a FAQ.<br/>&gt; <br/>&gt; &gt; Currently there is a new system whereby many people will pumpking<br/>&gt; &gt; &nbsp; &nbsp;a new release for shorter terms. As of this writing, that person is Jesse<br/>&gt; &gt; &nbsp; &nbsp;Vincent.<br/>&gt; <br/>&gt; I think this conflates the monthly release managers of development<br/>&gt; releases with the pumpking, who has overall responsibility for getting<br/>&gt; even-numbered releases out the door. Let&#39;s not give Jesse any ideas<br/>&gt; about &quot;shorter terms&quot; ;-).<br/><br/><br/>Actually, the people doing the monthly releases have been mentioned in<br/>perlhist, under &quot;THE KEEPERS OF THE PUMPKIN&quot;.<br/><br/><br/><br/>Abigail<br/> http://www.nntp.perl.org/group/perl.perlfaq.workers/2010/04/msg681.html Thu, 01 Apr 2010 09:29:48 +0000 Re: [fwd] Doc Patch: perlfaq2 (from: Richard.Foley@rfi.net) by brian d foy [[ This message was both posted and mailed: see<br/> the &quot;To,&quot; &quot;Cc,&quot; and &quot;Newsgroups&quot; headers for details. ]]<br/><br/>In article &lt;20100329135115.GG7753@fsck.bestpractical.com&gt;, Jesse<br/>Vincent &lt;jesse@fsck.com&gt; wrote:<br/><br/>&gt; From the docs in perlfaq.pod, I presume it&#39;s right to forward this to<br/>&gt; perlfaq-workers and not to patch the version in blead directly. Please<br/>&gt; correct me if I&#39;m wrong on that.<br/><br/>It&#39;s fine to forward it to perlfaq-workers, but none of the ways that I<br/>deal with this mailing list (which is not in the big blackhole of<br/>nevergettingdonedness called email) preserves the patch attachements.<br/>So, I don&#39;t have the patch. Can someone put it in the body?<br/><br/>However, this dual life stuff is really a pain in the ass now. It was<br/>fine in Subversion when the dual life pain was less than the Perforce<br/>pain, but now the dual life pain is greater than the git pain. Patches<br/>in anything other than a github fork just seem archaic now. :)<br/> http://www.nntp.perl.org/group/perl.perlfaq.workers/2010/03/msg680.html Wed, 31 Mar 2010 11:17:10 +0000 Re: The Official p5p FAQ by Craig A. Berry On Sun, Mar 28, 2010 at 4:46 PM, PerlFAQ Server &lt;joe@example.com&gt; wrote:<br/>&gt; This is a test posting of the official p5p FAQ in<br/>&gt; preparation for a periodic posting. It&#39;s not an automatic<br/>&gt; posting yet.<br/><br/>Sounds promising.<br/><br/>&gt; &nbsp;What&#39;s the pumpking?<br/>&gt; &nbsp; &nbsp;The pumpking is the person who holds the patch pumpkin for Perl itself,<br/>&gt; &nbsp; &nbsp;what other projects call the &quot;release engineer&quot;. For perl 5.8, the<br/>&gt; &nbsp; &nbsp;pumpking was Jarkko Hietaniemi. For perl 5.10, that was Hugo van der<br/>&gt; &nbsp; &nbsp;Sanden.<br/><br/>Er, see perlhist. I think Hugo was going to do it, maybe did one<br/>5.9.x development release, but had other obligations. Rafael actually<br/>did 5.10.0. And there have been maint pumpkings, but we&#39;re currently<br/>without any, so maybe that&#39;s not a FAQ.<br/><br/>&gt; Currently there is a new system whereby many people will pumpking<br/>&gt; &nbsp; &nbsp;a new release for shorter terms. As of this writing, that person is Jesse<br/>&gt; &nbsp; &nbsp;Vincent.<br/><br/>I think this conflates the monthly release managers of development<br/>releases with the pumpking, who has overall responsibility for getting<br/>even-numbered releases out the door. Let&#39;s not give Jesse any ideas<br/>about &quot;shorter terms&quot; ;-).<br/> http://www.nntp.perl.org/group/perl.perlfaq.workers/2010/03/msg679.html Wed, 31 Mar 2010 02:15:55 +0000 [fwd] Doc Patch: perlfaq2 (from: Richard.Foley@rfi.net) by Jesse Vincent From the docs in perlfaq.pod, I presume it&#39;s right to forward this to<br/>perlfaq-workers and not to patch the version in blead directly. Please<br/>correct me if I&#39;m wrong on that.<br/><br/>-j<br/>-- <br/><br/> http://www.nntp.perl.org/group/perl.perlfaq.workers/2010/03/msg678.html Wed, 31 Mar 2010 02:14:53 +0000