[29424] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 668 Volume: 11

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Sat Jul 21 06:10:01 2007

Date: Sat, 21 Jul 2007 03:09:05 -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           Sat, 21 Jul 2007     Volume: 11 Number: 668

Today's topics:
    Re: FAQ 4.45 How do I find the first array element for  <bik.mido@tiscalinet.it>
    Re: Looking for modules to help downlaod web-pages... <sisyphus1@nomail.afraid.org>
    Re: Looking for modules to help downlaod web-pages... <ts@dionic.net>
    Re: Math <zaxfuuq@invalid.net>
        new CPAN modules on Sat Jul 21 2007 (Randal Schwartz)
    Re: Perl 5.6 vs 5.8 <mjcarman@mchsi.com>
    Re: retrieving usenet messages III <zaxfuuq@invalid.net>
    Re: retrieving usenet messages III <zaxfuuq@invalid.net>
    Re: retrieving usenet messages III <zaxfuuq@invalid.net>
    Re: retrieving usenet messages III <zaxfuuq@invalid.net>
    Re: retrieving usenet messages III <bik.mido@tiscalinet.it>
    Re: retrieving usenet messages III <bik.mido@tiscalinet.it>
    Re: retrieving usenet messages III <bik.mido@tiscalinet.it>
    Re: retrieving usenet messages III <bik.mido@tiscalinet.it>
    Re: What to do about memory leaks <t-use@gmx.net>
        Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)

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

Date: Sat, 21 Jul 2007 12:00:56 +0200
From: Michele Dondi <bik.mido@tiscalinet.it>
Subject: Re: FAQ 4.45 How do I find the first array element for which a condition is true?
Message-Id: <dll3a39ptnhdvc06lvb4rc0vn283336vsj@4ax.com>

On 20 Jul 2007 23:50:25 GMT, anno4000@radom.zrz.tu-berlin.de wrote:

>> my $first = (grep /smith/i, @people)[0];
>> 
>> But inefficient, because it will grep more than necessary.
>
>I prefer to write that
>
>    my ( $first) = grep ...;

D'Oh! I'm so fond of list slicing that I tend to use even where
simpler alternatives are there.

>It can easily be combined with a check for uniqueness, which is
>sometimes an issue:
>
>    my @l = qw( foo bar baz);
>    ( my ( $first) = grep /ba/ => @l ) > 1 and warn "not unique\n";
>    print "first: $first\n";

Anno, you're always a bag full of resources: for some reason I would
have never thought of that, even though every single bit of syntax and
semantics is very clear and well known to me - list assignment put to
a very useful use!


Michele
-- 
{$_=pack'B8'x25,unpack'A8'x32,$a^=sub{pop^pop}->(map substr
(($a||=join'',map--$|x$_,(unpack'w',unpack'u','G^<R<Y]*YB='
 .'KYU;*EVH[.FHF2W+#"\Z*5TI/ER<Z`S(G.DZZ9OX0Z')=~/./g)x2,$_,
256),7,249);s/[^\w,]/ /g;$ \=/^J/?$/:"\r";print,redo}#JAPH,


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

Date: Sat, 21 Jul 2007 13:24:41 +1000
From: "Sisyphus" <sisyphus1@nomail.afraid.org>
Subject: Re: Looking for modules to help downlaod web-pages...
Message-Id: <46a17c7e$0$15276$afc38c87@news.optusnet.com.au>


"Koppe" <koppe74@gmail.com> wrote in message 
news:1184971988.527117.237460@w3g2000hsg.googlegroups.com...
 .
 .
> I would like to make a script to automate the downloading
> some pages on the Web
 .
 .

Sounds like you might be interested in WWW::Mechanize.

Cheers,
Rob 



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

Date: Sat, 21 Jul 2007 09:22:21 +0100
From: Tim Southerwood <ts@dionic.net>
Subject: Re: Looking for modules to help downlaod web-pages...
Message-Id: <46a1c23d$0$648$5a6aecb4@news.aaisp.net.uk>

