[30453] in Perl-Users-Digest

home help back first fref pref prev next nref lref last post

Perl-Users Digest, Issue: 1696 Volume: 11

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Mon Jul 7 03:09:44 2008

Date: Mon, 7 Jul 2008 00:09:07 -0700 (PDT)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)

Perl-Users Digest           Mon, 7 Jul 2008     Volume: 11 Number: 1696

Today's topics:
    Re: Authen::Captcha - How do I make it display the imag <ginvalidce@gmail.com>
    Re: Authen::Captcha - How do I make it display the imag <spamtrap@dot-app.org>
    Re: Authen::Captcha - How do I make it display the imag <ginvalidce@gmail.com>
    Re: Authen::Captcha - How do I make it display the imag <uri@stemsystems.com>
    Re: Authen::Captcha - How do I make it display the imag <news.freedom2surf.net>
    Re: Authen::Captcha - How do I make it display the imag <ginvalidce@gmail.com>
    Re: Authen::Captcha - How do I make it display the imag <uri@stemsystems.com>
    Re: FAQ 1.4 What are Perl 4, Perl 5, or Perl 6? <BLOCKSPAMfishfry@your-mailbox.com>
    Re: FAQ 1.4 What are Perl 4, Perl 5, or Perl 6? <uri@stemsystems.com>
    Re: Net::SMTP and Postfix mai considered spam by google <hjp-usenet2@hjp.at>
        new CPAN modules on Mon Jul  7 2008 (Randal Schwartz)
    Re: Want regex s/// to replace only nth occurrence jerrykrinock@gmail.com
        Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)

----------------------------------------------------------------------

Date: Sun, 6 Jul 2008 12:09:14 -0700
From: "Gordon Corbin Etly" <ginvalidce@gmail.com>
Subject: Re: Authen::Captcha - How do I make it display the image
Message-Id: <6dcjisF1uet4U1@mid.individual.net>

Sherman Pendley wrote:
> <news.freedom2surf.net> writes:

> > Hi,
> > My PERL is VERU rusty.

> Quick tip: It's Perl, not PERL.

PERL is fine is you mean it to mean "Practical Extraction and Report 
Language", just as someone can write LOL instead of "laughing out 
loud" - it's easier to type :)

> > Not used in years and have to now implement a
> > CAPTCHA on an old project because of high levels of form SPAM.
> >
> > This is my code so far:
> >
> > ***************
> > use strict;
> > use warnings;
> >
> > use Authen::Captcha;
> >
> > print "Content-type: text/html", "\n\n";
> >
> > my $captcha = Authen::Captcha->new(
> >        data_folder   => '../public_html/captcha-data',
> >        output_folder => '../public_html/captcha-output',
> > );
> >
> > my $md5sum = $captcha->generate_code(5);
> > print "$md5sum.png";
> > *****************
> > I made both data and output folders world writeable for now.
> >
> > What do I need to change to actually display the image?

> Generate an HTML <img> element that references the "$md5sum.png" file
> you just created. For instance:
>
> print "<img src='/captcha-output/$md5sum.png'>";

Wouldn't it be better to send the actualy image data to be used in a 
<img> tag other pages? I thought that's how most captchas worked (using 
a script that generates the image data, not the html of an image tag.)

In an external page: <img 
src="path/to/script-that-generates-md5sum-png-image"

In that case,  print "$md5sum.png";  above should then work, assuming 
$md5sum  contains the actual image data, which I'm pretty certain is the 
case here (if not, please let us know.)


-- 
Gordon 




------------------------------

Date: Sun, 06 Jul 2008 16:25:03 -0400
From: Sherman Pendley <spamtrap@dot-app.org>
Subject: Re: Authen::Captcha - How do I make it display the image
Message-Id: <m163rin4kg.fsf@dot-app.org>

"Gordon Corbin Etly" <ginvalidce@gmail.com> writes:

> Sherman Pendley wrote:
>> <news.freedom2surf.net> writes:
>
>> > Hi,
>> > My PERL is VERU rusty.
>
>> Quick tip: It's Perl, not PERL.
>
> PERL is fine is you mean it to mean "Practical Extraction and Report 
> Language"

