[29012] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 256 Volume: 11

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Fri Mar 23 06:10:17 2007

Date: Fri, 23 Mar 2007 03:09:26 -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           Fri, 23 Mar 2007     Volume: 11 Number: 256

Today's topics:
    Re: A twist on Cookbook recipe 4.6 <ben@morrow.me.uk>
    Re: A twist on Cookbook recipe 4.6 <someone@example.com>
        array::Compare - Perl extension for comparing arrays <ppaprock@gmail.com>
    Re: How can I make my prime number generator better? <klaus03@gmail.com>
    Re: How can I make my prime number generator better? nikolas.britton@gmail.com
    Re: how to use perl to redirect web page? (Jens Thoms Toerring)
    Re: I dotn understand this error <hackeras@gmail.com>
    Re: I dotn understand this error <hackeras@gmail.com>
    Re: is mod_perl better for CGI application? (Randal L. Schwartz)
    Re: is mod_perl better for CGI application? <spamtrap@dot-app.org>
    Re: LWP hangs (Jamie)
        new CPAN modules on Fri Mar 23 2007 (Randal Schwartz)
        Perl CGI returning plain text HTML code <jeffrozh@gmail.com>
    Re: Perl CGI returning plain text HTML code <jurgenex@hotmail.com>
    Re: Perl CGI returning plain text HTML code <no@email.com>
    Re: Perl CGI returning plain text HTML code (Jens Thoms Toerring)
    Re: Perl Equivelent of C++ program anno4000@radom.zrz.tu-berlin.de
    Re: PHP Development Resources Directory <uri@stemsystems.com>
        Posting Guidelines for comp.lang.perl.misc ($Revision:  tadmc@augustmail.com
        RegExp -> Strings generieren arnd.schroeter@gmail.com
        Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)

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

Date: Fri, 23 Mar 2007 02:39:08 +0000
From: Ben Morrow <ben@morrow.me.uk>
Subject: Re: A twist on Cookbook recipe 4.6
Message-Id: <c7rbd4-3ak.ln1@osiris.mauzo.dyndns.org>


Quoth "John W. Krahn" <krahnj@telus.net>:
> Ben Morrow wrote:
> > 
> >     push @{ $SeenEmails{$Email} ||= [] }, $ID;
> 
> All you really need is:
> 
>       push @{ $SeenEmails{ $Email } }, $ID;
> 
> (Lookup autovivification in the docs.)

Duh... I even knew that, I'd just temporarily forgotten (and wasn't
trusting Perl to DWIM :) ). Thanks for the reminder...

Ben

-- 
   Razors pain you / Rivers are damp
   Acids stain you / And drugs cause cramp.                    [Dorothy Parker]
Guns aren't lawful / Nooses give
  Gas smells awful / You might as well live.                   ben@morrow.me.uk


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

Date: Fri, 23 Mar 2007 05:20:06 GMT
From: "John W. Krahn" <someone@example.com>
Subject: Re: A twist on Cookbook recipe 4.6
Message-Id: <asJMh.1421$__3.88@edtnps90>

Ben Morrow wrote:
> Quoth "John W. Krahn" <krahnj@telus.net>:
>>Ben Morrow wrote:
>>>    push @{ $SeenEmails{$Email} ||= [] }, $ID;
>>All you really need is:
>>
>>      push @{ $SeenEmails{ $Email } }, $ID;
>>
>>(Lookup autovivification in the docs.)
> 
> Duh... I even knew that, I'd just temporarily forgotten (and wasn't
> trusting Perl to DWIM :) ). Thanks for the reminder...

No problemo.   :-)



John
-- 
Perl isn't a toolbox, but a small machine shop where you can special-order
certain sorts of tools at low cost and in short order.       -- Larry Wall


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

Date: 23 Mar 2007 02:32:12 -0700
From: "ppapro" <ppaprock@gmail.com>
Subject: array::Compare - Perl extension for comparing arrays
Message-Id: <1174642332.174295.142920@l77g2000hsb.googlegroups.com>

Hi

I've tried to use array::Compare module but got an error that "Can't
locate object method "Sep" via package "Array::Compare".

Did someone have same error before ? I am just trying to run it in
same way as excample in documentation.



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

Date: 22 Mar 2007 18:24:23 -0700
From: "Klaus" <klaus03@gmail.com>
Subject: Re: How can I make my prime number generator better?
Message-Id: <1174613063.371532.164650@y80g2000hsf.googlegroups.com>

On Mar 23, 1:47 am, nikolas.brit...@gmail.com wrote:
> How can I improve my code?... faster, better style, proper programming
> techniques, better algorithm? Thanks!

As far as the goto's are concerned:

perldoc perlsyn (section "Goto") :
++ In almost all cases like this, it's usually a far, far better idea
++ to use the structured control flow mechanisms of next, last,
++ or redo instead of resorting to a goto. For certain
++ applications, the catch and throw pair of eval{} and die()
++ for exception processing can also be a prudent approach.

I would suggest to wrap an additional { ... } block around the "if
($y1 !~ m/5$/o) { ... }" statement. The additional block will be
labled "end1:", and the "goto" will be replaced by "last".

[ snip ]

>         $y1 = ((6 * $k) - 1);

           end1: { # additional block labeled end1:

>         if ($y1 !~ m/5$/o) {
>                 for (1 .. (int((sqrt($y1) * .1665) + .5))) {
>                         $y2 = ((6 * $_) - 1);
>                         goto end1 if (($y1 / $y2) !~ m/\./o);
                         last end1 if (($y1 / $y2) !~ m/\./o);

>                         $y2 += 2;
>                         goto end1 if (($y1 / $y2) !~ m/\./o);
                         last end1 if (($y1 / $y2) !~ m/\./o);

>                 }
>                 #is prime tap 1:
>                 print "$y1\n";
          } # remove the old label end1 here
          } # close the additional block

There is also a test "if (($y1 / $y2) !~ m/\./o);"