Sisyphus coughed up some electrons that declared:

> 
> "Koppe" <koppe74@gmail.com> wrote in message
> news:1184971988.527117.237460@w3g2000hsg.googlegroups.com...
> .
> .
>> I would like to make a script to automate the downloading
>> some pages on the Web
> .
> .
> 
> Sounds like you might be interested in WWW::Mechanize.
> 
> Cheers,
> Rob

Also LWP or Net::HTTP for more traditional approaches.

Don't overlook driving wget as another way.

Cheers
Tim


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

Date: Sat, 21 Jul 2007 03:08:21 -0700
From: "Wade Ward" <zaxfuuq@invalid.net>
Subject: Re: Math
Message-Id: <b_OdnaF8WLdrLTzbnZ2dnUVZ_uCinZ2d@comcast.com>


"Michele Dondi" <bik.mido@tiscalinet.it> wrote in message 
news:tr01a3d66nj7o30m3nkj8hihja4ru39cdg@4ax.com...
> On Fri, 20 Jul 2007 02:22:45 -0700, "merl the perl"
> <zaxfuuq@invalid.net> wrote:
>
>>> Thank you and thanks for all the answers.
>>I think that in order to get something like a number out of perl from
>>usenet, you would need techniques beyond the Perl Programming Language. 
>>So
>>much idiot shit.
>
> Merl the perl, please! What do you mean? I can get something like a
> number out of perl very easily. Nay, a lot of numbers:
>
>  perl -le "print $x=($x%2?3*$x+1:$x/2)||int rand~0 while $x!=1"
>
> I don't know what you mean with "from usenet". You can search the
> archives for Abigail's Erathostene's Sieve implementation if you like.
> Most of my contributions to the OEIS did feature sequences calculated
> with Perl... then at some time I stopped and I'm not even on the ML
> any more, due to lack of time, but that's another story.
It was an intemperate response rooted in frustration.  Sorry.  You just 
can't know how hard it is for me to tell someone named "michele" that.  I 
swear it's for lack of opportunity.
--




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