The Perl docs clearly state otherwise. From "perldoc perlfaq1":

    What's the difference between "perl" and "Perl"?

    ... never write "PERL", because perl is not an acronym, apocryphal
    folklore and post-facto expansions notwithstanding.

It's a natural and very common mistake for newbies to get this wrong,
and no one faults you for making it early on - but your continuous
whining on the subject ever since then is nothing short of childish.

> In that case,  print "$md5sum.png";  above should then work, assuming 
> $md5sum  contains the actual image data

Why would you make that assumption? If $md5sum contained the actual
image data, then the example given in the module docs wouldn't work.

In general, I find that it's a good idea to read the docs and check my
facts before posting here - it saves me from the embarrassment of
making assumptions that turn out to be incorrect.

sherm--

-- 
My blog: http://shermspace.blogspot.com
Cocoa programming in Perl: http://camelbones.sourceforge.net


------------------------------

Date: Sun, 6 Jul 2008 16:47:31 -0700
From: "Gordon Corbin Etly" <ginvalidce@gmail.com>
Subject: Re: Authen::Captcha - How do I make it display the image
Message-Id: <6dd3slF21278U1@mid.individual.net>

Sherman Pendley wrote:
> "Gordon Corbin Etly" <ginvalidce@gmail.com> writes:
> > Sherman Pendley wrote:
> > > <news.freedom2surf.net> writes:

> > > > Hi,
> > > > My PERL is VERU rusty.

> > > Quick tip: It's Perl, not PERL.

> > PERL is fine is you mean it to mean "Practical Extraction and Report
> > Language"

> The Perl docs clearly state otherwise. From "perldoc perlfaq1":
>
>    What's the difference between "perl" and "Perl"?
>
>    ... never write "PERL", because perl is not an acronym, apocryphal
>    folklore and post-facto expansions notwithstanding.
>
> It's a natural and very common mistake for newbies to get this wrong,


But perldoc also has this in the description for "perl":

  NAME
       perl - Practical Extraction and Report Language

I beg to differ that it's wrong to use "PERL" if you mean it as saying 
"Practical Extraction and Report Language", just like you can say RTFM 
to mean "read the fantistic manual", the letters each have a known 
meaning, and are well known on the web, in books, and acronym search 
engines.


> > In that case,  print "$md5sum.png";  above should then work, 
> > assuming
> > $md5sum  contains the actual image data

> Why would you make that assumption? If $md5sum contained the actual
> image data, then the example given in the module docs wouldn't work.

From other captcha generation code I've come across before, either the 
image data is either saved outside of the script and the location is 
returned (like apparently in this case it is) and inserted into an <img> 
tag in the output, or generates the actual image data (usually from 
something like GD or image magik) which is sent back to a calling <img> 
tag in a page somewhere. So I stand corrected on the current case at 
hand.


-- 
Gordon 




------------------------------

Date: Mon, 07 Jul 2008 00:11:28 GMT
From: Uri Guttman <uri@stemsystems.com>
Subject: Re: Authen::Captcha - How do I make it display the image
Message-Id: <x7mykud040.fsf@mail.sysarch.com>

>>>>> "GCE" == Gordon Corbin Etly <ginvalidce@gmail.com> writes:

  GCE> Sherman Pendley wrote:
  >> "Gordon Corbin Etly" <ginvalidce@gmail.com> writes:
  >> > Sherman Pendley wrote:
  >> > > <news.freedom2surf.net> writes:

  >> > > > Hi,
  >> > > > My PERL is VERU rusty.

  >> > > Quick tip: It's Perl, not PERL.

  >> > PERL is fine is you mean it to mean "Practical Extraction and Report
  >> > Language"

  >> The Perl docs clearly state otherwise. From "perldoc perlfaq1":
  >> 
  >> What's the difference between "perl" and "Perl"?
  >> 
  >> ... never write "PERL", because perl is not an acronym, apocryphal
  >> folklore and post-facto expansions notwithstanding.
  >> 
  >> It's a natural and very common mistake for newbies to get this wrong,


  GCE> But perldoc also has this in the description for "perl":

  GCE>   NAME
  GCE>        perl - Practical Extraction and Report Language