The "/o" regexp-modifier is only useful if there is an interpolated
variable inside the regexp (which is not the case here), so the "/o"
could be removed from the regexp.
But I would suggest to get rid of the regexp alltogether and replace
it by a simple "if ($y1 % $y2 == 0);"

--
Klaus



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

Date: 23 Mar 2007 01:53:08 -0700
From: nikolas.britton@gmail.com
Subject: Re: How can I make my prime number generator better?
Message-Id: <1174639988.875252.63330@l77g2000hsb.googlegroups.com>

On Mar 22, 8:24 pm, "Klaus" <klau...@gmail.com> wrote:
> On Mar 23, 1:47 am, nikolas.brit...@gmail.com wrote:
>
> > How can I improve my code?... faster, better style, proper programming
> > techniques, better algorithm? Thanks!
>
> As far as the goto's are concerned:
>
> perldoc perlsyn (section "Goto") :
> ++ In almost all cases like this, it's usually a far, far better idea
> ++ to use the structured control flow mechanisms of next, last,
> ++ or redo instead of resorting to a goto. For certain
> ++ applications, the catch and throw pair of eval{} and die()
> ++ for exception processing can also be a prudent approach.
>
> I would suggest to wrap an additional { ... } block around the "if
> ($y1 !~ m/5$/o) { ... }" statement. The additional block will be
> labled "end1:", and the "goto" will be replaced by "last".
>
> [ snip ]
>
> >         $y1 = ((6 * $k) - 1);
>
>            end1: { # additional block labeled end1:
>
> >         if ($y1 !~ m/5$/o) {
> >                 for (1 .. (int((sqrt($y1) * .1665) + .5))) {
> >                         $y2 = ((6 * $_) - 1);
> >                         goto end1 if (($y1 / $y2) !~ m/\./o);
>
>                          last end1 if (($y1 / $y2) !~ m/\./o);
>
> >                         $y2 += 2;
> >                         goto end1 if (($y1 / $y2) !~ m/\./o);
>
>                          last end1 if (($y1 / $y2) !~ m/\./o);
>
> >                 }
> >                 #is prime tap 1:
> >                 print "$y1\n";
>
>           } # remove the old label end1 here
>           } # close the additional block
>
> There is also a test "if (($y1 / $y2) !~ m/\./o);"
>
> The "/o" regexp-modifier is only useful if there is an interpolated
> variable inside the regexp (which is not the case here), so the "/o"
> could be removed from the regexp.
> But I would suggest to get rid of the regexp alltogether and replace
> it by a simple "if ($y1 % $y2 == 0);"
>

Yes the modulus operation is much faster, benchmark says about 200%
faster! Thanks!!! I would like to get rid of the goto's but I'm not
sure what you wrote will work. I'm using them to break and to jump
over the 'prime plucker' code. I've changed some of the comments and
labels to help convey what it's doing:

#!/usr/bin/perl
use diagnostics;
use warnings;
use strict;

my $n = 1000;	#sets upper bound, max value is 10 ** 15.
my $k = 6;	#sets lower bound, min value is 6.
   $k = int($k / 6 + .5);
my $y1; my $y2;

for (1 .. int($n * .1665 + .5)) {

  #do 6k - 1:
	$y1 = (6 * $k - 1);
	if ($y1 !~ /5$/) { #separate wheat from chaff:
		for (1 .. int(sqrt($y1) * .1665 + .5)) {
			$y2 = (6 * $_ - 1);
			goto not_prime_1 if ($y1 % $y2 == 0);
			$y2 += 2;
			goto not_prime_1 if ($y1 % $y2 == 0);
		} #prime plucker 1:
		print "$y1 is prime.\n";
	} not_prime_1:

  #do 6k + 1:
	$y1 += 2;
	if ($y1 !~ /5$/) { #separate wheat from chaff:
		for (1 .. int(sqrt($y1) * .1665 + .5)) {
			$y2 = (6 * $_ - 1);
			goto not_prime_2 if ($y1 % $y2 == 0);
			$y2 += 2;
			goto not_prime_2 if ($y1 % $y2 == 0);
		} #prime plucker 2:
		print "$y1 is prime.\n";
	} not_prime_2:
++$k;
}

END
Thanks for your help.



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

Date: 23 Mar 2007 01:22:33 GMT
From: jt@toerring.de (Jens Thoms Toerring)
Subject: Re: how to use perl to redirect web page?
Message-Id: <56goepF28555iU1@mid.uni-berlin.de>

Paul <paul.pettus@gmail.com> wrote:
> I am using perl to access specified web pages. this is my code. when I
> run the code, I get the following error: 302 Found. I checked and knew
> this is because of redirect.
> Would you guys tell me how to solve this problem?

"302 Found" isn't an error. It tells you that the page that
you requested temporarily resides somewhere else (for whatever
reasons) and that there's nothing fundamentally wrong. Just go
to the URI you got told about (in the location field of the
response) instead. if you don't believe me go to e.g.

http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html

and look for paragraph 10.3.3. And, by the way, this isn't a
Perl problem but one of how the HTTP protocol works;-)

                               Regards, Jens
--
  \   Jens Thoms Toerring  ___      jt@toerring.de
   \__________________________      http://toerring.de


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

Date: 23 Mar 2007 01:39:02 -0700
From: "=?utf-8?B?zp3Or866zr/Pgg==?=" <hackeras@gmail.com>
Subject: Re: I dotn understand this error
Message-Id: <1174639142.891691.37680@l77g2000hsb.googlegroups.com>