Date: Sat, 21 Jul 2007 04:42:18 GMT
From: merlyn@stonehenge.com (Randal Schwartz)
Subject: new CPAN modules on Sat Jul 21 2007
Message-Id: <JLIIEI.rCH@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-Roman-0.0.2.10
http://search.cpan.org/~ferreira/Acme-Roman-0.0.2.10/
Do maths like Romans did 
----
Acme-Roman-0.0.2.11
http://search.cpan.org/~ferreira/Acme-Roman-0.0.2.11/
Do maths like Romans did 
----
Acme-Roman-0.0.2.9
http://search.cpan.org/~ferreira/Acme-Roman-0.0.2.9/
Do maths like Romans did 
----
Apache-Dispatch-0.10_02
http://search.cpan.org/~phred/Apache-Dispatch-0.10_02/
call PerlHandlers with the ease of Registry scripts 
----
Apache-SWIT-0.27
http://search.cpan.org/~bosu/Apache-SWIT-0.27/
mod_perl based application server with integrated testing. 
----
Apache2-Dispatch-0.10_02
http://search.cpan.org/~phred/Apache2-Dispatch-0.10_02/
call PerlHandlers with the ease of Registry scripts 
----
Archive-Tar-Wrapper-0.09
http://search.cpan.org/~mschilli/Archive-Tar-Wrapper-0.09/
API wrapper around the 'tar' utility 
----
BPAN-0.01
http://search.cpan.org/~ingy/BPAN-0.01/
Be Patient And Nonesuch 
----
Bio-Das-Lite-1.052
http://search.cpan.org/~rpettett/Bio-Das-Lite-1.052/
Perl extension for the DAS (HTTP+XML) Protocol (http://biodas.org/) 
----
Bio-Phylo-0.17_RC6
http://search.cpan.org/~rvosa/Bio-Phylo-0.17_RC6/
Phylogenetic analysis using perl. 
----
Catalyst-Action-RenderView-ErrorHandler-0.0103
http://search.cpan.org/~andremar/Catalyst-Action-RenderView-ErrorHandler-0.0103/
Custom errorhandling in deployed applications 
----
Catalyst-Action-RenderView-ErrorHandler-0.0104
http://search.cpan.org/~andremar/Catalyst-Action-RenderView-ErrorHandler-0.0104/
Custom errorhandling in deployed applications 
----
Catalyst-Plugin-Unicode-0.5
http://search.cpan.org/~mramberg/Catalyst-Plugin-Unicode-0.5/
Unicode aware Catalyst 
----
DBIx-EnumConstraints-0.01
http://search.cpan.org/~bosu/DBIx-EnumConstraints-0.01/
generates enum-like SQL constraints. 
----
Data-Tabular-0.27
http://search.cpan.org/~gam/Data-Tabular-0.27/
Handy Table Manipulation and rendering Object 
----
Device-SerialPort-1.003
http://search.cpan.org/~cook/Device-SerialPort-1.003/
Linux/POSIX emulation of Win32::SerialPort functions. 
----
Device-SerialPort-1.003001
http://search.cpan.org/~cook/Device-SerialPort-1.003001/
Linux/POSIX emulation of Win32::SerialPort functions. 
----
ExtUtils-Install-1.42
http://search.cpan.org/~yves/ExtUtils-Install-1.42/
install files from here to there 
----
ExtUtils-Install-1.43
http://search.cpan.org/~yves/ExtUtils-Install-1.43/
install files from here to there 
----
File-BSED-0.66
http://search.cpan.org/~asksh/File-BSED-0.66/
Search/Replace in Binary Files. 
----
GRID-Machine-0.07
http://search.cpan.org/~casiano/GRID-Machine-0.07/
Remote Procedure Calls over a SSH link 
----
GRID-Machine-0.071
http://search.cpan.org/~casiano/GRID-Machine-0.071/
Remote Procedure Calls over a SSH link 
----
Graph-MaxFlow-0.01
http://search.cpan.org/~waltman/Graph-MaxFlow-0.01/
compute maximum flow between 2 vertices in a graph 
----
Handel-Storage-RDBO-1.00001
http://search.cpan.org/~claco/Handel-Storage-RDBO-1.00001/
RDBO storage layer for Handel 1.x 
----
Muldis-DB-0.2.0
http://search.cpan.org/~duncand/Muldis-DB-0.2.0/
Full-featured truly relational DBMS in Perl 
----
Net-SMPP-1.11
http://search.cpan.org/~sampo/Net-SMPP-1.11/
pure Perl implementation of SMPP 3.4 over TCP 
----
PAR-Dist-0.24
http://search.cpan.org/~smueller/PAR-Dist-0.24/
Create and manipulate PAR distributions 
----
PICA-Record-0.3
http://search.cpan.org/~voj/PICA-Record-0.3/
Perl extension for handling PICA+ records 
----
POE-Component-Server-SimpleSMTP-1.05
http://search.cpan.org/~bingos/POE-Component-Server-SimpleSMTP-1.05/
A simple to use POE SMTP Server. 
----
Parse-Eyapp-1.073
http://search.cpan.org/~casiano/Parse-Eyapp-1.073/
Extensions for Parse::Yapp 
----
PerlIO-via-ANSIColor-0.02
http://search.cpan.org/~masanorih/PerlIO-via-ANSIColor-0.02/
PerlIO layer for Term::ANSIColor 
----
Rose-DB-0.735
http://search.cpan.org/~jsiracusa/Rose-DB-0.735/
A DBI wrapper and abstraction layer. 
----
Rose-DB-Object-0.765
http://search.cpan.org/~jsiracusa/Rose-DB-Object-0.765/
Extensible, high performance RDBMS-OO mapper. 
----
Rose-HTML-Objects-0.549
http://search.cpan.org/~jsiracusa/Rose-HTML-Objects-0.549/
Object-oriented interfaces for HTML. 
----
SOAP-WSDL-2.00_06
http://search.cpan.org/~mkutter/SOAP-WSDL-2.00_06/
SOAP with WSDL support 
----
SVK-v2.0.2
http://search.cpan.org/~clkao/SVK-v2.0.2/
A Distributed Version Control System 
----
Task-Hatena-0.01
http://search.cpan.org/~ski/Task-Hatena-0.01/
installs all the Hatena modules 
----
Test-BinaryData-0.001
http://search.cpan.org/~rjbs/Test-BinaryData-0.001/
compare two things, give hex dumps if they differ 
----
Test-BinaryData-0.002
http://search.cpan.org/~rjbs/Test-BinaryData-0.002/
compare two things, give hex dumps if they differ 
----
Test-BinaryData-0.003
http://search.cpan.org/~rjbs/Test-BinaryData-0.003/
compare two things, give hex dumps if they differ 
----
Test-XML-Order-0.05
http://search.cpan.org/~gam/Test-XML-Order-0.05/
Compare the order of XML tags in perl tests 
----
Tree-Node-0.08
http://search.cpan.org/~rrwo/Tree-Node-0.08/
Memory-efficient tree nodes in Perl 
----
WWW-Facebook-API-v0.4.3
http://search.cpan.org/~unobe/WWW-Facebook-API-v0.4.3/
Facebook API implementation 
----
WWW-Search-Backends-1.071
http://search.cpan.org/~mthurn/WWW-Search-Backends-1.071/
----
WWW-Search-Backends-1.072
http://search.cpan.org/~mthurn/WWW-Search-Backends-1.072/
----
WWW-Zorpia-Journal-0.01
http://search.cpan.org/~fayland/WWW-Zorpia-Journal-0.01/
Post a journal to www.zorpia.com 
----
WebService-30Boxes-API-1.0
http://search.cpan.org/~chitoiup/WebService-30Boxes-API-1.0/
Perl interface to the 30boxes.com REST API 
----
WebService-30Boxes-API-1.01
http://search.cpan.org/~chitoiup/WebService-30Boxes-API-1.01/
Perl interface to the 30 Boxes API 
----
Weed-0.0084
http://search.cpan.org/~hooo/Weed-0.0084/
Don't use it. It's in development. For test purposes only! 
----
tkjuke-2.2.1
http://search.cpan.org/~lusol/tkjuke-2.2.1/
manipulate jukeboxes from a Perl/Tk program 


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: Sat, 21 Jul 2007 01:37:31 GMT
From: Michael Carman <mjcarman@mchsi.com>
Subject: Re: Perl 5.6 vs 5.8
Message-Id: <vrdoi.16737$Xa3.6697@attbi_s22>

On 7/10/2007 7:48 PM, Robert Hicks wrote:
> We are migrating from a 5.6 PA-RISC setup to a 5.8 Itanium setup. [...] I am
> looking more at did something change with how Perl handles hashes and arrays
> between the two versions.

Does anything in your program depend on the internal hash order? In v5.6 the
order was repeatable but it was made more random in v5.8.

-mjc


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

Date: Fri, 20 Jul 2007 22:50:45 -0700
From: "merl the perl" <zaxfuuq@invalid.net>
Subject: Re: retrieving usenet messages III
Message-Id: <gKydnV-X97kL6TzbnZ2dnUVZ_sqinZ2d@comcast.com>


"Michele Dondi" <bik.mido@tiscalinet.it> wrote in message 
news:94t0a3hkbf5i9gpq1e5o0ihn26p6qg83lu@4ax.com...
> On Thu, 19 Jul 2007 21:35:08 -0700, "merl the perl"
> <zaxfuuq@invalid.net> wrote:
>
>>No!  I haven't gotten that far.  One reason I can't get that far is that I
>>have yet to get a perl program beyond hello world to compile, interpret, 
>>or
>>do anything besides take a dump.
>
> Try my .sig, I think it's "beyond hello world".
I did.  Just another perl hacker.  I guess I forgot that on my impressive 
list of things I've been able to do with perl.

>>> (I made a further little modification from the last posted version, I
>>> think.)
>>#perl exe's opinion followed by source script
>>Can't locate Date/Parse.pm in @INC (@INC contains: C:/Perl/lib
>>C:/Perl/site/lib .) at perl3.pl line 6.
>>BEGIN failed--compilation aborted at perl3.pl line 6.
>
> Well, prepare yourself to see many such errors. I simply used a module
> which is not a core one, thus you have to install it: you mentioned
> Windows and I suppose you're using AS's ActivePerl, thus it is simply
> a matter of doing
>
>  ppm install Date::Parse
Installing package 'Date-Parse'...
Error installing package 'Date-Parse': Could not locate a PPD file for 
package Date-Parse
It looks like I'll be wanting to do some updating.