are you going to go through this again? no decent perl hacker ever uses
PERL. larry even has said many times it is not an acronym. the faq
supports this view. so stop jumping in with your comments when someone
is corrected about perl's spelling. you are constantly doing this and
contributing nothing but noise.

  >> Why would you make that assumption? If $md5sum contained the actual
  >> image data, then the example given in the module docs wouldn't work.

  GCE> From other captcha generation code I've come across before, either the 
  GCE> image data is either saved outside of the script and the location is 
  GCE> returned (like apparently in this case it is) and inserted into an <img> 
  GCE> tag in the output, or generates the actual image data (usually from 
  GCE> something like GD or image magik) which is sent back to a calling <img> 
  GCE> tag in a page somewhere. So I stand corrected on the current case at 

you can't send data directly to an img tag if you are outputting the
page that contains the tag. it either has to be in a file or another
dynamic way.

and stop with the PERL vs perl crap. you are wrong and shut up about it.

uri

-- 
Uri Guttman  ------  uri@stemsystems.com  --------  http://www.sysarch.com --
-----  Perl Code Review , Architecture, Development, Training, Support ------
--------- Free Perl Training --- http://perlhunter.com/college.html ---------
---------  Gourmet Hot Cocoa Mix  ----  http://bestfriendscocoa.com ---------


------------------------------

Date: Mon, 7 Jul 2008 01:36:38 +0100
From: <news.freedom2surf.net>
Subject: Re: Authen::Captcha - How do I make it display the image
Message-Id: <QsWdnRblIOiF-OzVnZ2dneKdnZydnZ2d@pipex.net>

Thanks for all the input guys. Despite gettig the Perl Captcha working in 
the end I decided to recode the webform in PHP.
I'm so rusty with Perl as I've not used it in 4-5 years I just cannot 
remember how to do it and have got so used to Dreamweaver and embedded code 
I found it difficult to not have them.

So many languages to keep up with, so little time.
Thanks again. 



------------------------------

Date: Sun, 6 Jul 2008 23:05:42 -0700
From: "Gordon Corbin Etly" <ginvalidce@gmail.com>
Subject: Re: Authen::Captcha - How do I make it display the image
Message-Id: <6ddq1nF23kjvU1@mid.individual.net>

Uri Guttman wrote:
>>>>>> "GCE" == Gordon Corbin Etly <ginvalidce@gmail.com> writes:
> > Sherman Pendley wrote:
> > > "Gordon Corbin Etly" <ginvalidce@gmail.com> writes:
> > > > Sherman Pendley wrote:
> > > > > <news.freedom2surf.net> writes:

> > > > > > Hi,
> > > > > > My PERL is VERU rusty.

> > > > > Quick tip: It's Perl, not PERL.

> > > > PERL is fine is you mean it to mean "Practical Extraction and
> > > > Report Language"

> > > The Perl docs clearly state otherwise. From "perldoc perlfaq1":
> > >
> > > What's the difference between "perl" and "Perl"?
> > >
> > > ... never write "PERL", because perl is not an acronym, apocryphal
> > > folklore and post-facto expansions notwithstanding.
> > >
> > > It's a natural and very common mistake for newbies to get this
> > > wrong,

> > But perldoc also has this in the description for "perl":
> >
> >   NAME
> >        perl - Practical Extraction and Report Language

> are you going to go through this again? no decent perl hacker ever
> uses PERL.

Frankly, I would think any decent perl hacker would of read the first 
document of the language he or she is using, which clearly states, 
"Practical Extraction and Report Language", and if you write it in short 
hand, the result is "PERL", there's just no way around that.

"I'm using [the] PERL", is no different than saying "I'm using [the] 
Practical Extraction and Report Language", as the latter cannot be wrong 
as it's written in the official documentation, how can the former be 
wrong? Please explain your logic - real logic, not the usual fluff based 
on personal beliefs, but actual logic - as to why exactly, in no 
uncertain terms, that it cannot be written as I described (again, based 
on the official document.)



