[12258] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 5858 Volume: 8

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Wed Jun 2 09:07:15 1999

Date: Wed, 2 Jun 99 06:00:20 -0700
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)

Perl-Users Digest           Wed, 2 Jun 1999     Volume: 8 Number: 5858

Today's topics:
    Re: Can't load module DBI, dynamic loading not availabl (Alastair)
    Re: CGI Newbie <gellyfish@gellyfish.com>
    Re: FAQ 4.16: Does Perl have a year 2000 problem? Is Pe (Sitaram Chamarty)
        feel like i'm going crazy... <office@asc.nl>
    Re: feel like i'm going crazy... <gellyfish@gellyfish.com>
    Re: feel like i'm going crazy... <office@asc.nl>
    Re: feel like i'm going crazy... <vincent_vanbiervliet@be.ibm.com>
    Re: feel like i'm going crazy... <office@asc.nl>
    Re: feel like i'm going crazy... <office@asc.nl>
    Re: feel like i'm going crazy... <office@asc.nl>
    Re: Is split (surprisingly, amazingly) slow? <kensai@nortel.com>
        Loading modules at run time <jan.van.rensburg@epiuse.com>
        Net::FTP & timeout - problem <kulak@hulmak.cz>
    Re: Network programming tutoriall? (Sitaram Chamarty)
    Re: Newbie - what do I need to run Perl scripts on our  <gellyfish@gellyfish.com>
    Re: Newbie - what do I need to run Perl scripts on our  <office@asc.nl>
        perl can't find GD Module <pleyer@kraftwerk.co.at>
    Re: perl can't find GD Module <office@asc.nl>
    Re: perldebug: visibility of local (private) variables (M.J.T. Guy)
        Problem with SQL statement in DBI (john)
    Re: quotewords bug?  what the hell? <kensai@nortel.com>
    Re: Salvaging CPAN installs after Perl upgrade? (Sitaram Chamarty)
    Re: Text::Query::Advanced - I need a simple example :) (Sitaram Chamarty)
    Re: Time Error <gellyfish@gellyfish.com>
    Re: Time Error <axc@iname.com>
        Special: Digest Administrivia (Last modified: 12 Dec 98 (Perl-Users-Digest Admin)

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

Date: Wed, 02 Jun 1999 11:25:09 GMT
From: alastair@calliope.demon.co.uk (Alastair)
Subject: Re: Can't load module DBI, dynamic loading not available in this perl.
Message-Id: <slrn7la8o8.bc.alastair@calliope.demon.co.uk>

Boris Bakulin <bakulin@eximb.kiev.ua> wrote:
>Can't load module DBI, dynamic loading not available in this perl.
>  (You may need to build a new perl executable which either supports
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>  dynamic loading or has the DBI module statically linked into it.)
>
>Any idies

Try building a new Perl that supports dynamic loading?

HTH.

-- 

Alastair
work  : alastair@psoft.co.uk
home  : alastair@calliope.demon.co.uk


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

Date: 2 Jun 1999 11:22:48 +0100
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: CGI Newbie
Message-Id: <375505f8@newsread3.dircon.co.uk>

phil hoyt <philh@stalag13.com> wrote:
> I just want a simple droplet to decode info sent via email with the
> method "post". Information on tbis subject is hard to track down and
> most of it is for posting directly via http. 

Er, then its not CGI is it and I dont think its got much to do with
Perl either.  If you have a form with an action of 'mailto:blah@blah.com'
it just sends the contents of the form as name-value pairs however in my
observations this doesnt work with all browsers - you will probably
want to ask about this in some group that is concerned with browsers
and HTML and stuff.

/j\
-- 
Jonathan Stowe <jns@gellyfish.com>



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

Date: Wed, 02 Jun 1999 10:38:27 GMT
From: sitaram@diac.com (Sitaram Chamarty)
Subject: Re: FAQ 4.16: Does Perl have a year 2000 problem? Is Perl Y2K compliant?
Message-Id: <slrn7l7vo3.474.sitaram@diac.com>

On Sat, 29 May 1999 20:21:49 GMT, finsol@ts.co.nz <finsol@ts.co.nz> wrote:

>  sitaram@diac.com (Sitaram Chamarty) wrote:

>> You may have used it for "expedience" to start with - although I
>> doubt that.  But you cannot hide behind that word now, after
>> arguing vociferously with everyone here that it *is* indeed a
>> language.  A full paragraph is not "expedient" in any way.

>In the same section of my article I also included CICS, MVS and
>Javascript - all of which could be disputed as being a programming
>language. For the purposes of the article, in which I tried to avoid as

"dispute"?  What "dispute"?  The first 2 are not, the third is
(whether good or bad).  I dont see the dispute here.

>much jargon as possible, it was convenient to describe them as

If you want to "avoid jargon", dont post to a techie group.  As
someone else said, your audience is obviously PHBs.  I doubt if
there's even one PHB on this newsgroup, so go away.

You're even worse than the (Mocrosoft) moron who decided to
appropriate the term "dns" to mean some vapourware that M$ came up
with.  He at least had the brains to keep his advertising to
magazines like Time and Newsweek.  In other words, he knew where
his target audience could be found.  You obviously don't.

Since you refuse to learn from the hundreds of comments you have
got so far...

    *PLONK*

(I hope you know what that particular piece of jargon means!)


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

Date: Wed, 2 Jun 1999 12:48:18 +0200
From: "Bastiaan S van den Berg" <office@asc.nl>
Subject: feel like i'm going crazy...
Message-Id: <7j3286$lpg$1@zonnetje.NL.net>

ok ok

i've tried everything now , but i REALLY can't get this freakin' program to
work..


the form it processes is located over @
http://www.asc.nl/bedrijf/contact.html

check it out , and plz give me your thoughts , suggestions , flames &
general comments asap! :)