> I just checked and version 1.16 is available from AS's repository. You
> may still want to add some repositories, mine are as follows:
>
>
>  C:\temp>ppm rep list
>  +---------------------------------------------+
>  ¦ id ¦ pkgs  ¦ name                           ¦
>  +----+-------+--------------------------------¦
>  ¦  1 ¦  6777 ¦ ActiveState Package Repository ¦
>  ¦  2 ¦   631 ¦ uwinnipeg                      ¦
>  ¦  3 ¦   395 ¦ bribes                         ¦
>  ¦  4 ¦ 10418 ¦ trouchelle                     ¦
>  ¦  5 ¦    20 ¦ SoulCage                       ¦
>  +---------------------------------------------+
>   (5 enabled repositories)
My perl.exe doesn't know what a 'rep' is.

I actually had some success with this issue today:
#!/usr/bin/perl -w

use strict;
use Net::NNTP ();

use constant NUMBER_OF_ARTICLES    => 10;
use constant GROUP_NAME        => 'alt.solaris.x86';
use constant SERVER_NAME    => 'newsgroups.comcast.net';
use constant NNTP_DEBUG        => 0;

my $nntp = Net::NNTP->new(SERVER_NAME, 'Debug' => NNTP_DEBUG) or die;
my $USER = '';
my $PASS = '';