> > > Why would you make that assumption? If $md5sum contained the
> > > actual image data, then the example given in the module docs
> > > wouldn't work.

> > From other captcha generation code I've come across before, either
> > the image data is either saved outside of the script and the
> > location is returned (like apparently in this case it is) and
> > inserted into an <img> tag in the output, or generates the actual
> > image data (usually from something like GD or image magik) which is
> > sent back to a calling <img> tag in a page somewhere. So I stand
> > corrected on the current case at

> you can't send data directly to an img tag if you are outputting the
> page that contains the tag.

I thought that was the point of the alternative method I mentioned. 
There are two common way it's done. Generating the image, saving it 
somewhere and outputting the HTML that references it, or existing HTML 
pages reference a script directly from an IMG tag that outputs the raw 
generated image data (for the appropiate image format, be it png, jpg, 
gif...) The former is the way the op did it, the latter is the other way 
I've seen it done :)


-- 
Gordon 




------------------------------

Date: Mon, 07 Jul 2008 07:03:20 GMT
From: Uri Guttman <uri@stemsystems.com>
Subject: Re: Authen::Captcha - How do I make it display the image
Message-Id: <x7bq1a9nwo.fsf@mail.sysarch.com>

>>>>> "GCE" == Gordon Corbin Etly <ginvalidce@gmail.com> writes:

  >> are you going to go through this again? no decent perl hacker ever
  >> uses PERL.

  GCE> Frankly, I would think any decent perl hacker would of read the first 
  GCE> document of the language he or she is using, which clearly states, 
  GCE> "Practical Extraction and Report Language", and if you write it in short 
  GCE> hand, the result is "PERL", there's just no way around that.

and the FAQ contradicts that with a quote from larry wall that perl was
never an acronym so PERL is wrong. do you think the docs which are
written by p5p would know more than larry about how he named the
language? just think about your logic here. you can't defend that larry
doesn't know what he did when he created perl. the docs are wrong and
cutesy here and totally ignored by the perl community. except for
you. you must be right then.

  GCE> "I'm using [the] PERL", is no different than saying "I'm using [the] 
  GCE> Practical Extraction and Report Language", as the latter cannot be wrong 
  GCE> as it's written in the official documentation, how can the former be 
  GCE> wrong? Please explain your logic - real logic, not the usual fluff based 
  GCE> on personal beliefs, but actual logic - as to why exactly, in no 
  GCE> uncertain terms, that it cannot be written as I described (again, based 
  GCE> on the official document.)

and we keep telling you (a wall it seems but not the larry wall) that
you are wrong and the docs are wrong there. get it yet? you are
supporting wrong information - a bug in the perl docs and yes they
happen.

so just stop this foolish commenting when others tell newbies not to use
PERL. PERL is flat out wrong in any context. it is spelled with cap
because the man page on unix/linux ALWAYS capitalized the command name
in the header.

uri

-- 
Uri Guttman  ------  uri@stemsystems.com  --------  http://www.sysarch.com --
-----  Perl Code Review , Architecture, Development, Training, Support ------
--------- Free Perl Training --- http://perlhunter.com/college.html ---------
---------  Gourmet Hot Cocoa Mix  ----  http://bestfriendscocoa.com ---------


------------------------------

Date: Sun, 06 Jul 2008 16:00:04 -0700
From: fishfry <BLOCKSPAMfishfry@your-mailbox.com>
Subject: Re: FAQ 1.4 What are Perl 4, Perl 5, or Perl 6?
Message-Id: <BLOCKSPAMfishfry-368949.16000406072008@comcast.dca.giganews.com>

In article <5a76k5-aaj.ln1@blue.stonehenge.com>,
 PerlFAQ Server <brian@stonehenge.com> wrote:


>     Perl 6 is the next major version of Perl, but it's still in development
>     in both its syntax and design. The work started in 2002 and is still
>     ongoing.

And going, and going, and going ...

Perl 6 is the Energizer Bunny of failed software development projects.

Flame away.


------------------------------

Date: Mon, 07 Jul 2008 00:13:02 GMT
From: Uri Guttman <uri@stemsystems.com>
Subject: Re: FAQ 1.4 What are Perl 4, Perl 5, or Perl 6?
Message-Id: <x7iqvid01d.fsf@mail.sysarch.com>