On Mar 22, 1:32=C2=A0am, Jim Gibson <jgib...@mail.arc.nasa.gov> wrote:
> In article <1174514934.398873.118...@y66g2000hsf.googlegroups.com>,
>
> ????? <hacke...@gmail.com> wrote:
> > On Mar 21, 2:44=C2=A0pm, Michele Dondi <bik.m...@tiscalinet.it> wrote:
>
> > > >here is the whole code if you can see the error that would be good, i
>
> > > Where is it?
>
> > Well when i try to copy/paste i get an error message that i cannot
> > copy/paste binary files.
> > Iam using googles groups to talk here... how am i supposed to paste
> > the code now?!
>
> Code is normally text. Does your code contain any special or binary
> characters, such as UTF? If so, can you delete them for the purpose of
> getting help?

The whole index.pl uses UTF-8 encoding and some special chars yes.
Is there a way to convert it to pure ASCII?



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

Date: 23 Mar 2007 01:39:28 -0700
From: "=?utf-8?B?zp3Or866zr/Pgg==?=" <hackeras@gmail.com>
Subject: Re: I dotn understand this error
Message-Id: <1174639168.115482.5900@y66g2000hsf.googlegroups.com>

On Mar 22, 2:51=C2=A0pm, Michele Dondi <bik.m...@tiscalinet.it> wrote:

> Feeling sorry for you. I *had* to use GG sporadically and it was a
> major PITA...

Why, whats is the matter with GG?




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

Date: Thu, 22 Mar 2007 21:05:50 -0700
From: merlyn@stonehenge.com (Randal L. Schwartz)
Subject: Re: is mod_perl better for CGI application?
Message-Id: <86odmkhae9.fsf@blue.stonehenge.com>

>>>>> "Jamie" == Jamie  <nospam@geniegate.com> writes:

Jamie> mod_perl is fast.

Jamie> I stumbled across this (again) awhile ago:

Jamie> http://www.fastcgi.com/

Keep in mind that mod_perl is far more than content-phase.  mod_perl lets you
control and influence *every* phase (URL->resource, auth, MIME types,
logging).  It's far more than a "fast replacement for CGI", which is what
fastcgi does.

-- 
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<merlyn@stonehenge.com> <URL:http://www.stonehenge.com/merlyn/>
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!

-- 
Posted via a free Usenet account from http://www.teranews.com



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

Date: Fri, 23 Mar 2007 02:07:36 -0400
From: Sherm Pendley <spamtrap@dot-app.org>
Subject: Re: is mod_perl better for CGI application?
Message-Id: <m2y7loa3x3.fsf@local.wv-www.com>

merlyn@stonehenge.com (Randal L. Schwartz) writes:

>>>>>> "Jamie" == Jamie  <nospam@geniegate.com> writes:
>
> Jamie> mod_perl is fast.
>
> Jamie> I stumbled across this (again) awhile ago:
>
> Jamie> http://www.fastcgi.com/
>
> Keep in mind that mod_perl is far more than content-phase.  mod_perl lets you
> control and influence *every* phase (URL->resource, auth, MIME types,
> logging).  It's far more than a "fast replacement for CGI", which is what
> fastcgi does.

You can also include Perl code in Apache's config files. That was, in fact,
my first use of mod_perl, using <Perl> directives in httpd.conf to query a
customer database and configure virtual servers from the results.

sherm--

-- 
Web Hosting by West Virginians, for West Virginians: http://wv-www.net
Cocoa programming in Perl: http://camelbones.sourceforge.net


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

Date: Fri, 23 Mar 2007 01:32:19 GMT
From: nospam@geniegate.com (Jamie)
Subject: Re: LWP hangs
Message-Id: <Lc1174591724123070x8a8ee90@pong.podro.com>

In <1174592325.193879.192890@y66g2000hsf.googlegroups.com>,
yahavba@gmail.com mentions:
>On Mar 22, 9:18 pm, nos...@geniegate.com (Jamie) wrote:
>> --http://www.geniegate.com                   Custom web programming
>> Perl * Java * UNIX                        User Management Solutions
>
>Hi,
>It's hanging on get. I'm using get on a url which is secured (https),
>and it works for quite a long time untill suddenly it stops and
>hangs.
>When you say you override the method - how exactly is it done? how can
>i verify what parameters it is trying to use?
>
>thanks for you help!

Do this: perldoc -m LWP::UserAgent

It'll give you the source code for LWP::UserAgent.

Then, in a sub or another package or a variety of ways.. 

NOTE:!!!!! Not-tested code, this is just a "for example" thing!

I'll probably goof this up, I'm editing "live" so beware...

sub get_ua {
	{
		package My::Ua;
		use LWP::UserAgent;
		use base 'LWP::UserAgent';
		use strict;

		# Use our bugged version to snoop in on things.
		sub get {
			my($self,@args) = @_;
			print "CP1: $self called with " . join(',',@args), "\n";
			my $rv = $self->SUPER::get(@args);
			print "CP2: returning from get\n";
			return($rv);
		}
	}
	return(My::Ua->new(@_)); # Create our own version of LWP::UserAgent.
}


When you construct your LWP::UserAgent object, call get_ua() instead, in
the customized get() method above, you can insert print statements and
so on which will tell you the precise URL it's attempting to fetch. (you
can make a note of the URL's and observe if it's always the same URL,
this would be a key piece of information)

Confirm things are as they should, then follow along the path of LWP
until you get to request() (and at that point.. it's probably just
as easy to copy the whole thing over and pollute with print statements)
placing "CPnnn" statements in along the way. 

At the end of it all, you'll get to a point where there isn't a "CPnnn" 
printed where you think there ought to be one. At that point, you'll
have found exactly where it's hanging, and, if you're lucky.. it'll 
be something obvious. :-) If not, at least you'll have a good idea what's
wrong.

Do NOT modify the source of LWP::UserAgent (or any other module for that
matter) directly, always copy, or if it's more convenient, do a 
custom override as above. Otherwise you'll end up with corrupt modules.

See Also: LWP::Debug  

Though I've never used it, every problem I've ever had was as a result of me
passing the wrong stuff into get/post, I've never had to go further than what
I've described above. (and I usually override LWP::UserAgent in the beginning
anyway, just in case I might want to change it's behavior later on in 
program development, ex: password fetching)