$nntp->authinfo($USER,$PASS) or die $!;


my($article_count, $first_article, $last_article) = $nntp->group(GROUP_NAME) 
or die;


# Which XOVER fields contain Subject: and From:?
my $count = 0;
my %xover_fmt = map( ($_, $count++), @{ $nntp->overview_fmt or die} );
die unless exists $xover_fmt{'Subject:'};
my $subject_offset = $xover_fmt{'Subject:'};
my $from_offset = $xover_fmt{'From:'};

my(@xover, $start_article);
RETRIEVE: while ($#xover+1 < NUMBER_OF_ARTICLES and $last_article >= 
$first_article) {

    # How many articles do we need?  Stop retrieving if we have enough
    my $articles_required = NUMBER_OF_ARTICLES - ($#xover+1) or last 
RETRIEVE;


    # Fetch overview information for the articles
    $start_article = $last_article - ($articles_required-1);
    $start_article = $start_article > $first_article ? $start_article : 
$first_article;

    my $xover_query = $start_article == $last_article ?
    $start_article :
    [$start_article, $last_article];
    my $xover_ref = $nntp->xover($xover_query) or die;

    # Store headers for the articles we've retrieved
    foreach (sort {$b <=> $a} keys %$xover_ref) {
        push @xover, $xover_ref->{$_};
    }
} continue {
    # Move the pointer forward to fetch previous articles
    $last_article = $start_article - 1;
}

# Disconnect from the NNTP server
$nntp->quit;

print join("\n", map ($_->[$subject_offset].' from '.$_->[$from_offset], 
@xover)),"\n";
#end script
I was trying everything I could find with xover.  This script has a lot of 
stuff that I don't get at all, so it's of limited use to me, but IT RUNS, 
which is more than I can say for anything else I've done.  With xover as 
opposed to newnews, I think we're going to be pretty close.

The time I've spent with perl has had positive externalities.  When I'm 
faced with an XP wizard that wants to know things that enable it to hook up 
with servers, it's all right on my fingertips. I don't even look sometimes 
at the keys, which is a new paradigm for me when entering passwords.

I'm trying to install Solaris on a partition tonight so will have no more 
time for perl.  I appreciate your help, and in particular, yours, Michele.
-- 
Cheers, merl 




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

Date: Fri, 20 Jul 2007 22:53:50 -0700
From: "merl the perl" <zaxfuuq@invalid.net>
Subject: Re: retrieving usenet messages III
Message-Id: <24-dnRTkWuTS6DzbnZ2dnUVZ_g6dnZ2d@comcast.com>


"Michele Dondi" <bik.mido@tiscalinet.it> wrote in message 
news:s961a3dj8efg4rv1lec5vptr27odopf76h@4ax.com...
> On Thu, 19 Jul 2007 20:55:59 -0700, "merl the perl"
> <zaxfuuq@invalid.net> wrote:
>
>>Merrill is my given name.  Many Americans cannot so much as pronounce my
>
> Yeah, like Merril Strip, ain't it?  ;-p
That's the final insult with my name.  The only Merrill out there is Meryl 
Streep.  Everyone can say my name correctly when it's said of the other 
gender.
--
merl 




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

Date: Sat, 21 Jul 2007 00:01:41 -0700
From: "Wade Ward" <zaxfuuq@invalid.net>
Subject: Re: retrieving usenet messages III
Message-Id: <vKadndLHsYarGDzbnZ2dnUVZ_gGdnZ2d@comcast.com>


"Michele Dondi" <bik.mido@tiscalinet.it> wrote in message 
news:h9ou93lijg4sb32bq1fn2tn58i36jl1oeu@4ax.com...
> On Wed, 18 Jul 2007 04:01:18 +0200, Gunnar Hjalmarsson
> <noreply@gunnar.cc> wrote:
>
>>> #$nntp->authinfo($USER,$PASS) or die $!;
>>--^
>>Wake up! Be more careful before posting.
>
> To the OP: and/or use a text editor that does syntax highlighting. It
> will help you to "stay awake". Mine wants a space after # to recognize
> it as a comment, and I generally stick to that because it's also
> clearer: with one line it's only one more, easy, keystroke. With
> several lines I take advantage of the editor's ability to comment and
> uncomment a selected block of code, available with cheap keybindings.
I tried Komodo, but it was much more than I could handle.  I think what I 
want to do is wait to see if I can get a Solaris partition, and ifso, then 
I'll try to get perl working there.

What do you use when you're on windows?
-- 




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

Date: Sat, 21 Jul 2007 00:03:33 -0700
From: "Wade Ward" <zaxfuuq@invalid.net>
Subject: Re: retrieving usenet messages III
Message-Id: <uPKdnahMjMU4GDzbnZ2dnUVZ_r-vnZ2d@comcast.com>


"Michele Dondi" <bik.mido@tiscalinet.it> wrote in message 
news:ihou93ptmuu3m4r6s1afkoa4c7i3s2sq4g@4ax.com...
> On Tue, 17 Jul 2007 20:24:03 -0700, "merl the perl"
> <zaxfuuq@invalid.net> wrote:
>
>>I've been trying to herd usenet messages into files on my machine.  The
>>latest setback I had was that I had to do a clean sweep on my machine (not
>>perl related, itunes with bundled Quicktime killed my primary identity 
>>with
>>a script that would make it a virus by any other name).  Unfortunately, I
>>didn't save my last version of this script:
>>#!/usr/bin/env perl
>>use strict;
>>use warnings;
>>use Net::NNTP;
>>
>>my $nntp = Net::NNTP->new('newsgroups.comcast.net', ( Debug => 1) );
>
> Oh no, again! Did you try by any chance try using my "version" of the
> script, or the much more complete program a link to which was posted
> by another one of the regulars here?
I certainly don't recall seeing such a link.
--




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

Date: Sat, 21 Jul 2007 10:54:55 +0200
From: Michele Dondi <bik.mido@tiscalinet.it>
Subject: Re: retrieving usenet messages III
Message-Id: <pai3a3dv0qveuricknv402954amhnbqcsj@4ax.com>

On Fri, 20 Jul 2007 22:53:50 -0700, "merl the perl"
<zaxfuuq@invalid.net> wrote:

>> Yeah, like Merril Strip, ain't it?  ;-p
>That's the final insult with my name.  The only Merrill out there is Meryl 

With a winking eye and a tongue like that, it can't be an insult.

>Streep.  Everyone can say my name correctly when it's said of the other 
>gender.

Oh, no: if I want to mangle the name I must mangle the surname as
well. For consistency and all, you know.  :-)