>>>>> "f" == fishfry  <BLOCKSPAMfishfry@your-mailbox.com> writes:

  f> In article <5a76k5-aaj.ln1@blue.stonehenge.com>,
  f>  PerlFAQ Server <brian@stonehenge.com> wrote:


  >> Perl 6 is the next major version of Perl, but it's still in development
  >> in both its syntax and design. The work started in 2002 and is still
  >> ongoing.

  f> And going, and going, and going ...

  f> Perl 6 is the Energizer Bunny of failed software development projects.

  f> Flame away.

nothing to flame about. you know not from perl6 nor the people and
energy going into it nor the plans. flamebait like this (and anonymous
at that) is meaningless.

uri

-- 
Uri Guttman  ------  uri@stemsystems.com  --------  http://www.sysarch.com --
-----  Perl Code Review , Architecture, Development, Training, Support ------
--------- Free Perl Training --- http://perlhunter.com/college.html ---------
---------  Gourmet Hot Cocoa Mix  ----  http://bestfriendscocoa.com ---------


------------------------------

Date: Sun, 6 Jul 2008 21:45:49 +0200
From: "Peter J. Holzer" <hjp-usenet2@hjp.at>
Subject: Re: Net::SMTP and Postfix mai considered spam by googlemail
Message-Id: <slrng7287d.sc.hjp-usenet2@hrunkner.hjp.at>

On 2008-07-06 15:17, John <john1949@yahoo.com> wrote:
> PS - I could be totally wrong here - this has just been my experience.

It is often very difficult to determine what rules mail providers use to
classify spam.


> Now this is interesting.  We have our own server (co-located in a data 
> centre).
> I have done a reverse DNS look up on our IP address.  I thought I would get
> 123.456.789.012 giving www.example.com but I get
> 123-456-789-012.datacentre.com as the hostname.
> So the hostname I keyed into the box when I put on Debian is not the true 
> hostname?

What is the "true hostname"?

* The name you get when you invoke the "hostname" command on the box?
* Any of the domainnames with A (or AAAA) records which point to an IP
  address of an interface of the box?
* Any of the Domain names pointed to by PTR records derived from the IP 
  addresses of the interfaces?

These are independent of each other. Good practice for any host on the
internet is to have a "canonical" name, which the host itself
recognizes, which resolves to one of its IP addresses and a PTR record 
for that IP address which resolves to the same name. But since there
may be up to three different agencies responsible for configuring 
these, getting them all to agree is often a bit of work.

	hp


------------------------------

Date: Mon, 7 Jul 2008 04:42:21 GMT
From: merlyn@stonehenge.com (Randal Schwartz)
Subject: new CPAN modules on Mon Jul  7 2008
Message-Id: <K3MD2L.1w0E@zorch.sf-bay.org>

The following modules have recently been added to or updated in the
Comprehensive Perl Archive Network (CPAN).  You can install them using the
instructions in the 'perlmodinstall' page included with your Perl
distribution.

