[14012] in Perl-Users-Digest
Perl-Users Digest, Issue: 1422 Volume: 9
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Thu Nov 18 18:31:22 1999
Date: Thu, 18 Nov 1999 15:31:03 -0800 (PST)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Message-Id: <942967862-v9-i1422@ruby.oce.orst.edu>
Content-Type: text
Perl-Users Digest Thu, 18 Nov 1999 Volume: 9 Number: 1422
Today's topics:
Re: looking for a developer . . . <lr@hpl.hp.com>
Looking for free provider with LWP <rsodre@hotmail.com>
Re: Looking for free provider with LWP <gellyfish@gellyfish.com>
Mail package <michel.morin@ouest-france.fr>
Re: Mail package <gellyfish@gellyfish.com>
MD5 encryption <gehring.u@zdf.de>
Re: MD5 encryption <rootbeer@redcat.com>
Re: Netscape messenger or other mail client accessable, <ter@my-deja.com>
Re: No Fork in NT Perl and Print to socket hdesa22@my-deja.com
Re: NT and network drives <carvdawg@patriot.net>
Re: NT and Pipe <samay1NOsaSPAM@hotmail.com.invalid>
Re: OO woes (David Cantrell)
Oracle via the web <cpcollin@wam.umd.edu>
Re: Oracle via the web <gellyfish@gellyfish.com>
Re: Oracle via the web <cpcollin@wam.umd.edu>
Re: pb : `useradd $user` in a CGI form <james_peregrino@harvard.edu>
Perl programming sytle <j.mohr@gisma.de>
Re: Perl programming sytle (Brett W. McCoy)
Re: Perl programming sytle <gellyfish@gellyfish.com>
Re: Perl programming sytle (Simon Cozens)
Re: perl stumper (Csaba Raduly)
Please advise on URL robot checking PERL modules <bob@atena.rome.ibm.com>
Re: Please advise on URL robot checking PERL modules (Kragen Sitaker)
Re: Please advise on URL robot checking PERL modules <bob@atena.rome.ibm.com>
Re: Please advise on URL robot checking PERL modules (Randal L. Schwartz)
Re: Please advise on URL robot checking PERL modules <moseley@best.com>
Re: Please help me create a file with perl <durbin@cig.mot.com>
Re: Please help me create a file with perl <lr@hpl.hp.com>
Digest Administrivia (Last modified: 16 Sep 99) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Thu, 18 Nov 1999 12:59:23 -0800
From: Larry Rosler <lr@hpl.hp.com>
Subject: Re: looking for a developer . . .
Message-Id: <MPG.129e0886d061cb0d98a22f@nntp.hpl.hp.com>
In article <811g8v$i8k$1@nnrp03.primenet.com> on Thu, 18 Nov 1999
13:26:34 -0500, Steve Protopapas <steve@corp.airmedia.com> says...
>
> Larry Rosler <lr@hpl.hp.com> wrote in message
> news:MPG.129ce983d4598c2898a228@nntp.hpl.hp.com...
> > In article <383339F5.2B196F92@bellsouth.net> on Wed, 17 Nov 1999
> > 17:27:50 -0600, Mark Russell <russellm@bellsouth.net> says...
> > >
> > > > Coprophagous mutant.
> > >
> > > Coprophagous?
> >
> > Greek 'koprophagos', from kopr- + -phagos] : adj., feeding on dung
>
> Don't forget "myso-" too.
[Further O-T] I'm guessing that the adjective form would be
mysopineous, imbibing urine -- not in my dictionaries! I'm also
guessing that your Greek is better than mine. :-)
--
(Just Another Larry) Rosler
Hewlett-Packard Laboratories
http://www.hpl.hp.com/personal/Larry_Rosler/
lr@hpl.hp.com
------------------------------
Date: Thu, 18 Nov 1999 14:47:10 GMT
From: Rogerio Sodre <rsodre@hotmail.com>
Subject: Looking for free provider with LWP
Message-Id: <8113hc$pte$1@nnrp1.deja.com>
Do anyone knows any free web provider that supports Perl cgi and has the
LWP module available?
Rogerio
--
Wanna buy/trade comics? http://rsodre.virtualave.net/comics/comics.html
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
Date: 18 Nov 1999 15:06:39 GMT
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: Looking for free provider with LWP
Message-Id: <383415ff_1@newsread3.dircon.co.uk>
Rogerio Sodre <rsodre@hotmail.com> wrote:
> Do anyone knows any free web provider that supports Perl cgi and has the
> LWP module available?
>
Maybe you meant to look at :
<http://dmoz.org/Computers/Internet/Commercial_Services/Web_Hosting/Free_Webspace/>
/J\
--
"You look lovely this evening. Have you decreased in mass?" - Alien,
The Simpsons
------------------------------
Date: Thu, 18 Nov 1999 14:17:35 +0100
From: "Michel Morin" <michel.morin@ouest-france.fr>
Subject: Mail package
Message-Id: <810u95$rb4$1@gaia.eurobretagne.fr>
Hi,
Is there a package for NT to send mail with enclosed files ?
TIA
Michel
------------------------------
Date: 18 Nov 1999 13:40:55 GMT
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: Mail package
Message-Id: <383401e7_1@newsread3.dircon.co.uk>
Michel Morin <michel.morin@ouest-france.fr> wrote:
>
> Is there a package for NT to send mail with enclosed files ?
>
Most people would suggest using the module MIME::Lite. You might also
see the section in the Win32 specific FAQ that comes with ActivePerl :
<file://c:/perl/html/Perl-Win32/perlwin32faq4.html#How_do_I_send_email_from_Perl_fo>
/J\
--
"Is there no demand for mechanical pussies?" - Mrs Slocombe
------------------------------
Date: Thu, 18 Nov 1999 15:24:37 +0100
From: "Uwe W. Gehring" <gehring.u@zdf.de>
Subject: MD5 encryption
Message-Id: <38340C25.48A5ABC9@zdf.de>
Hi,
I am running Apache on NT and build AuthFiles with htpasswd.exe which
uses MD5 encryption. How can I create the same strings using Perl?
Digest::MD5 does not create the same strings. I am using the ActiveState
Port of Perl 5, Build 522.
TIA
Uwe W. Gehring
ZDF.online
------------------------------
Date: Thu, 18 Nov 1999 09:11:36 -0800
From: Tom Phoenix <rootbeer@redcat.com>
Subject: Re: MD5 encryption
Message-Id: <Pine.GSO.4.10.9911180909590.16575-100000@user2.teleport.com>
On Thu, 18 Nov 1999, Uwe W. Gehring wrote:
> I am running Apache on NT and build AuthFiles with htpasswd.exe which
> uses MD5 encryption. How can I create the same strings using Perl?
Find out what formula or algorithm is being used, then use the same one.
> Digest::MD5 does not create the same strings.
Then you've got the wrong formula or algorithm. When you find the right
one, if you're not sure how to implement it in Perl, feel free to ask
here. Cheers!
--
Tom Phoenix Perl Training and Hacking Esperanto
Randal Schwartz Case: http://www.rahul.net/jeffrey/ovs/
------------------------------
Date: Thu, 18 Nov 1999 13:28:20 GMT
From: Tim Richardson <ter@my-deja.com>
Subject: Re: Netscape messenger or other mail client accessable, Win 32?
Message-Id: <810utg$maq$1@nnrp1.deja.com>
In article <3831E36C.1145AD62@mail.cor.epa.gov>,
> I believe you can find one by looking in the ActiveState
> archives of the Win32-Perl-Users mailing list.
>
> http://www.activestate.com/support/mailing_lists.htm
>
Thanks, I did find one.
... and Netscape's MAPI implementation does not allow moving mail
between folders :-(
... however, I also discovered that I can write mail filters for
Netscape in Javascript, and Netscape exposes a mail object that does
allow me to move mail around Netscape Messenger folders. If this also
lets me write mail, I should have the tools to do my job.
Thanks for the help,
Tim
--
Tim Richardson
(search string: qweeblebeast)
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
Date: Thu, 18 Nov 1999 16:49:31 GMT
From: hdesa22@my-deja.com
Subject: Re: No Fork in NT Perl and Print to socket
Message-Id: <811amp$vrg$1@nnrp1.deja.com>
This is exactly where I started. The line
> if (my($child) = fork) {
gives me a compile error.
Hilaire
In article <38335142$0$216@nntp1.ba.best.com>,
"Mark Ruedy" <mruedy@alidian.com> wrote:
> Since there is no fork() in my version of Perl, is there another way
to
> accomplish this:
>
> # Avoid deadlock by forking. - can't fork for any known windows
> implemetation
>
> if (my($child) = fork) {
> while(<STDIN>) {
> print S;
> }
> } else {
> while(<S>) {
> print;
> }
> }
>
> This code was lifted from "Programming Perl" - a sample script for
creating
> a two-way socket conversation.
>
> Thanks
>
> David Cassell <cassell@mail.cor.epa.gov> wrote in message
> news:3828C664.4C60E58C@mail.cor.epa.gov...
> > hdesa@bellsouth.net wrote:
> > >
> > > 1. Fork is not supported in the Perl verison that comes with the
NT
> > > Resource Kit. Is there another perl, that runs on NT, that has
Fork.
> >
> > Good news: yes;
> > Bad news: get ready to install Perl by yourself.
> >
> > You can install Perl using cygwin32 and egcs. This was covered
> > in an article in the Spring 1999 issue of The Perl Journal.
> > You'll get fork(), but everything will be noticeably slower.
> > after all, you're running on top of middleware now.
> >
> > Otherwise, wait until next year, when ActiveState's Perl will
> > come out with a functional emulation of fork() .
> >
> > Or you could install linux or FreeBSD on that box and have
> > fork() to play with...
> >
> > David
> > --
> > David Cassell, OAO cassell@mail.cor.epa.gov
> > Senior computing specialist
> > mathematical statistician
>
>
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
Date: Thu, 18 Nov 1999 06:04:48 -0500
From: wintermute <carvdawg@patriot.net>
Subject: Re: NT and network drives
Message-Id: <3833DD50.4017C017@patriot.net>
You can use the Win32::Lanman module to connect to the share, and issue
your commands. However, the problem may be with the permissions
associated
with the LocalSystem account.
Jean-Claude Chetrit wrote:
> Hi,
>
> I have to run a perl script each day at 6
> a.m.on an NT
> machine, so I thought I would use the NT
> scheduler or
> the Norton scheduler.
>
> Now the script works fine from a DOS prompt,
> i.e. it sees the network drive P:.
>
> But whenever I run the script from the
> scheduler,
> and even though I first reconnect to the P:
> drive and can
> issue successfully
> DIR P: > C:\DIRP.TXT
> the perl script does not see the P: drive!!!
>
> I can be reached from 9 a.m. to 4:30 pm. at
> 212-638-0599, or by e-mail, of course. Thanks
>
> --
> Jean-Claude Chetrit OPENetwork, Inc.
> 215 Berkeley Place Voice:
> 718-398-3838
> Brooklyn, NY 11217 Fax:
> 718-638-2240
> Home: 718-638-2266 e-mail:
> jc@OPENetwork.com
> URL: http://home.dti.net/open/
> ____ ___ _____ __
> __ __
> / __ \/ _ \/ __/ |/ /__ / /__ _____
> ____/ /__
> / /_/ / ___/ _// / -_) __/ |/|/ / _ \/
> __/ '_/
> \____/_/ /___/_/|_/\__/\__/|__,__/\___/_/
> /_/\_\
>
> Power Tools for Power Users
------------------------------
Date: Thu, 18 Nov 1999 13:25:51 -0800
From: Samay <samay1NOsaSPAM@hotmail.com.invalid>
Subject: Re: NT and Pipe
Message-Id: <0a0133f8.694fce8a@usw-ex0102-016.remarq.com>
I tried Win32-Pipe, it doesn't work as per my requirement.
I created client and server programs.
My client program passes the data faster than server can process it.
Unfortunately, it doesn't wait in queue to long.
Any other appropriate solution?
Thanks
Samay..
* Sent from RemarQ http://www.remarq.com The Internet's Discussion Network *
The fastest and easiest way to search and participate in Usenet - Free!
------------------------------
Date: Thu, 18 Nov 1999 10:38:35 GMT
From: NukeEmUp@ThePentagon.com (David Cantrell)
Subject: Re: OO woes
Message-Id: <3836d714.59403567@10.0.0.155>
On 17 Nov 1999 22:57:32 -0000, Jonathan Stowe
<gellyfish@gellyfish.com> said:
>You're one sick puppy Cantrell ;-}
Yeah well you knew that already.
--
David Cantrell, part-time Unix/perl/SQL/java techie
full-time chef/musician/homebrewer
http://www.ThePentagon.com/NukeEmUp
------------------------------
Date: Thu, 18 Nov 1999 10:40:06 -0500
From: "Chris Collins" <cpcollin@wam.umd.edu>
Subject: Oracle via the web
Message-Id: <8116m6$nq7$1@hecate.umd.edu>
I am a perl novice and I have a question regarding connecting to Oracle via
the web (in perl).
This script works fine when I run it in the shell, but when I run it via the
web, it never gets past connecting to Oracle. Are there any other env
variables I need to set? I don't get any error messages, things work fine
up until it tries to connect when it just seems to stop. If anyone knows
what my problem is, please contact me at cpcollin@wam.umd.edu
Thanks,
Chris
#!/usr/bin/perl
use DBI;
use Env;
use Env qw(WWW_myquery);
use Exporter();
@ISA=qw(Exporter);
@EXPORT=qw($ORACLE_HOME $ORACLE_SID);
BEGIN {
$ORACLE_HOME="/path......";
$ORACLE_SID="oracle sid";
}
$dbname = 'DBNAME';
$user = 'USERNAME';
$password = 'PASSWORD';
$dbd = 'Oracle';
print("content-type: text/html\n\n");
print("<head>\n");
print("<title>Fantasy Football testing</title></head>\n");
print("<body bgcolor=\"white\">");
print ("The query is $WWW_myquery<hr>");
$dbh = DBI->connect ($dbname, $user, $password, $dbd);
printf ("Connected to oracle<br>");
if (!$dbh) {
print "Error connecting to database; $DBI::errstr\n";
}
$cur = $dbh->prepare('select Fname, Lname from Kicker');
$cur->execute();
die "Prepare error: $DBI::errstr" if $DBI::err;
while (($Fname, $Lname) = $cur->fetchrow) {
print "First Name: $Fname, Last Name: $Lname <br>";
}
$cur->finish();
print("</body></html>");
------------------------------
Date: 18 Nov 1999 15:54:05 GMT
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: Oracle via the web
Message-Id: <3834211d_1@newsread3.dircon.co.uk>
Chris Collins <cpcollin@wam.umd.edu> wrote:
> I am a perl novice and I have a question regarding connecting to Oracle via
> the web (in perl).
>
> This script works fine when I run it in the shell, but when I run it via the
> web, it never gets past connecting to Oracle. Are there any other env
> variables I need to set? I don't get any error messages, things work fine
> up until it tries to connect when it just seems to stop. If anyone knows
> what my problem is, please contact me at cpcollin@wam.umd.edu
Havent I just answered this - check out %ENV in the perlvar manpage
/J\
--
"You look lovely this evening. Have you decreased in mass?" - Alien,
The Simpsons
------------------------------
Date: Thu, 18 Nov 1999 12:49:47 -0500
From: "Chris Collins" <cpcollin@wam.umd.edu>
Subject: Re: Oracle via the web
Message-Id: <811e9i$n5a$1@hecate.umd.edu>
I apologize for posting this twice, I posted the previous one last night and
it didn't look like it went through, I was having network problems.
Anyway, I looked into the ENV hash and I set my ORACLE_HOME and ORACLE_SID
vars there. I'm still having the same problem. I'm not sure if that is
even my problem. I don't get any error messages, but it won't get past the
connecting step. Is there something I'm missing?
should I be using something other than straight DBI?
Chris
cpcollin@wam.umd.edu
http://marlowe.umd.edu:2110/index2.html
(this is the page with the problem)
Jonathan Stowe <gellyfish@gellyfish.com> wrote in message
news:3834211d_1@newsread3.dircon.co.uk...
> Chris Collins <cpcollin@wam.umd.edu> wrote:
> > I am a perl novice and I have a question regarding connecting to Oracle
via
> > the web (in perl).
> >
> > This script works fine when I run it in the shell, but when I run it via
the
> > web, it never gets past connecting to Oracle. Are there any other env
> > variables I need to set? I don't get any error messages, things work
fine
> > up until it tries to connect when it just seems to stop. If anyone
knows
> > what my problem is, please contact me at cpcollin@wam.umd.edu
>
> Havent I just answered this - check out %ENV in the perlvar manpage
>
> /J\
> --
> "You look lovely this evening. Have you decreased in mass?" - Alien,
> The Simpsons
------------------------------
Date: 18 Nov 1999 10:51:05 -0500
From: James Peregrino <james_peregrino@harvard.edu>
Subject: Re: pb : `useradd $user` in a CGI form
Message-Id: <x7ln7v23yu.fsf@bert.dce.harvard.edu>
Lucas Bigeardel <lucasb@cadrus.fr> writes:
> Hi,
>
> I try to perform a `useradd $user` in a CGI form.
>
> my `useradd $user` processing is too slow
> my CGI form processing is too fast
>
> So, what can I do to wait the end of `useradd $user` in order to avoid
> the premature end of my CGI form ?
This doesn't make sense. The CGI should wait until the `program`
completes.
Are you sure `useradd $user` isn't failing?
-James
--
James Peregrino
Harvard Div. Continuing Education
------------------------------
Date: Thu, 18 Nov 1999 16:42:44 +0100
From: James Mohr <j.mohr@gisma.de>
Subject: Perl programming sytle
Message-Id: <38341E74.D0CD9922@gisma.de>
Hi All!
I was recently "chastised" by someone for programming perl on WinNT
like I programm
C on UNIX. He insisted that I should programm more "perl-like" and many
of the constructs
he suggested as changes were definately not C-like, and were definately
harder to read. (IMO)
I figure that computers have reached the point where there is no need
for making "tighter" code.
Unless you are programming 3-D graphics and are really pushing the
limits of your 128MB RAM
and 500MHz machines, then spending time to make it run in 0.1 second as
compared to 0.5 second
is not worth the trouble. In addition, writing it C-like makes it easier
for non-Perl programmers to
understand it.
Now I know I am free to write my programs. However, I would like to hear
other people's thoughts
on perl programming style.
--
Regards,
jimmo
---------------------------------------
"Science has promised man power...But, as so often happens when
people are seduced by promises of power, the price is servitude
and impotence. Power is nothing if it is not the power to choose."
Joseph Weizenbaum of MIT said in reference to Computers.
---------------------------------------
The Great Linux-NT Debate: <http://www.jimmo.com/Debate/intro.html>
------------------------------
Date: Thu, 18 Nov 1999 20:59:44 GMT
From: bmccoy@foiservices.com (Brett W. McCoy)
Subject: Re: Perl programming sytle
Message-Id: <slrn838qa4.e6g.bmccoy@moebius.foiservices.com>
Also Sprach James Mohr <j.mohr@gisma.de>:
>I figure that computers have reached the point where there is no need
>for making "tighter" code.
>Unless you are programming 3-D graphics and are really pushing the
>limits of your 128MB RAM
>and 500MHz machines, then spending time to make it run in 0.1 second as
>compared to 0.5 second
>is not worth the trouble. In addition, writing it C-like makes it easier
>for non-Perl programmers to
>understand it.
>
>Now I know I am free to write my programs. However, I would like to hear
>other people's thoughts
>on perl programming style.
I think a lot of it is personal preference, and how much you like to type.
Typing
foreach $i (1..10) {
is a lot easier to type than
for($i = 0; $i < 10; $i++) {
I cut my programming teeth on C and C++ myself, but I am lazy, so if I can
find shortcuts to tasks, I'm going to take them.
--
Brett W. McCoy bmccoy@foiservices.com
Computer Operations Manager (Alpha Geek) http://www.foiservices.com
FOI Services, Inc./DIOGENES 301-975-0110
---------------------------------------------------------------------------
------------------------------
Date: 18 Nov 1999 16:21:19 GMT
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: Perl programming sytle
Message-Id: <3834277f_1@newsread3.dircon.co.uk>
James Mohr <j.mohr@gisma.de> wrote:
> Hi All!
>
> I was recently "chastised" by someone for programming perl on WinNT
> like I programm
> C on UNIX. He insisted that I should programm more "perl-like" and many
> of the constructs
> he suggested as changes were definately not C-like, and were definately
> harder to read. (IMO)
>
Hear, Hear !
> I figure that computers have reached the point where there is no need
> for making "tighter" code.
> Unless you are programming 3-D graphics and are really pushing the
> limits of your 128MB RAM
> and 500MHz machines, then spending time to make it run in 0.1 second as
> compared to 0.5 second
> is not worth the trouble.
Perl style is hardly ever about theses things - it is a lot about aesthetics
and functionality though.
> In addition, writing it C-like makes it easier
> for non-Perl programmers to
> understand it.
>
Well for C programmers perhaps - but what about for people who have never
used C ?
> Now I know I am free to write my programs. However, I would like to hear
> other people's thoughts
> on perl programming style.
>
I am not quite sure what you are saying here - after all we havent heard
anything of your opinions except that someone thinks you program Perl in
a C style and you dont care ...
/J\
--
"I don't have access to the intelligence" - Michael Howard
------------------------------
Date: 18 Nov 1999 16:45:45 GMT
From: simon@brecon.co.uk (Simon Cozens)
Subject: Re: Perl programming sytle
Message-Id: <slrn838b9p.ksp.simon@othersideofthe.earth.li>
James Mohr (comp.lang.perl.misc):
>Now I know I am free to write my programs. However, I would like to hear
>other people's thoughts
>on perl programming style.
perldoc perlstyle
http://language.perl.com/style/
--
In most countries selling harmful things like drugs is punishable.
Then howcome people can sell Microsoft software and go unpunished?
(By hasku@rost.abo.fi, Hasse Skrifvars)
------------------------------
Date: 18 Nov 1999 10:31:43 GMT
From: csaba_r@my-deja.com (Csaba Raduly)
Subject: Re: perl stumper
Message-Id: <8E8261C0Aquuxi@10.1.2.158>
lr@hpl.hp.com (Larry Rosler) wrote in
<MPG.129cfd7aa5151f7498a22a@nntp.hpl.hp.com>:
>In article <0a0133f8.2f9ed36b@usw-ex0102-016.remarq.com> on Wed, 17 Nov
>1999 17:23:19 -0800, toby_toby_toby
><toby_toby_tobyNOtoSPAM@hotmail.com.invalid> says...
>> One of the folks in my team stumped me with this
>> trivial hunk of code. It really seems like it
>> should work. Unfortunately, perl says "Use of
>> unitialized value..." when the second line is
>> read from the file.
>>
>> Any clues?
>> -toby
>
>For sure!
>
>> #!perl -w
>> use strict;
>
>Two cheers!
>
>> open (IN, "notes.txt");
>
>No test and diagnostic with $!, so -1 cheer!
>
>> my($line) = <IN>;
>
[snip]
And, as somebody more knowledgeable than me pointed out when I posted a
similar line, you should check these <> lines with "or die" whenever they
aren't in a while:
my $line = <IN> or die "Couldn't read : $!";
--
-----BEGIN GEEK CODE BLOCK-----
Version 3.1
GCS/MU d- s:- a30 C++$ UL+ P+>+++ L++ E- W+ N++ o? K? w++>$ O++$ M-
V- PS PE Y PGP- t+ 5 X++ R* tv++ b++ DI+++ D++ G- e+++ h-- r-- !y+
-----END GEEK CODE BLOCK-----
Csaba Raduly, Software Developer (OS/2), Sophos Anti-Virus
mailto:csaba.raduly@sophos.com http://www.sophos.com/
US Support +1 888 SOPHOS 9 UK Support +44 1235 559933
Life is complex, with real and imaginary parts.
------------------------------
Date: Thu, 18 Nov 1999 15:05:59 +0100
From: "Robert J. Alexander" <bob@atena.rome.ibm.com>
Subject: Please advise on URL robot checking PERL modules
Message-Id: <383407C7.8B573F31@atena.rome.ibm.com>
I would like to write a little 'bot to maintain my LAAAAAARGE list of
URLs.
I need to perform the following:
1) Periodically read a file of HTTP URLs
2) Attempt accessing them
3) Write a file for each tried URL prepended with the return code
Have to address the following specific points:
A) Need to route through an HTTP proxy
B) Need to properly use URLs which contain embedded userid:password
C) Need to follow any redirects
What modules/libraries/stubs should I start from to suffer as little as
possible ???
Thank you very much in advance. Bob Alexander
------------------------------
Date: Thu, 18 Nov 1999 20:06:24 GMT
From: kragen@dnaco.net (Kragen Sitaker)
Subject: Re: Please advise on URL robot checking PERL modules
Message-Id: <4%YY3.25933$YI2.1142204@typ11.nn.bcandid.com>
In article <383407C7.8B573F31@atena.rome.ibm.com>,
Robert J. Alexander <bob@atena.rome.ibm.com> wrote:
>I would like to write a little 'bot to maintain my LAAAAAARGE list of
>URLs.
LWP::RobotUA.
--
<kragen@pobox.com> Kragen Sitaker <http://www.pobox.com/~kragen/>
The Internet stock bubble didn't burst on 1999-11-08. Hurrah!
<URL:http://www.pobox.com/~kragen/bubble.html>
------------------------------
Date: Thu, 18 Nov 1999 15:17:09 +0100
From: "Robert J. Alexander" <bob@atena.rome.ibm.com>
Subject: Re: Please advise on URL robot checking PERL modules
Message-Id: <38340A65.CE7DAEBA@atena.rome.ibm.com>
Ooooops, sorry. Brain check.
Point #3 should read:
3) For each attempted URL write a line in ONE report file with the URL
prepended by the return code.
Thank you again. Bob Alexander
"Robert J. Alexander" wrote:
>
> I would like to write a little 'bot to maintain my LAAAAAARGE list of
> URLs.
> I need to perform the following:
>
> 1) Periodically read a file of HTTP URLs
> 2) Attempt accessing them
> 3) Write a file for each tried URL prepended with the return code
>
> Have to address the following specific points:
>
> A) Need to route through an HTTP proxy
> B) Need to properly use URLs which contain embedded userid:password
> C) Need to follow any redirects
>
> What modules/libraries/stubs should I start from to suffer as little as
> possible ???
>
> Thank you very much in advance. Bob Alexander
------------------------------
Date: 18 Nov 1999 07:46:19 -0800
From: merlyn@stonehenge.com (Randal L. Schwartz)
Subject: Re: Please advise on URL robot checking PERL modules
Message-Id: <m1g0y3yf90.fsf@halfdome.holdit.com>
>>>>> "Robert" == Robert J Alexander <bob@atena.rome.ibm.com> writes:
Robert> I would like to write a little 'bot to maintain my LAAAAAARGE list of
Robert> URLs.
Robert> What modules/libraries/stubs should I start from to suffer as little as
Robert> possible ???
You can probably use most of the code from any one of my URL-checking
spiders, archived at <http://www.stonehenge.com/merlyn/WebTechniques/>.
--
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: Thu, 18 Nov 1999 09:21:55 -0800
From: Bill Moseley <moseley@best.com>
Subject: Re: Please advise on URL robot checking PERL modules
Message-Id: <MPG.129dd58ef16d401e98988a@nntp1.ba.best.com>
Randal L. Schwartz (merlyn@stonehenge.com) seems to say...
> >>>>> "Robert" == Robert J Alexander <bob@atena.rome.ibm.com> writes:
>
> Robert> I would like to write a little 'bot to maintain my LAAAAAARGE list of
> Robert> URLs.
>
> Robert> What modules/libraries/stubs should I start from to suffer as little as
> Robert> possible ???
>
> You can probably use most of the code from any one of my URL-checking
> spiders, archived at <http://www.stonehenge.com/merlyn/WebTechniques/>.
Randal uses LWP::Parallel::UserAgent in one of his excellent columns. I
use a different method where I divide up a list of URLs into chunks and
fork a bunch of children to run in "parallel."
I'd be interested to hear the pros and/or cons of the two different
methods.
--
Bill Moseley mailto:moseley@best.com
pls note the one line sig, not counting this one.
------------------------------
Date: Thu, 18 Nov 1999 13:54:40 -0600
From: Chris Durbin <durbin@cig.mot.com>
To: Jonas Nilsson <jonas.nilsson@mbox326.swipnet.se>
Subject: Re: Please help me create a file with perl
Message-Id: <Pine.GSO.4.21.9911181334080.5714-100000@ballad>
On Tue, 16 Nov 1999, Jonas Nilsson wrote:
:)Thanks for the help but I have tried every advise but it still don't
:)work. Any more tips ?
:)
:)
:)>Hello.
:)>I don't know so much perl. I think a script that create a file should
:)>look something like this, but I get a Internal Server Error all the
:)>time. Does anyone know what's wrong please tell me. Thanks.
:)>
:)>My script:
:)>
:)>#!/usr/bin/perl
:)>open(FILE,">>jonas") \n";
:)>print FILE"Test\n";
:)>close(FILE);
:)>`chmod 666 jonas`;
:)>
:)>Thanks
:)>Jonas
:)
Two points of query:
1. (minor) Why are you using backticks to execute the chmod
command? C<system> runs more efficiently. Unless you need to
capture the output from the chmod command, C<system> is always a
better way to go.
2. Do you know how your system handles cgi calls? On most secure
systems the cgi script is run with the permissions of the user
"nobody", which are a very restricted set of access. This is to
protect the system from malicious attacks, much havoc can be
wreaked upon a system that allows anyone who can surf to the site
the ability to mess with files on that system. Do not assume that
because the system allows you perform certain actions while
logged on as a specific user that it will allow you to do the
same things via an impersonal script.
All of this should be taken with a grain of salt, as my CGI
experience is vastly limited, and a few years old... I suspect
you may get a more informed respose if address this question to a
CGI newsgroup, as I believe it is more a CGI question than a perl
question.
--
Chris Durbin Motorola, Cellular Infrastructure Group
--------------------------------------------------------------
Phone: (847)435-9558 Pager: 1-800-759-8888, #1268222
Fax: (847)632-4552 Email: durbin@cig.mot.com
------------------------------
Date: Thu, 18 Nov 1999 13:02:23 -0800
From: Larry Rosler <lr@hpl.hp.com>
Subject: Re: Please help me create a file with perl
Message-Id: <MPG.129e093a53f35d8998a230@nntp.hpl.hp.com>
In article <Pine.GSO.4.21.9911181334080.5714-100000@ballad> on Thu, 18
Nov 1999 13:54:40 -0600, Chris Durbin <durbin@cig.mot.com> says...
> On Tue, 16 Nov 1999, Jonas Nilsson wrote:
...
> :)>#!/usr/bin/perl
> :)>open(FILE,">>jonas") \n";
> :)>print FILE"Test\n";
> :)>close(FILE);
> :)>`chmod 666 jonas`;
> Two points of query:
> 1. (minor) Why are you using backticks to execute the chmod
> command? C<system> runs more efficiently. Unless you need to
> capture the output from the chmod command, C<system> is always a
> better way to go.
More to the point: Why are you using an external command instead of the
Perl built-in chmod() function?
...
--
(Just Another Larry) Rosler
Hewlett-Packard Laboratories
http://www.hpl.hp.com/personal/Larry_Rosler/
lr@hpl.hp.com
------------------------------
Date: 16 Sep 99 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin)
Subject: Digest Administrivia (Last modified: 16 Sep 99)
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: The mail to news gateway, and thus the ability to submit articles
| through this service to the newsgroup, has been removed. I do not have
| time to individually vet each article to make sure that someone isn't
| abusing the service, and I no longer have any desire to waste my time
| dealing with the campus admins when some fool complains to them about an
| article that has come through the gateway instead of complaining
| to the source.
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 V9 Issue 1422
**************************************