Michele
-- 
{$_=pack'B8'x25,unpack'A8'x32,$a^=sub{pop^pop}->(map substr
(($a||=join'',map--$|x$_,(unpack'w',unpack'u','G^<R<Y]*YB='
 .'KYU;*EVH[.FHF2W+#"\Z*5TI/ER<Z`S(G.DZZ9OX0Z')=~/./g)x2,$_,
256),7,249);s/[^\w,]/ /g;$ \=/^J/?$/:"\r";print,redo}#JAPH,


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

Date: Sat, 21 Jul 2007 11:32:32 +0200
From: Michele Dondi <bik.mido@tiscalinet.it>
Subject: Re: retrieving usenet messages III
Message-Id: <pji3a31spsd57stb9ebcat35ptukpp8nfv@4ax.com>

On Fri, 20 Jul 2007 22:50:45 -0700, "merl the perl"
<zaxfuuq@invalid.net> wrote:

>>  ppm install Date::Parse
>Installing package 'Date-Parse'...
>Error installing package 'Date-Parse': Could not locate a PPD file for 
>package Date-Parse
>It looks like I'll be wanting to do some updating.

I think so too. Which version of perl are you using? 5.8.8 here -AS
build 820- and as I wrote D::P v. 1.16 is available from AS's
repository.