Acme-URM
http://search.cpan.org/~cyga/Acme-URM/
URM (unlimited register machine) emulation 
----
Algorithm-Cluster-1.39
http://search.cpan.org/~mdehoon/Algorithm-Cluster-1.39/
Perl interface to the C Clustering Library. 
----
Apache2-ASP-1.54
http://search.cpan.org/~johnd/Apache2-ASP-1.54/
Perl extension for ASP on mod_perl2. 
----
Apache2-Controller-0.0003
http://search.cpan.org/~markle/Apache2-Controller-0.0003/
framework for Apache2 handler apps 
----
Astro-SpaceTrack-0.032
http://search.cpan.org/~wyant/Astro-SpaceTrack-0.032/
Retrieve orbital data from www.space-track.org. 
----
Attribute-Cached-0.01
http://search.cpan.org/~osfameron/Attribute-Cached-0.01/
easily cache subroutines results using a :Cached attribute 
----
Bundle-Perl-Critic-1.022
http://search.cpan.org/~elliotjs/Bundle-Perl-Critic-1.022/
A CPAN bundle for Perl::Critic and related modules 
----
Bundle-Perl-Critic-IncludingOptionalDependencies-1.002
http://search.cpan.org/~elliotjs/Bundle-Perl-Critic-IncludingOptionalDependencies-1.002/
Install everything Perl::Critic plus its optional dependencies. 
----
Catalyst-Plugin-SmartURI-0.027
http://search.cpan.org/~rkitover/Catalyst-Plugin-SmartURI-0.027/
Configurable URIs for Catalyst 
----
Class-Declare-0.09
http://search.cpan.org/~ibb/Class-Declare-0.09/
Declare classes with public, private and protected attributes and methods. 
----
Class-Declare-0.10
http://search.cpan.org/~ibb/Class-Declare-0.10/
Declare classes with public, private and protected attributes and methods. 
----
Config-Abstract-0.16
http://search.cpan.org/~avajadi/Config-Abstract-0.16/
Perl extension for abstracting configuration files 
----
Crypt-RSA-1.95
http://search.cpan.org/~vipul/Crypt-RSA-1.95/
RSA public-key cryptosystem. 
----
Crypt-RSA-1.96
http://search.cpan.org/~vipul/Crypt-RSA-1.96/
RSA public-key cryptosystem. 
----
DBD-Pg-2.8.3
http://search.cpan.org/~turnstep/DBD-Pg-2.8.3/
PostgreSQL database driver for the DBI module 
----
Devel-Backtrace-0.11
http://search.cpan.org/~pepe/Devel-Backtrace-0.11/
Object-oriented backtrace 
----
Devel-EvalError-0.001002
http://search.cpan.org/~tyemq/Devel-EvalError-0.001002/
Reliably detect if and why eval() failed 
----
Gantry-3.53
http://search.cpan.org/~tkeefer/Gantry-3.53/
Web application framework for mod_perl, cgi, etc. 
----
Gtk2-WebKit-0.02
http://search.cpan.org/~flora/Gtk2-WebKit-0.02/
Web content engine library for Gtk2 
----
Lingua-DE-Tagger-0.14
http://search.cpan.org/~tschulz/Lingua-DE-Tagger-0.14/
----
Lingua-DE-Tagger-0.15
http://search.cpan.org/~tschulz/Lingua-DE-Tagger-0.15/
Part-of-speech tagger for German natural language processing. 
----
Lingua-JA-FindDates-0.003
http://search.cpan.org/~bkb/Lingua-JA-FindDates-0.003/
find Japanese dates & convert them 
----
Module-Install-POE-Test-Loops-0.03
http://search.cpan.org/~martijn/Module-Install-POE-Test-Loops-0.03/
Install tests for POE::Loops 
----
Net-BitTorrent-0.025_002
http://search.cpan.org/~sanko/Net-BitTorrent-0.025_002/
BitTorrent peer-to-peer protocol class 
----
Net-BitTorrent-0.025_003
http://search.cpan.org/~sanko/Net-BitTorrent-0.025_003/
BitTorrent peer-to-peer protocol class 
----
Net-BitTorrent-0.025_004
http://search.cpan.org/~sanko/Net-BitTorrent-0.025_004/
BitTorrent peer-to-peer protocol class 
----
POE-Loop-Glib-0.0036
http://search.cpan.org/~martijn/POE-Loop-Glib-0.0036/
a bridge that supports Glib's event loop from POE 
----
POE-Loop-Glib-0.037
http://search.cpan.org/~martijn/POE-Loop-Glib-0.037/
a bridge that supports Glib's event loop from POE 
----
POE-Session-Irssi-0.50
http://search.cpan.org/~martijn/POE-Session-Irssi-0.50/
emit POE events for Irssi signals 
----
POE-XS-Loop-Poll-0.004
http://search.cpan.org/~tonyc/POE-XS-Loop-Poll-0.004/
an XS implementation of POE::Loop, using poll(2). 
----
PPIx-Grep-v0.0.5
http://search.cpan.org/~elliotjs/PPIx-Grep-v0.0.5/
Search PPI documents (not Perl code). 
----
PPIx-Grep-v0.0.6
http://search.cpan.org/~elliotjs/PPIx-Grep-v0.0.6/
Search PPI documents (not Perl code). 
----
Palm-Ztxt-0.91
http://search.cpan.org/~rudy/Palm-Ztxt-0.91/
Perl extension for creating and manipulating zTXTs using libztxt. 
----
Panotools-Script-0.15
http://search.cpan.org/~bpostle/Panotools-Script-0.15/
Panorama Tools scripting 
----
Perl-Critic-Pulp-4
http://search.cpan.org/~kryde/Perl-Critic-Pulp-4/
some add-on perlcritic policies 
----
Perl-Tags-0.24
http://search.cpan.org/~osfameron/Perl-Tags-0.24/
Generate (possibly exuberant) Ctags style tags for Perl sourcecode 
----
Pod-2-DocBook-0.02_01
http://search.cpan.org/~jkutej/Pod-2-DocBook-0.02_01/
Convert Pod data to DocBook SGML 
----
Pod-Server-1.00
http://search.cpan.org/~beppu/Pod-Server-1.00/
a web server for locally installed perl documentation 
----
Regexp-Subst-NoRegex-0.01
http://search.cpan.org/~bkb/Regexp-Subst-NoRegex-0.01/
emulate s/// using s/\Q// or substr 
----
Squatting-0.40
http://search.cpan.org/~beppu/Squatting-0.40/
A Camping-inspired Web Microframework for Perl 
----
Task-Perl-Critic-1.006
http://search.cpan.org/~elliotjs/Task-Perl-Critic-1.006/
Install everything Perl::Critic. 
----
Task-Perl-Critic-IncludingOptionalDependencies-1.004
http://search.cpan.org/~elliotjs/Task-Perl-Critic-IncludingOptionalDependencies-1.004/
Install everything Perl::Critic plus its optional dependencies. 
----
Text-Editor-Easy-0.33
http://search.cpan.org/~grommier/Text-Editor-Easy-0.33/
A perl module to edit perl code with syntax highlighting and more. 
----
Tie-Hash-StructKeyed-0.04
http://search.cpan.org/~osfameron/Tie-Hash-StructKeyed-0.04/
use structures like hashes and arrays as keys to a hash 
----
WWW-Scroogle-0.0132_001
http://search.cpan.org/~schlumpf/WWW-Scroogle-0.0132_001/
Perl Extension for Scroogle 
----
WWW-Scroogle-0.0133
http://search.cpan.org/~schlumpf/WWW-Scroogle-0.0133/
Perl Extension for Scroogle 
----
WWW-Scroogle-0.0134
http://search.cpan.org/~schlumpf/WWW-Scroogle-0.0134/
Perl Extension for Scroogle 
----
X3D-Values-Int32-0.005_005
http://search.cpan.org/~hooo/X3D-Values-Int32-0.005_005/
Storage type for 32 bit signed integers 
----
stockmonkey-2.8
http://search.cpan.org/~jettero/stockmonkey-2.8/