cul8r
buZz

Internet Specialist
Account Software Consultancy



-[= SNIP =]-


#!/usr/bin/perl

$sendmail = "/usr/lib/sendmail -f office\@asc.nl";

sub cgiparse {
    local ($data) = @_;
    if ( defined $data ) {
    }
    elsif ( $ENV{'REQUEST_METHOD'} eq 'POST' ) {
        local ($len) = $ENV{'CONTENT_LENGTH'};
        if ( read (STDIN, $data, $len) != $len ) {
            die ("Error reading 'POST' data\n");
        }
    }
    else {
        $data = $ENV{'QUERY_STRING'};
    }
    local (%qs) = ();
    foreach $qs ( split ('&', $data) ) {
        local ($name, $val) = split ('=', $qs);
        $name = &url_decode ($name);
        if ( defined $qs{$name} ) {
            $qs{$name} .= "\0" . &url_decode ($val);
        }
        else {
            $qs{$name} = &url_decode ($val);
        }
    }
    %qs;
}

sub url_decode {
    local ($s) = @_;
    $s =~ tr/+/ /;
    $s =~ s/%([0-9A-F][0-9A-F])/pack("C",oct("0x$1"))/ge;
    $s;
}

sub url_encode {
    local ($s) = @_;
    $s =~ s|([+<>%"/?=&])|sprintf("%%%02X",ord($1))|ge;
    $s =~ tr/ /+/;
    $s;
}

%forms=&cgiparse();

open (MAIL, "|$sendmail -t > /dev/null 2>&1") ||
        die ("Content-Type: text/html \n\n<html><head>Error opening pipe to
$sendMAIL: $!\n</body></html>\n");
print MAIL ("To: office\@asc.nl , $email \n",
            "Subject: [Site] Contactformulier. \n");
print MAIL"\n\n";
if ($forms{"bedrijf"} ne "") {print MAIL "Bedrijf : $forms{"bedrijf"}\n";}
if ($forms{"contact"} ne "") {print MAIL "Contactpersoon :
$forms{"contact"}\n";}
if ($forms{"geslacht"} ne "") {print MAIL "Geslacht Contactpersoon :
$forms{"geslacht"}\n";}
if ($forms{"straat"} ne "") {print MAIL "Straat : $forms{"straat"}\n";}
if ($forms{"postcode"} ne "") {print MAIL "Postcode :
$forms{"postcode"}\n";}
if ($forms{"plaats"} ne "") {print MAIL "Plaats : $forms{"plaats"}\n";}
if ($forms{"client_email"} ne "") {print MAIL "Email :
$forms{"client_email"}\n";}
if ($forms{"tel_nummer"} ne "") {print MAIL "Telefoon nummer :
$forms{"tel_nummer"}\n";}
if ($forms{"belme"} ne "") {print MAIL "Ik wil gebeld worden voor een
afspraak\n";}
print MAIL"\n\n";

if ($forms{"av_info"} ne "") {print MAIL "Ik wil informatie over
AccountView\n";}
if ($forms{"ap_info"} ne "") {print MAIL "Ik wil informatie over Account
Plus\n";}
if ($forms{"mw_info"} ne "") {print MAIL "Ik wil informatie over
maatwerk\n";}
if ($forms{"overstap"} ne "") {print MAIL "Ik wil informatie over de
overstap van AV Lite naar AV Prof.\n";}
if ($forms{"website"} ne "") {print MAIL "Ik wil informatie over een eigen
website\n";}
if ($forms{"cursus"} ne "") {print MAIL "Ik wil informatie over
cursussen\n";}
print MAIL"\n\n";

if ($forms{"prijslijst_av"} ne "") {print MAIL "Ik wil een prijslijst van
AccountView\n";}
if ($forms{"prijslijst_ap"} ne "") {print MAIL "Ik wil een prijslijst van
Account Plus\n";}
if ($forms{"prijslijst_dell"} ne "") {print MAIL "Ik wil een prijslijst van
Dell\n";}
if ($forms{"prijslijst_hp"} ne "") {print MAIL "Ik wil een prijslijst van
Hewlett Packard\n";}
if ($forms{"prijslijst_fp"} ne "") {print MAIL "Ik wil een prijslijst van
F-Prot\n";}

print MAIL"\n\n";

if ($forms{"comments"} ne "") {print MAIL"Verder commentaar
:\n$forms{"comments"}\n";}
print MAIL"\n\n";

print MAIL "mvg. Uw website.\n";

close(MAIL);
open (EIND,"dank.htm");
print "Content-type:text/html\n\n";
while ($regel=<EIND>) {print "$regel\n";}
close(EIND);







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

Date: 2 Jun 1999 12:29:49 +0100
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: feel like i'm going crazy...
Message-Id: <375515ad@newsread3.dircon.co.uk>

Bastiaan S van den Berg <office@asc.nl> wrote:
> ok ok
> 
> i've tried everything now , but i REALLY can't get this freakin' program to
> work..
> 
> 
> the form it processes is located over @
> http://www.asc.nl/bedrijf/contact.html
> 

It gives an 'Internal Server Error' - what message do you get in the log ?

You should also read perlfaq9 particularly the first two items.

I think you'd probably have a better start in life if you use CGI.pm.

/J\
-- 
Jonathan Stowe <jns@gellyfish.com>



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

Date: Wed, 2 Jun 1999 14:03:40 +0200
From: "Bastiaan S van den Berg" <office@asc.nl>
Subject: Re: feel like i'm going crazy...
Message-Id: <7j36le$pcs$1@zonnetje.NL.net>

YEAH!!!

i've found the error

appereantly , you can't include $forms{"name"} within a print string
so now , i first dump all the $forms{"stuff"} into $stuff and then use those
later while checking and mailing

now it processes it peacefully , but i don't seem to receive email from it?


Bastiaan S van den Berg heeft geschreven in bericht
<7j3286$lpg$1@zonnetje.NL.net>...
>ok ok
>
>i've tried everything now , but i REALLY can't get this freakin' program to
>work..
>
>
>the form it processes is located over @
>http://www.asc.nl/bedrijf/contact.html
>
>check it out , and plz give me your thoughts , suggestions , flames &
>general comments asap! :)
>
>cul8r
>buZz
>
>Internet Specialist
>Account Software Consultancy







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

Date: Wed, 2 Jun 1999 14:24:55 +0200
From: "Vincent Vanbiervliet" <vincent_vanbiervliet@be.ibm.com>
Subject: Re: feel like i'm going crazy...
Message-Id: <3755131e@news.uk.ibm.net>

So what's the problem?
I just tried it, and it works, except for logo.gif that couldn't be found on
the root of your server.


Vincent




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

Date: Wed, 2 Jun 1999 14:18:56 +0200
From: "Bastiaan S van den Berg" <office@asc.nl>
Subject: Re: feel like i'm going crazy...
Message-Id: <7j37i3$q75$1@zonnetje.NL.net>

it doesn't get mailed!

Vincent Vanbiervliet heeft geschreven in bericht
<3755131e@news.uk.ibm.net>...
>So what's the problem?
>I just tried it, and it works, except for logo.gif that couldn't be found
on
>the root of your server.
>
>
>Vincent
>
>




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

Date: Wed, 2 Jun 1999 14:18:56 +0200
From: "Bastiaan S van den Berg" <office@asc.nl>
Subject: Re: feel like i'm going crazy...
Message-Id: <7j37ih$q7d$1@zonnetje.NL.net>

it doesn't get mailed!

Vincent Vanbiervliet heeft geschreven in bericht
<3755131e@news.uk.ibm.net>...
>So what's the problem?
>I just tried it, and it works, except for logo.gif that couldn't be found
on
>the root of your server.
>
>
>Vincent
>
>




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

Date: Wed, 2 Jun 1999 14:22:37 +0200
From: "Bastiaan S van den Berg" <office@asc.nl>
Subject: Re: feel like i'm going crazy...
Message-Id: <7j37ov$qcr$1@zonnetje.NL.net>

guess what ..

 i've just dailed my ISP , and they won't allow me access to the server
logs!!!!

Jonathan Stowe heeft geschreven in bericht
<375515ad@newsread3.dircon.co.uk>...
>Bastiaan S van den Berg <office@asc.nl> wrote:
>> ok ok
>>
>> i've tried everything now , but i REALLY can't get this freakin' program
to
>> work..
>>
>>
>> the form it processes is located over @
>> http://www.asc.nl/bedrijf/contact.html
>>
>
>It gives an 'Internal Server Error' - what message do you get in the log ?
>
>You should also read perlfaq9 particularly the first two items.
>
>I think you'd probably have a better start in life if you use CGI.pm.
>
>/J\
>--
>Jonathan Stowe <jns@gellyfish.com>
>




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

Date: Wed, 02 Jun 1999 08:01:21 -0400
From: digital kensai <kensai@nortel.com>
Subject: Re: Is split (surprisingly, amazingly) slow?
Message-Id: <37551D11.3F10EB10@nortel.com>

Jonathan wrote:

> Possibly the author of the original post didn't post here because he's
> allergic to smugness and ego masking as competence?
> Why on earth would I have typed when I could cut and paste? I don't say the
> code's correct, but it's certainly the code that I downloaded.
>
> Jonathan (assumed that Tad believes he can read minds from emails.)

I ran some tests and got about a 14 second (versus 26 second) run-time,
allbeit on a cheesy test -- using unpack instead of split:

### using split
#!/usr/bin/perl

    my $count = 0;
    my @v;
    while (<STDIN>) {
        @v = split(/\|/);
        $count++;
    }
    print "$count\n";

$ perl -e 'for(0..1000000){print "12)23456)214g sdg ewetwet) seyte ea5) SWTE(
erY)\n"}' | time ./count.pl

1000001
25.95user 0.25system 0:31.91elapsed 82%CPU (0avgtext+0avgdata 0maxresident)k

### using unpack
#!/usr/bin/perl

    my $count = 0;
    my @v;
    while (<STDIN>) {
        @v = unpack(/\|/, $_);
        $count++;
    }
    print "$count\n";

$ perl -e 'for(0..1000000){print "12)23456)214g sdg ewetwet) seyte ea5) SWTE(
erY)\n"}' | time ./count.pl

1000001
14.33user 0.18system 0:19.86elapsed 73%CPU (0avgtext+0avgdata 0maxresident)k



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

Date: Wed, 2 Jun 1999 14:27:40 +0200
From: "Jan van Rensburg" <jan.van.rensburg@epiuse.com>
Subject: Loading modules at run time
Message-Id: <7j37sh$cn6$1@hermes.is.co.za>

hi,
this is a follow up of my own post  dated 1999/06/01.
i've tried the AutoLoader/AuotSplit modules, but it doesn't look like it's
going to solve my problem.

so the question is:
is there any way to load modules at run time? if my program reads what
modules it needs from a file can i then use them in my program? the problem
is that i can do a "use ModuleName" if ModuleName is a variable read in from
a config file. in other words, i can't seem to do a forward declaration.

the only other option i can think of is to use seperate perl scripts instead
of modules, but i really wanted to make this a threaded program (no seperate
processes).

thanks,
jan van rensburg




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

Date: Wed, 2 Jun 1999 11:32:40 GMT
From: Vaclav Kulakovsky <kulak@hulmak.cz>
Subject: Net::FTP & timeout - problem
Message-Id: <37551657.E8EA74BA@hulmak.cz>

hi all,

i'm using Net::FTP module. And i have problem with timeout
when I downloading file and timeout elapsed, program is terminated
and control is not returned to my program. 

Can somebody help ?

thanks Vaq

    $ftp = Net::FTP->new("some.host.name");
    $ftp->login("anonymous","me@here.there");
    $ftp->cwd("/pub");
    $ftp->get("that.file");
<-timeout = exit ????
    $ftp->quit;


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

Date: Wed, 02 Jun 1999 10:38:31 GMT
From: sitaram@diac.com (Sitaram Chamarty)
Subject: Re: Network programming tutoriall?
Message-Id: <slrn7l8eqc.4d5.sitaram@diac.com>

On Sat, 29 May 1999 05:41:20 -0500, Doug O'Leary <dkoleary@mediaone.net> wrote:

>Is there a tutorial or something similar that covers the basics of 
>network programming - something on the order of the Learning Perl book?  
>What variables need to be set, what functions to call, when, etc, etc?  

IIRC the panther book (Advanced Perl Programming) has a chapter or
two on the subject.  Dont recall how detailed or low/high level it
is.  Book is at home so I cant check right now.

Check it out...


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

Date: 2 Jun 1999 11:34:05 +0100
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: Newbie - what do I need to run Perl scripts on our webserver......
Message-Id: <3755089d@newsread3.dircon.co.uk>

Steve B <steve.bright@capgemini.co.uk> wrote:
> Sorry about this....
> 
> I need to run a couple of simple perl scripts on our server....what I don't
> know is how to go about it..
> 
> do I need to install any software on our server before they will run ???
> 
> and if so where can I get it from ????
> 

Would have been helpful if you told us what type of server but 
nevermind - check out <http://www.perl.com>

/J\
-- 
Jonathan Stowe <jns@gellyfish.com>



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

Date: Wed, 2 Jun 1999 14:15:12 +0200
From: "Bastiaan S van den Berg" <office@asc.nl>
Subject: Re: Newbie - what do I need to run Perl scripts on our webserver......
Message-Id: <7j37b3$q1s$1@zonnetje.NL.net>

if your (linux)server uses apache as a webserver , chances are that perl is
allready installed..

Steve B heeft geschreven in bericht <7j2ug2$rsf$1@taliesin.netcom.net.uk>...
>Sorry about this....
>
>I need to run a couple of simple perl scripts on our server....what I don't
>know is how to go about it..
>
>do I need to install any software on our server before they will run ???
>
>and if so where can I get it from ????
>
>--
>Cheers
>
>Steve Bright
>
>steve.bright@capgemini.co.uk
>
>
>




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

Date: Wed, 02 Jun 1999 13:55:57 +0200
From: Walter Pleyer <pleyer@kraftwerk.co.at>
Subject: perl can't find GD Module
Message-Id: <37551BCD.D8E5FEFD@kraftwerk.co.at>

Hi folks!

I hope someone can help me with my following problem:
I downloaded Dave Roth' GD module for Win32  from CPAN, but I can't
install it properly. I've dumped all the files in  the correct
directories
according to the README-file, but when I try to run the testscript
TEST.PL I  keep getting the same message:

Can't locate loadable object for module GD in @INC (@INC contains:
C:\PERL\lib C
:\PERL\site\lib .) at test.pl line 1
BEGIN failed--compilation aborted at test.pl line 1.

What's wrong and how can I fix it?
(I'm using the ActiveState perl for Win32).

Thanks
Walter




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

Date: Wed, 2 Jun 1999 14:55:38 +0200
From: "Bastiaan S van den Berg" <office@asc.nl>
Subject: Re: perl can't find GD Module
Message-Id: <7j39nc$rpl$1@zonnetje.NL.net>

read the first line in test.pl
according to your error , you're including a file there that isn't locate in
the directories mentioned in @INC

you could do 2 things from there

1) copy the file to one of the 2 default dirs in (c:\perl\lib & that other
one)

or

2) add the directory where your file is located to @INC
    push(@INC,"c:\meuh\");

cul8r
buZz

Walter Pleyer heeft geschreven in bericht
<37551BCD.D8E5FEFD@kraftwerk.co.at>...
>Hi folks!
>
>I hope someone can help me with my following problem:
>I downloaded Dave Roth' GD module for Win32  from CPAN, but I can't
>install it properly. I've dumped all the files in  the correct
>directories
>according to the README-file, but when I try to run the testscript
>TEST.PL I  keep getting the same message:
>
>Can't locate loadable object for module GD in @INC (@INC contains:
>C:\PERL\lib C
>:\PERL\site\lib .) at test.pl line 1
>BEGIN failed--compilation aborted at test.pl line 1.
>
>What's wrong and how can I fix it?
>(I'm using the ActiveState perl for Win32).
>
>Thanks
>Walter
>
>




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

Date: 2 Jun 1999 12:07:43 GMT
From: mjtg@cus.cam.ac.uk (M.J.T. Guy)
Subject: Re: perldebug: visibility of local (private) variables
Message-Id: <7j36qf$7kl$1@pegasus.csx.cam.ac.uk>

Thomas_Wilde  <thomas.wilde@hl.siemens.de> wrote:
>I want to observe some local variables defined with my() in a
>subroutine. The first lines look as follows:
>
>sub find_subjects {
>    my ($filename,
>	%hash_of_boundaries,
>	$boundary,
>	@subject_array);
>
>    $filename = shift;
>   
>At this point I'd expect that $filename has a value that I can access
>with the debugger command: 

  DB<2> x $filename
0  '/abc/def'
  DB<3> p $filename
/abc/def
  DB<4> 


Mike Guy


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

Date: Wed, 02 Jun 1999 11:42:28 GMT
From: john@melon17.freeserve.co.uk (john)
Subject: Problem with SQL statement in DBI
Message-Id: <375517af.918591@news.freeserve.net>

Could anyone suggest why
the following statement does
not work via DBI?


$c = $dbh->prepare("SELECT * INTO OUTFILE $afile FROM $table");

(works fine via Mysql command line).

John


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

Date: Wed, 02 Jun 1999 07:38:36 -0400
From: digital kensai <kensai@nortel.com>
Subject: Re: quotewords bug?  what the hell?
Message-Id: <375517BC.C66EE8A9@nortel.com>

Ken Williams wrote:

> I'm using perl version 5.005_02 built for i586-linux-thread
>
> The following works fine.
>
> use Text::ParseWords;
> $list = "test1:test2:test3:test4";
> @alist = quotewords(":", 0, $list);
> print "@alist";
>
> The output is like "test1 test2 test3 test4".  Thats fine.
>
> use Text::ParseWords;
> $list = "test1\r\ntest2\r\ntest3\r\ntest4";
> @alist = quotewords("\r\n", 0, $list);
> print "@alist";
>
> The output is absolutely nothing.  It worked fine under perl 5.004 on my older
> slackware machine.  But now I get no output at all...
>
> Perl wizards - why?

You are trying to match the characters "\" + "r" + "\" + "n", using the
characters "\r" + "\n".  Use @alist = quotewords("\\r\\n",0,$list)  -- my guess
is quotewords has changed, between then and now... (perl wizards - why?)



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

Date: Wed, 02 Jun 1999 10:38:32 GMT
From: sitaram@diac.com (Sitaram Chamarty)
Subject: Re: Salvaging CPAN installs after Perl upgrade?
Message-Id: <slrn7l8fhg.4d5.sitaram@diac.com>

On 30 May 1999 16:54:26 +0000, Lloyd Zusman <ljz@asfast.com> wrote:

>Before any of tell me to write some Perl code to traverse through my
>current CPAN files and then issue the proper commands to do all the
>necessary builds, please know that I'm quite able to do this, and also
>quite willing as a last resort.  Before I do this, however, I'm
>wondering if an automated or semi-automated procedure for this already
>exists.

I'd start with "perldoc perllocal".  A very small amount of
parsing of "/usr/lib/perl5/i386-linux/5.00404/perllocal.pod"
(could be elsewhere on your system) would give you the names of
all the modules you installed, if you installed them the "proper"
way.

Then something like:
    perl -MCPAN -e 'install mod::ule'
for each of them should do it for you!

Be sure to re-check perldoc perllocal again to make sure
everything went in OK if you leave it unattended...

This is what *I* would do - which doesnt mean there isnt a better
way somewhere else ;-)


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

Date: Wed, 02 Jun 1999 10:38:37 GMT
From: sitaram@diac.com (Sitaram Chamarty)
Subject: Re: Text::Query::Advanced - I need a simple example :)
Message-Id: <slrn7l9e36.4s4.sitaram@diac.com>

On 30 May 1999 22:56:29 GMT, Fabien Penso <penso@linuxfr.org> wrote:

>I am making a search engine for a local server, then to handle boolean
>I found Text::Query::Advanced on deja.com but now I would need a very
>simple example because I must say I don't get how it works.

Here's a really simple one.  And thanks for bringing this module
to my notice - didnt know it existed!

#!/usr/bin/perl -w

# to find all "paragraphs" in Tk PODs which contain the word
# "closure" near the# word "command"...

use lib '/home/sitaram';  # thats where I installed it...

use Text::Query::Advanced;

chdir '/perl/lib/site_perl/5.005/i586-linux/Tk';

$/="";  # paragraph mode

$q = Text::Query::Advanced->new('closure near command');
die "bad q e" unless defined $q;

@ARGV=glob('*pod');
while (<>)
{
    print "$ARGV:\n$_"
        if $q->match;
}
__END__

>So if someone could send me that by mail, would be cool :)

Sorry - I believe in NINO as much as in GIGO (newspost in,
newspost out!)


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

Date: 2 Jun 1999 12:40:05 +0100
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: Time Error
Message-Id: <37551815@newsread3.dircon.co.uk>

Frank de Bot <debot@xs4all.nl> wrote:
> I've some little trouble with the time. Today it's 1 june . But my
> script thinks it's 2 june. It has the same problem with other dates at
> the start of each month. Here's the script I use. If you have a better
> one, I would love to hear from it.
> 
>  ($sec,$min,$hour,$mday,$mon,$year,$wday) =
> (gmtime(time))[0,1,2,3,4,5,6];
>  @months = ('January','February','March','April','May','June',
>    'July','August','September','October','November','December');
>  @days =
> ('Sunday','Monday','Tuesday','Wednesday','Thursday','Friday','Saturdat');
> 
>    if ($sec < 10)  { $sec = "0$sec"; }
>    if ($min < 10)  { $min = "0$min"; }
>    if ($hour < 10)  { $hour = "0$hour"; }
>    if ($mday <10) { $mday = "0$wday"; }
                               ^^^^^^
>    if ($mon <10) { $mon = "0$mon"; }
> 
> 

Ah a typo mutation on the code from wwwboard.pl - I really dont want to
see what happens to the year ...

As well as using sprintf to zero pad the numbers - I dont really say
much point in doing that to $mon as that is almost certainly not what
you are expecting.

/J\
-- 
Jonathan Stowe <jns@gellyfish.com>



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

Date: Wed, 2 Jun 1999 15:03:06 -0700
From: "Alex" <axc@iname.com>
Subject: Re: Time Error
Message-Id: <7j36kl$t2e$1@news.kolumbus.fi>

Probably beacause you are using gmtime.
Use Localtime instead.

Alex.

Frank de Bot <debot@xs4all.nl> wrote in message
news:37541961.81458F7A@xs4all.nl...
> I've some little trouble with the time. Today it's 1 june . But my
> script thinks it's 2 june. It has the same problem with other dates at
> the start of each month. Here's the script I use. If you have a better
> one, I would love to hear from it.
>
>  ($sec,$min,$hour,$mday,$mon,$year,$wday) =
> (gmtime(time))[0,1,2,3,4,5,6];
>  @months = ('January','February','March','April','May','June',
>    'July','August','September','October','November','December');
>  @days =
> ('Sunday','Monday','Tuesday','Wednesday','Thursday','Friday','Saturdat');
>
>    if ($sec < 10)  { $sec = "0$sec"; }
>    if ($min < 10)  { $min = "0$min"; }
>    if ($hour < 10)  { $hour = "0$hour"; }
>    if ($mday <10) { $mday = "0$wday"; }
>    if ($mon <10) { $mon = "0$mon"; }
>
>
>
>
> --
>                           \\\|///
>                         \\  - -  //
>                          (  @ @  )
> /----------------------oOOo-(_)-oOOo--------------------\
> |                                                       |
> |                                                       |
> | My Email:  debot@xs4all.nl                            |
> | Homepages: http://www.debot.nl/ppi/                   |
> |            http://www.searchy.net/                    |
> |                                                       |
> \-------------------------------Oooo--------------------/
>                         oooO    (   )
>                        (   )    ) /
>                        \ (     (_/
>                         \_)
>
>




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

Date: 12 Dec 98 21:33:47 GMT (Last modified)
From: Perl-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin) 
Subject: Special: Digest Administrivia (Last modified: 12 Dec 98)
Message-Id: <null>


Administrivia:

Well, after 6 months, here's the answer to the quiz: what do we do about
comp.lang.perl.moderated. Answer: nothing. 

]From: Russ Allbery <rra@stanford.edu>
]Date: 21 Sep 1998 19:53:43 -0700
]Subject: comp.lang.perl.moderated available via e-mail
]
]It is possible to subscribe to comp.lang.perl.moderated as a mailing list.
]To do so, send mail to majordomo@eyrie.org with "subscribe clpm" in the
]body.  Majordomo will then send you instructions on how to confirm your
]subscription.  This is provided as a general service for those people who
]cannot receive the newsgroup for whatever reason or who just prefer to
]receive messages via e-mail.

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.  

To submit articles to comp.lang.perl.misc (and this Digest), send your
article to perl-users@ruby.oce.orst.edu.

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.

The Meta-FAQ, an article containing information about the FAQ, is
available by requesting "send perl-users meta-faq". The real FAQ, as it
appeared last in the newsgroup, can be retrieved with the request "send
perl-users FAQ". Due to their sizes, neither the Meta-FAQ nor the FAQ
are included in the digest.

The "mini-FAQ", which is an updated version of the Meta-FAQ, is
available by requesting "send perl-users mini-faq". It appears twice
weekly in the group, but is not distributed in the digest.

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 V8 Issue 5858
**************************************

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