>>  C:\temp>ppm rep list
[...]
>My perl.exe doesn't know what a 'rep' is.

I doubt that *any* perl executable knows, nor does Perl know. But AS's
ppm program, which happens to be written in Perl, should know.

>I actually had some success with this issue today:
>#!/usr/bin/perl -w
>
>use strict;
[snip]

Well, AFAICS this does something different wrt the other proposed
snippets: it retrieves messages based on a constraint on the number of
messages retrieved rather than on the date. Of course you can easily
modify it to do the latter, but then you'll still need to either
manually parse dates, which is a Pita, or resort to a nifty date
parsing module like... err... Date::Parse.

>I was trying everything I could find with xover.  This script has a lot of 
>stuff that I don't get at all, so it's of limited use to me, but IT RUNS, 
>which is more than I can say for anything else I've done.  With xover as 

Well, do you accept a bet? Would you bet that mine, modified as not to
use Date::Parse WILL RUN as well?


  #!/usr/bin/perl
  
  use strict;
  use warnings;
  use Net::NNTP;
  
  my $nsrv='news.tiscali.it';
  my $grp='comp.lang.perl.misc';
  
  my $nntp=Net::NNTP->new($nsrv) or die "Can't login to `$nsrv'$!\n";
  my (undef, $first, $last, undef)=$nntp->group($grp)
    or die "Can't access $grp\n";
  
  $nntp->article($_,\*STDOUT) for
    do { my $t=$last-100; $first<$t ? $t : $first } .. $last;
    
  __END__


(This retrieves the last 100 articles, or less if less are available.)

>opposed to newnews, I think we're going to be pretty close.

Mine doesn't use newnews() either. Whether you use my simple minded
approach or the better xover one, if you want to parse dates you'll
still most likely need (a module like) Date::Parse: that you can't
install it is a shame, but not our fault.

>I'm trying to install Solaris on a partition tonight so will have no more 
>time for perl.  I appreciate your help, and in particular, yours, Michele.