If you're an author of one of these modules, please submit a detailed
announcement to comp.lang.perl.announce, and we'll pass it along.

This message was generated by a Perl program described in my Linux
Magazine column, which can be found on-line (along with more than
200 other freely available past column articles) at
  http://www.stonehenge.com/merlyn/LinuxMag/col82.html

print "Just another Perl hacker," # the original

--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<merlyn@stonehenge.com> <URL:http://www.stonehenge.com/merlyn/>
Smalltalk/Perl/Unix consulting, Technical writing, Comedy, etc. etc.
See http://methodsandmessages.vox.com/ for Smalltalk and Seaside discussion


------------------------------

Date: Sun, 6 Jul 2008 14:39:45 -0700 (PDT)
From: jerrykrinock@gmail.com
Subject: Re: Want regex s/// to replace only nth occurrence
Message-Id: <8141fe0f-d33e-4eb7-85b7-5882812faf04@i76g2000hsf.googlegroups.com>

Dave, that's the way I would have done if given enough time.

Mirco, you're way over my head.  I tested your code and indeed "The
sneaky cat sneaked angrily".  But after reading japhy's "Regex
Arcana" (http://japhy.perlmonk.org/articles/tpj/2004-summer.html) for
a few minutes I realized that, being "only an electrical engineer", my
Business Manager would not appreciate the amount of time it would take
me to get up to speed on these amazing "code assertions" and "atomic
groups".  But thank you very much for those references.  A Google
search for "(??{...})" would not have been very fruitful.  If I ever
need these things I've got a bookmark.