The above is just a debugging method I've found useful for "tough cases". 

Jamie
-- 
http://www.geniegate.com                    Custom web programming
Perl * Java * UNIX                        User Management Solutions


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

Date: Fri, 23 Mar 2007 04:42:08 GMT
From: merlyn@stonehenge.com (Randal Schwartz)
Subject: new CPAN modules on Fri Mar 23 2007
Message-Id: <JFCAE8.JAG@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-Lingua-EN-Inflect-Modern-0.003
http://search.cpan.org/~rjbs/Acme-Lingua-EN-Inflect-Modern-0.003/
modernize Lingua::EN::Inflect rule's
----
Acme-NumericMethod-0.03
http://search.cpan.org/~gugod/Acme-NumericMethod-0.03/
I know numeric methods
----
Algorithm-Merge-0.08
http://search.cpan.org/~jsmith/Algorithm-Merge-0.08/
Three-way merge and diff
----
Catalyst-Plugin-Session-Store-DBI-0.11
http://search.cpan.org/~agrundma/Catalyst-Plugin-Session-Store-DBI-0.11/
Store your sessions in a database
----
Class-DBI-Loader-0.34
http://search.cpan.org/~dmaki/Class-DBI-Loader-0.34/
Dynamic definition of Class::DBI sub classes.
----
DBD-mysql-4.004
http://search.cpan.org/~capttofu/DBD-mysql-4.004/
MySQL driver for the Perl5 Database Interface (DBI)
----
DBIx-Log4perl-0.09
http://search.cpan.org/~mjevans/DBIx-Log4perl-0.09/
Perl extension for DBI to selectively log SQL, parameters, result-sets, transactions etc to a Log::Log4perl handle.
----
Data-ICal-TimeZone-1.21
http://search.cpan.org/~rclamp/Data-ICal-TimeZone-1.21/
timezones for Data::ICal
----
DateTime-Format-Pg-0.14
http://search.cpan.org/~dmaki/DateTime-Format-Pg-0.14/
Parse and format PostgreSQL dates and times
----
DateTime-Format-Pg-0.15
http://search.cpan.org/~dmaki/DateTime-Format-Pg-0.15/
Parse and format PostgreSQL dates and times
----
Egg-Release-1.2001
http://search.cpan.org/~lushe/Egg-Release-1.2001/
WEB application framework release version.
----
Email-ARF-0.002
http://search.cpan.org/~rjbs/Email-ARF-0.002/
abuse report format (placeholder module)
----
Email-ARF-0.003
http://search.cpan.org/~rjbs/Email-ARF-0.003/
abuse report format (placeholder module)
----
Email-Abstract-2.132
http://search.cpan.org/~rjbs/Email-Abstract-2.132/
unified interface to mail representations
----
Email-Date-1.102
http://search.cpan.org/~rjbs/Email-Date-1.102/
Find and Format Date Headers
----
Email-Folder-IMAP-1.101
http://search.cpan.org/~rjbs/Email-Folder-IMAP-1.101/
Email::Folder Access to IMAP Folders
----
Email-Folder-IMAPS-1.101
http://search.cpan.org/~rjbs/Email-Folder-IMAPS-1.101/
Email::Folder Access to IMAP over SSL Folders
----
Email-Folder-POP3-1.012
http://search.cpan.org/~rjbs/Email-Folder-POP3-1.012/
Email::Folder Access to POP3 Folders
----
Email-FolderType-0.813
http://search.cpan.org/~rjbs/Email-FolderType-0.813/
determine the type of a mail folder
----
Email-FolderType-Net-1.041
http://search.cpan.org/~rjbs/Email-FolderType-Net-1.041/
Recognize folder types for network based message protocols.
----
Email-MIME-ContentType-1.014
http://search.cpan.org/~rjbs/Email-MIME-ContentType-1.014/
Parse a MIME Content-Type Header
----
Email-MIME-Creator-1.452
http://search.cpan.org/~rjbs/Email-MIME-Creator-1.452/
Email::MIME constructor for starting anew.
----
Email-MIME-Encodings-1.311
http://search.cpan.org/~rjbs/Email-MIME-Encodings-1.311/
A unified interface to MIME encoding and decoding
----
Email-MessageID-1.351
http://search.cpan.org/~rjbs/Email-MessageID-1.351/
Generate world unique message-ids.
----
Email-Simple-Creator-1.420
http://search.cpan.org/~rjbs/Email-Simple-Creator-1.420/
Email::Simple constructor for starting anew
----
Email-Store-0.255
http://search.cpan.org/~rjbs/Email-Store-0.255/
Framework for database-backed email storage
----
Email-Thread-0.711
http://search.cpan.org/~rjbs/Email-Thread-0.711/
Use JWZ's mail threading algorithm with Email::Simple objects
----
File-FilterFuncs-0.53
http://search.cpan.org/~mumiaw/File-FilterFuncs-0.53/
specify filter functions for files
----
GO-TermFinder-0.8
http://search.cpan.org/~sherlock/GO-TermFinder-0.8/
identify GO nodes that annotate a group of genes with a significant p-value
----
JSON-DWIW-0.04
http://search.cpan.org/~dowens/JSON-DWIW-0.04/
JSON converter that Does What I Want
----
JSON-XS-0.1
http://search.cpan.org/~mlehmann/JSON-XS-0.1/
JSON serialising/deserialising, done correctly and fast
----
JSON-XS-0.2
http://search.cpan.org/~mlehmann/JSON-XS-0.2/
JSON serialising/deserialising, done correctly and fast
----
Kwiki-IRCMode-0.302
http://search.cpan.org/~rjbs/Kwiki-IRCMode-0.302/
colorized IRC conversations in your Kwiki
----
Lingua-NL-Numbers-GroeneBoekje-0.10
http://search.cpan.org/~jv/Lingua-NL-Numbers-GroeneBoekje-0.10/
Convert numeric values into their Dutch equivalents
----
List-Member-0.04
http://search.cpan.org/~lgoddard/List-Member-0.04/
PROLOG's member/2: return index of $x in @y.
----
Math-Numbers-0.0000000001
http://search.cpan.org/~damog/Math-Numbers-0.0000000001/
Methods for mathematical approaches of concepts of the number theory
----
Mobile-Messaging-ParlayX-0.0.1
http://search.cpan.org/~tchatzi/Mobile-Messaging-ParlayX-0.0.1/
Interface to ParlayX OSA.
----
Nagios-Plugin-0.16
http://search.cpan.org/~gavinc/Nagios-Plugin-0.16/
a family of perl modules to streamline writing Nagios plugins
----
POE-Component-OSCAR-0.05
http://search.cpan.org/~dmcc/POE-Component-OSCAR-0.05/
A POE Component for the Net::OSCAR module
----
POE-Component-Server-POP3-0.01
http://search.cpan.org/~bingos/POE-Component-Server-POP3-0.01/
A POE framework for authoring POP3 servers
----
POE-Component-Server-SimpleSMTP-0.97
http://search.cpan.org/~bingos/POE-Component-Server-SimpleSMTP-0.97/
A simple to use POE SMTP Server.
----
POE-Component-Server-SimpleSMTP-0.98
http://search.cpan.org/~bingos/POE-Component-Server-SimpleSMTP-0.98/
A simple to use POE SMTP Server.
----
Panotools-Script-0.05
http://search.cpan.org/~bpostle/Panotools-Script-0.05/
Panorama Tools scripting
----
Socialtext-CPANWiki-0.01
http://search.cpan.org/~lukec/Socialtext-CPANWiki-0.01/
Update a wiki with info from the CPAN RSS Feed
----
Socialtext-MailArchive-0.02
http://search.cpan.org/~lukec/Socialtext-MailArchive-0.02/
Archive mail into a workspace
----
Socialtext-Resting-Utils-0.12
http://search.cpan.org/~lukec/Socialtext-Resting-Utils-0.12/
Utilities for Socialtext REST APIs
----
Socialtext-WikiTest-0.04
http://search.cpan.org/~lukec/Socialtext-WikiTest-0.04/
Execute tests defined on wiki pages
----
Socialtext-Wikrad-0.01
http://search.cpan.org/~lukec/Socialtext-Wikrad-0.01/
efficient wiki browsing and editing
----
Template-Plugin-CSV-0.04
http://search.cpan.org/~gugod/Template-Plugin-CSV-0.04/
Plugin for generating CSV
----
Test-MonitorSites-0.07
http://search.cpan.org/~hesco/Test-MonitorSites-0.07/
Monitor availability and function of a list of websites
----
Tie-CPHash-1.03
http://search.cpan.org/~cjm/Tie-CPHash-1.03/
Case preserving but case insensitive hash table
----
WWW-LargeFileFetcher-0.01
http://search.cpan.org/~jzhang/WWW-LargeFileFetcher-0.01/
The great new WWW::LargeFileFetcher!
----
WebService-Stikkit-0.0.1
http://search.cpan.org/~franckc/WebService-Stikkit-0.0.1/
Perl interface to the Stikkit API
----
XML-Atom-Service-v0.11.0
http://search.cpan.org/~takeru/XML-Atom-Service-v0.11.0/
Atom Service Document object
----
re-engine-Plan9-0.01
http://search.cpan.org/~avar/re-engine-Plan9-0.01/
Plan9 regular expression engine
----
re-engine-Plan9-0.02
http://search.cpan.org/~avar/re-engine-Plan9-0.02/
Plan9 regular expression engine
----
threads-1.61
http://search.cpan.org/~jdhedden/threads-1.61/
Perl interpreter-based threads


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/>
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!


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