Why? Can't you use Solaris' perl? Which, for what I've heard, should
come preinstalled...


Michele
-- 
{$_=pack'B8'x25,unpack'A8'x32,$a^=sub{pop^pop}->(map substr
(($a||=join'',map--$|x$_,(unpack'w',unpack'u','G^<R<Y]*YB='
 .'KYU;*EVH[.FHF2W+#"\Z*5TI/ER<Z`S(G.DZZ9OX0Z')=~/./g)x2,$_,
256),7,249);s/[^\w,]/ /g;$ \=/^J/?$/:"\r";print,redo}#JAPH,


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

Date: Sat, 21 Jul 2007 11:34:37 +0200
From: Michele Dondi <bik.mido@tiscalinet.it>
Subject: Re: retrieving usenet messages III
Message-Id: <jnk3a3lelq55ug28bh1ses9qsea7t5gdvo@4ax.com>

On Sat, 21 Jul 2007 00:01:41 -0700, "Wade Ward" <zaxfuuq@invalid.net>
wrote:

>I tried Komodo, but it was much more than I could handle.  I think what I 
>want to do is wait to see if I can get a Solaris partition, and ifso, then 
>I'll try to get perl working there.

It should come preinstalled.

>What do you use when you're on windows?

ActivePerl, always been fine with it. Tempted by strawberry, but most
probably waiting for it to become more mature.


Michele
-- 
{$_=pack'B8'x25,unpack'A8'x32,$a^=sub{pop^pop}->(map substr
(($a||=join'',map--$|x$_,(unpack'w',unpack'u','G^<R<Y]*YB='
 .'KYU;*EVH[.FHF2W+#"\Z*5TI/ER<Z`S(G.DZZ9OX0Z')=~/./g)x2,$_,
256),7,249);s/[^\w,]/ /g;$ \=/^J/?$/:"\r";print,redo}#JAPH,


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

Date: Sat, 21 Jul 2007 11:44:00 +0200
From: Michele Dondi <bik.mido@tiscalinet.it>
Subject: Re: retrieving usenet messages III
Message-Id: <l5l3a3l6fjkupfp3e2uuo55mn6kn3lav3f@4ax.com>

On Sat, 21 Jul 2007 00:03:33 -0700, "Wade Ward" <zaxfuuq@invalid.net>
wrote:

>> Oh no, again! Did you try by any chance try using my "version" of the
>> script, or the much more complete program a link to which was posted
>> by another one of the regulars here?
>I certainly don't recall seeing such a link.

Funny, I can remember this quite easily and could find it easily as
well with GG. In <news:f6o29i.1gk.1@news.isolution.nl> "Dr.Ruud"
<rvtol+news@isolution.nl> wrote:

: > it turned our that
: > the command corresponding to the newnews method was not supported at
: > either of the news servers I have access to.
: 
: That was actually one of the reasons why I mentioned:
:   http://www.xs4all.nl/~rvtol/perl/xover_clpm.pl 
: :)


Michele
-- 
{$_=pack'B8'x25,unpack'A8'x32,$a^=sub{pop^pop}->(map substr
(($a||=join'',map--$|x$_,(unpack'w',unpack'u','G^<R<Y]*YB='
 .'KYU;*EVH[.FHF2W+#"\Z*5TI/ER<Z`S(G.DZZ9OX0Z')=~/./g)x2,$_,
256),7,249);s/[^\w,]/ /g;$ \=/^J/?$/:"\r";print,redo}#JAPH,


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

Date: 21 Jul 2007 05:33:04 GMT
From: Martin Trautmann <t-use@gmx.net>
Subject: Re: What to do about memory leaks
Message-Id: <slrnfa36kg.51f.t-use@ID-685.user.individual.de>

On Sat, 21 Jul 2007 00:33:53 +0200, baalbek wrote:
>  In order not to cache the downloaded result, use this constructor:
> 
>  my $agent = WWW::Mechanize->new(stack_depth => 1);

Thanks!
Martin


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

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


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