Gunnar's solution I was able to understand and modify to do what I
really wanted to do, which is, in DBI database queries, to replace "
= ? " with "IS NULL" when placeholders are undef.  This problem is
described in http://search.cpan.org/~timb/DBI-1.605/DBI.pm#Placeholders_and_Bind_Values,
in the subsection "Null Values", but that document doesn't give a
function to test the whole values array and query after construction,
which I could call at a low level in my code to avoid having to
remember to do this all the time.  I now have such a function,
explicifyNullsInRefs, shown below.

Thanks for the help!

P.S.  There are probably still bugs in this code.  Also, probably
someone will point me at a function in a CPAN module that already does
this.  Oh, well.

#!/usr/bin/perl

# Problem: A query to find names of all small,
#        healthy, 3-year old, albino, fast pets

# Demo Code
my $query = q{SELECT name FROM pets
    WHERE
        size = ? AND disease   = ? AND 'age' = ? and `color`=? and
speed>?} ;
my @values = ("small", undef, 3, undef, 66) ;

print "Query and Values before explifying NULLs:\n" ;
print $query, "\n" ;
printArrayRef(\@values) ;

explicifyNullsInRefs(\$query, \@values) ;
print "\n" ;

print "Query and Values after explifying NULLs:\n" ;
print $query, "\n" ;
printArrayRef(\@values) ;

# Reuseable function
sub explicifyNullsInRefs {
    my $queryRef = shift ;
    my $valuesRef = shift ;
    my $n = " IS NULL" ;
    my $e = " = " ;
    my $q = "?" ;
    my @prunedValues ;

    my $i ;
    my $k ; # to offset future replacements by current replacment
    for my $value (@$valuesRef) {
    if (!defined($value)) {
            my $j = 0 ;
            $$queryRef =~ s/([`'"\w]+)([\s]*)=([\s]*)\?/$j++==$i-$k?
$1.$n:$1.$e.$q/eg ;
            $k++ ;
        }
        else {
            push(@prunedValues, $value) ;
        }
        $i++ ;
    }

    @$valuesRef = @prunedValues
}

# Function used in demo
sub printArrayRef {
    my $aRef = shift ;
    my $nA = @$aRef ;
    print "$nA values: (" ;
    my $i ;
    foreach my $v (@$aRef) {
        my $printValue = defined($v) ? $v : "<undef>" ;
        print $printValue ;
        if ($i++ < $nA-1) {
            print ", " ;
        }
    }
    print ")\n" ;
}


------------------------------

Date: 6 Apr 2001 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin) 
Subject: Digest Administrivia (Last modified: 6 Apr 01)
Message-Id: <null>


Administrivia:

#The Perl-Users Digest is a retransmission of the USENET newsgroup
#comp.lang.perl.misc.  For subscription or unsubscription requests, send
#the single line:
#
#	subscribe perl-users
#or:
#	unsubscribe perl-users
#
#to almanac@ruby.oce.orst.edu.  

NOTE: due to the current flood of worm email banging on ruby, the smtp
server on ruby has been shut off until further notice. 

To submit articles to comp.lang.perl.announce, send your article to
clpa@perl.com.

#To request back copies (available for a week or so), send your request
#to almanac@ruby.oce.orst.edu with the command "send perl-users x.y",
#where x is the volume number and y is the issue number.

#For other requests pertaining to the digest, send mail to
#perl-users-request@ruby.oce.orst.edu. Do not waste your time or mine
#sending perl questions to the -request address, I don't have time to
#answer them even if I did know the answer.


------------------------------
End of Perl-Users Digest V11 Issue 1696
***************************************


home help back first fref pref prev next nref lref last post