Date: 22 Mar 2007 19:43:54 -0700
From: "ich_bin_Ingenieur" <jeffrozh@gmail.com>
Subject: Perl CGI returning plain text HTML code
Message-Id: <1174617834.672676.64940@y66g2000hsf.googlegroups.com>

So it's like this...

I wrote a PERL script that receives GET data and returns a webpage,
and this script works fine when used with Internet Explorer on a PC...

But when running this script on Mozilla, Opera, or Safari on a MAC, it
returns the a plain text file in the browser window of the HTML code,
rather than displaying the HTML page.

I'm not sure what's causing it to act like this.  I've tested numerous
PHP CGI's in the same browsers and they all work correctly.

The script has been CHMODed to 755, it has a .cgi extention, and it
returns an HTML page with the meta header <meta http-equiv="Content-
Type" content="text/html; charset=iso-8859-1">.  I've tried changing
the permission, changing the extention, and I'm trying to see if I can
Google this problem, but no luck yet.

The first part of the webpage is returned using a "print <<ENDHTML;"
block, and the rest of the page is returned through print
statements.

Has anyone heard about this behavior?  Does anyone know what the
problem might be?



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

Date: Fri, 23 Mar 2007 05:46:32 GMT
From: "Jürgen Exner" <jurgenex@hotmail.com>
Subject: Re: Perl CGI returning plain text HTML code
Message-Id: <YQJMh.6076$742.1905@trndny07>

ich_bin_Ingenieur wrote:
> So it's like this...
[Subject: Perl CGI returning plain text HTML code]

Well, yeah, that is what any CGI program is supposed to do (assuming you 
want to return HTML).


> I wrote a PERL script that receives GET data and returns a webpage,
> and this script works fine when used with Internet Explorer on a PC...
>
> But when running this script on Mozilla, Opera, or Safari on a MAC, it
> returns the a plain text file in the browser window of the HTML code,
> rather than displaying the HTML page.

Why do you think, this has anything, anything at all to do with Perl?

jue 




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

Date: Fri, 23 Mar 2007 08:19:43 +0000
From: Brian Wakem <no@email.com>
Subject: Re: Perl CGI returning plain text HTML code
Message-Id: <56hgsvF28nip9U1@mid.individual.net>

ich_bin_Ingenieur wrote:

> So it's like this...
> 
> I wrote a PERL script that receives GET data and returns a webpage,
> and this script works fine when used with Internet Explorer on a PC...
> 
> But when running this script on Mozilla, Opera, or Safari on a MAC, it
> returns the a plain text file in the browser window of the HTML code,
> rather than displaying the HTML page.


You are not printing the correct header.

IE incorrectly tries to determine file type from the contents even after
you've printed a text/plain header.  IE is broken and so is your script.

If you can't work it out then post the part of your script that prints the
header.


-- 
Brian Wakem
Email: http://homepage.ntlworld.com/b.wakem/myemail.png


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

Date: 23 Mar 2007 08:26:31 GMT
From: jt@toerring.de (Jens Thoms Toerring)
Subject: Re: Perl CGI returning plain text HTML code
Message-Id: <56hh9nF291jqdU1@mid.uni-berlin.de>

ich_bin_Ingenieur <jeffrozh@gmail.com> wrote:
> I wrote a PERL script that receives GET data and returns a webpage,
> and this script works fine when used with Internet Explorer on a PC...

> But when running this script on Mozilla, Opera, or Safari on a MAC, it
> returns the a plain text file in the browser window of the HTML code,
> rather than displaying the HTML page.

> I'm not sure what's causing it to act like this.  I've tested numerous
> PHP CGI's in the same browsers and they all work correctly.

Sorry, but CGI scripts aren't "run" by a browser - the browser just
renders what a _web server_ sends it and the _web server_ invokes
the CGI script, reading its output and passing that on to the client,
i.e. the browser.

> The script has been CHMODed to 755, it has a .cgi extention, and it
> returns an HTML page with the meta header <meta http-equiv="Content-
> Type" content="text/html; charset=iso-8859-1">.  I've tried changing
> the permission, changing the extention, and I'm trying to see if I can
> Google this problem, but no luck yet.

Hard to say without any real information, but my best guess at the
moment is that the output of your script isn't HTML (a <meta...>
line alone somewhere in the text isn't enough) and the Internet
Exploder treats it for some strange reason as HTML anyway while
the more standard conforming browsers don't. Can one have a look
at the output of your script and/or what exactly arrives at the
browser?
                             Regards, Jens
--
  \   Jens Thoms Toerring  ___      jt@toerring.de
   \__________________________      http://toerring.de


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

Date: 23 Mar 2007 08:05:52 GMT
From: anno4000@radom.zrz.tu-berlin.de
Subject: Re: Perl Equivelent of C++ program
Message-Id: <56hg30F28u957U1@mid.dfncis.de>

Jens Thoms Toerring <jt@toerring.de> wrote in comp.lang.perl.misc:

[...]

> things where Perl shines can be used. Like it is it's more
> like a Babelfish translation...

 ...and just like Babelfish translations, its utility is much overrated
by people who don't know the target language.

Anno


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

Date: Thu, 22 Mar 2007 20:39:05 -0500
From: Uri Guttman <uri@stemsystems.com>
To: "HotFreePHP.Com" <mahmoudkk@gmail.com>
Subject: Re: PHP Development Resources Directory
Message-Id: <x7k5x868na.fsf@mail.sysarch.com>

>>>>> "HC" == HotFreePHP Com <mahmoudkk@gmail.com> writes:

  HC> http://www.hotfreephp.com/
  HC> HotFreePHP Is A PHP Development Resources Directory For PHP Sities
  HC> and
  HC> ahuge number of ready to use scripts ,PHP Tutorials , PHP
  HC> Documentation and FAQ , free web hosting , PHP Tools and a Free Web
  HC> Hosting Guide.

and your perl question is?

why do you think spamming a perl group is a useful idea?

uri

-- 
Uri Guttman  ------  uri@stemsystems.com  -------- http://www.stemsystems.com
--Perl Consulting, Stem Development, Systems Architecture, Design and Coding-
Search or Offer Perl Jobs  ----------------------------  http://jobs.perl.org


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

Date: 23 Mar 2007 07:10:43 GMT
From: tadmc@augustmail.com
Subject: Posting Guidelines for comp.lang.perl.misc ($Revision: 1.7 $)
Message-Id: <46037d73$0$3154$ae4e5890@news.nationwide.net>

Outline
   Before posting to comp.lang.perl.misc
      Must
       - Check the Perl Frequently Asked Questions (FAQ)
       - Check the other standard Perl docs (*.pod)
      Really Really Should
       - Lurk for a while before posting
       - Search a Usenet archive
      If You Like
       - Check Other Resources
   Posting to comp.lang.perl.misc
      Is there a better place to ask your question?
       - Question should be about Perl, not about the application area
      How to participate (post) in the clpmisc community
       - Carefully choose the contents of your Subject header
       - Use an effective followup style
       - Speak Perl rather than English, when possible
       - Ask perl to help you
       - Do not re-type Perl code
       - Provide enough information
       - Do not provide too much information
       - Do not post binaries, HTML, or MIME
      Social faux pas to avoid
       - Asking a Frequently Asked Question
       - Asking a question easily answered by a cursory doc search
       - Asking for emailed answers
       - Beware of saying "doesn't work"
       - Sending a "stealth" Cc copy
      Be extra cautious when you get upset
       - Count to ten before composing a followup when you are upset
       - Count to ten after composing and before posting when you are upset
-----------------------------------------------------------------

Posting Guidelines for comp.lang.perl.misc ($Revision: 1.7 $)
    This newsgroup, commonly called clpmisc, is a technical newsgroup
    intended to be used for discussion of Perl related issues (except job
    postings), whether it be comments or questions.

    As you would expect, clpmisc discussions are usually very technical in
    nature and there are conventions for conduct in technical newsgroups
    going somewhat beyond those in non-technical newsgroups.

    The article at:

        http://www.catb.org/~esr/faqs/smart-questions.html

    describes how to get answers from technical people in general.

    This article describes things that you should, and should not, do to
    increase your chances of getting an answer to your Perl question. It is
    available in POD, HTML and plain text formats at:

     http://www.augustmail.com/~tadmc/clpmisc.shtml

    For more information about netiquette in general, see the "Netiquette
    Guidelines" at:

     http://andrew2.andrew.cmu.edu/rfc/rfc1855.html

    A note to newsgroup "regulars":

       Do not use these guidelines as a "license to flame" or other
       meanness. It is possible that a poster is unaware of things
       discussed here.  Give them the benefit of the doubt, and just
       help them learn how to post, rather than assume that they do 
       know and are being the "bad kind" of Lazy.

    A note about technical terms used here:

       In this document, we use words like "must" and "should" as
       they're used in technical conversation (such as you will
       encounter in this newsgroup). When we say that you *must* do
       something, we mean that if you don't do that something, then
       it's unlikely that you will benefit much from this group.
       We're not bossing you around; we're making the point without
       lots of words.

    Do *NOT* send email to the maintainer of these guidelines. It will be
    discarded unread. The guidelines belong to the newsgroup so all
    discussion should appear in the newsgroup. I am just the secretary that
    writes down the consensus of the group.

Before posting to comp.lang.perl.misc
  Must
    This section describes things that you *must* do before posting to
    clpmisc, in order to maximize your chances of getting meaningful replies
    to your inquiry and to avoid getting flamed for being lazy and trying to
    have others do your work.

    The perl distribution includes documentation that is copied to your hard
    drive when you install perl. Also installed is a program for looking
    things up in that (and other) documentation named 'perldoc'.

    You should either find out where the docs got installed on your system,
    or use perldoc to find them for you. Type "perldoc perldoc" to learn how
    to use perldoc itself. Type "perldoc perl" to start reading Perl's
    standard documentation.

    Check the Perl Frequently Asked Questions (FAQ)
        Checking the FAQ before posting is required in Big 8 newsgroups in
        general, there is nothing clpmisc-specific about this requirement.
        You are expected to do this in nearly all newsgroups.

        You can use the "-q" switch with perldoc to do a word search of the
        questions in the Perl FAQs.

    Check the other standard Perl docs (*.pod)
        The perl distribution comes with much more documentation than is
        available for most other newsgroups, so in clpmisc you should also
        see if you can find an answer in the other (non-FAQ) standard docs
        before posting.

    It is *not* required, or even expected, that you actually *read* all of
    Perl's standard docs, only that you spend a few minutes searching them
    before posting.

    Try doing a word-search in the standard docs for some words/phrases
    taken from your problem statement or from your very carefully worded
    "Subject:" header.

  Really Really Should
    This section describes things that you *really should* do before posting
    to clpmisc.

    Lurk for a while before posting
        This is very important and expected in all newsgroups. Lurking means
        to monitor a newsgroup for a period to become familiar with local
        customs. Each newsgroup has specific customs and rituals. Knowing
        these before you participate will help avoid embarrassing social
        situations. Consider yourself to be a foreigner at first!

    Search a Usenet archive
        There are tens of thousands of Perl programmers. It is very likely
        that your question has already been asked (and answered). See if you
        can find where it has already been answered.

        One such searchable archive is:

         http://groups.google.com/advanced_group_search

  If You Like
    This section describes things that you *can* do before posting to
    clpmisc.

    Check Other Resources
        You may want to check in books or on web sites to see if you can
        find the answer to your question.

        But you need to consider the source of such information: there are a
        lot of very poor Perl books and web sites, and several good ones
        too, of course.

Posting to comp.lang.perl.misc
    There can be 200 messages in clpmisc in a single day. Nobody is going to
    read every article. They must decide somehow which articles they are
    going to read, and which they will skip.

    Your post is in competition with 199 other posts. You need to "win"
    before a person who can help you will even read your question.

    These sections describe how you can help keep your article from being
    one of the "skipped" ones.

  Is there a better place to ask your question?
    Question should be about Perl, not about the application area
        It can be difficult to separate out where your problem really is,
        but you should make a conscious effort to post to the most
        applicable newsgroup. That is, after all, where you are the most
        likely to find the people who know how to answer your question.

        Being able to "partition" a problem is an essential skill for
        effectively troubleshooting programming problems. If you don't get
        that right, you end up looking for answers in the wrong places.

        It should be understood that you may not know that the root of your
        problem is not Perl-related (the two most frequent ones are CGI and
        Operating System related), so off-topic postings will happen from
        time to time. Be gracious when someone helps you find a better place
        to ask your question by pointing you to a more applicable newsgroup.

  How to participate (post) in the clpmisc community
    Carefully choose the contents of your Subject header
        You have 40 precious characters of Subject to win out and be one of
        the posts that gets read. Don't waste them. Take care while
        composing them, they are the key that opens the door to getting an
        answer.

        Spend them indicating what aspect of Perl others will find if they
        should decide to read your article.

        Do not spend them indicating "experience level" (guru, newbie...).

        Do not spend them pleading (please read, urgent, help!...).

        Do not spend them on non-Subjects (Perl question, one-word
        Subject...)

        For more information on choosing a Subject see "Choosing Good
        Subject Lines":

         http://www.cpan.org/authors/id/D/DM/DMR/subjects.post

        Part of the beauty of newsgroup dynamics, is that you can contribute
        to the community with your very first post! If your choice of
        Subject leads a fellow Perler to find the thread you are starting,
        then even asking a question helps us all.

    Use an effective followup style
        When composing a followup, quote only enough text to establish the
        context for the comments that you will add. Always indicate who
        wrote the quoted material. Never quote an entire article. Never
        quote a .signature (unless that is what you are commenting on).

        Intersperse your comments *following* each section of quoted text to
        which they relate. Unappreciated followup styles are referred to as
        "top-posting", "Jeopardy" (because the answer comes before the
        question), or "TOFU" (Text Over, Fullquote Under).

        Reversing the chronology of the dialog makes it much harder to
        understand (some folks won't even read it if written in that style).
        For more information on quoting style, see:

         http://web.presby.edu/~nnqadmin/nnq/nquote.html

    Speak Perl rather than English, when possible
        Perl is much more precise than natural language. Saying it in Perl
        instead will avoid misunderstanding your question or problem.

        Do not say: I have variable with "foo\tbar" in it.

        Instead say: I have $var = "foo\tbar", or I have $var = 'foo\tbar',
        or I have $var = <DATA> (and show the data line).

    Ask perl to help you
        You can ask perl itself to help you find common programming mistakes
        by doing two things: enable warnings (perldoc warnings) and enable
        "strict"ures (perldoc strict).

        You should not bother the hundreds/thousands of readers of the
        newsgroup without first seeing if a machine can help you find your
        problem. It is demeaning to be asked to do the work of a machine. It
        will annoy the readers of your article.

        You can look up any of the messages that perl might issue to find
        out what the message means and how to resolve the potential mistake
        (perldoc perldiag). If you would like perl to look them up for you,
        you can put "use diagnostics;" near the top of your program.

    Do not re-type Perl code
        Use copy/paste or your editor's "import" function rather than
        attempting to type in your code. If you make a typo you will get
        followups about your typos instead of about the question you are
        trying to get answered.

    Provide enough information
        If you do the things in this item, you will have an Extremely Good
        chance of getting people to try and help you with your problem!
        These features are a really big bonus toward your question winning
        out over all of the other posts that you are competing with.

        First make a short (less than 20-30 lines) and *complete* program
        that illustrates the problem you are having. People should be able
        to run your program by copy/pasting the code from your article. (You
        will find that doing this step very often reveals your problem
        directly. Leading to an answer much more quickly and reliably than
        posting to Usenet.)

        Describe *precisely* the input to your program. Also provide example
        input data for your program. If you need to show file input, use the
        __DATA__ token (perldata.pod) to provide the file contents inside of
        your Perl program.

        Show the output (including the verbatim text of any messages) of
        your program.

        Describe how you want the output to be different from what you are
        getting.

        If you have no idea at all of how to code up your situation, be sure
        to at least describe the 2 things that you *do* know: input and
        desired output.

    Do not provide too much information
        Do not just post your entire program for debugging. Most especially
        do not post someone *else's* entire program.

    Do not post binaries, HTML, or MIME
        clpmisc is a text only newsgroup. If you have images or binaries
        that explain your question, put them in a publically accessible
        place (like a Web server) and provide a pointer to that location. If
        you include code, cut and paste it directly in the message body.
        Don't attach anything to the message. Don't post vcards or HTML.
        Many people (and even some Usenet servers) will automatically filter
        out such messages. Many people will not be able to easily read your
        post. Plain text is something everyone can read.

  Social faux pas to avoid
    The first two below are symptoms of lots of FAQ asking here in clpmisc.
    It happens so often that folks will assume that it is happening yet
    again. If you have looked but not found, or found but didn't understand
    the docs, say so in your article.

    Asking a Frequently Asked Question
        It should be understood that you may have missed the applicable FAQ
        when you checked, which is not a big deal. But if the Frequently
        Asked Question is worded similar to your question, folks will assume
        that you did not look at all. Don't become indignant at pointers to
        the FAQ, particularly if it solves your problem.

    Asking a question easily answered by a cursory doc search
        If folks think you have not even tried the obvious step of reading
        the docs applicable to your problem, they are likely to become
        annoyed.

        If you are flamed for not checking when you *did* check, then just
        shrug it off (and take the answer that you got).

    Asking for emailed answers
        Emailed answers benefit one person. Posted answers benefit the
        entire community. If folks can take the time to answer your
        question, then you can take the time to go get the answer in the
        same place where you asked the question.

        It is OK to ask for a *copy* of the answer to be emailed, but many
        will ignore such requests anyway. If you munge your address, you
        should never expect (or ask) to get email in response to a Usenet
        post.

        Ask the question here, get the answer here (maybe).

    Beware of saying "doesn't work"
        This is a "red flag" phrase. If you find yourself writing that,
        pause and see if you can't describe what is not working without
        saying "doesn't work". That is, describe how it is not what you
        want.

    Sending a "stealth" Cc copy
        A "stealth Cc" is when you both email and post a reply without
        indicating *in the body* that you are doing so.

  Be extra cautious when you get upset
    Count to ten before composing a followup when you are upset
        This is recommended in all Usenet newsgroups. Here in clpmisc, most
        flaming sub-threads are not about any feature of Perl at all! They
        are most often for what was seen as a breach of netiquette. If you
        have lurked for a bit, then you will know what is expected and won't
        make such posts in the first place.

        But if you get upset, wait a while before writing your followup. I
        recommend waiting at least 30 minutes.

    Count to ten after composing and before posting when you are upset
        After you have written your followup, wait *another* 30 minutes
        before committing yourself by posting it. You cannot take it back
        once it has been said.

AUTHOR
    Tad McClellan <tadmc@augustmail.com> and many others on the
    comp.lang.perl.misc newsgroup.



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

Date: 23 Mar 2007 03:02:21 -0700
From: arnd.schroeter@gmail.com
Subject: RegExp -> Strings generieren
Message-Id: <1174644141.431638.247370@l75g2000hse.googlegroups.com>

Hallo,

ich m=F6chte zu einem gegebenen RegExp (alle) Strings generieren. Ich
hatte da an einen rekursiven Algorithmus gedacht, den ich ab einer
bestimmten Tiefe abbrechen. Oder es gibt eine Umwandlungsm=F6glichkeit
in einen Automaten.
Kann mir jmd. dazu etwas sagen?

Danke
Arnd Schr=F6ter



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

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 256
**************************************


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