[11452] in Perl-Users-Digest
Perl-Users Digest, Issue: 5052 Volume: 8
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Thu Mar 4 13:07:31 1999
Date: Thu, 4 Mar 99 10:00:30 -0800
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Perl-Users Digest Thu, 4 Mar 1999 Volume: 8 Number: 5052
Today's topics:
apologies for multiple posts <23_skidoo@geocities.com>
Re: Asyncronous and nonblocking IO on sockets. paulosa@gcm.com
big file of user info vs many individual files <23_skidoo@geocities.com>
CGI->PGP->mail ??? <sbeam@acunet.net>
Chicago.pm meeting Monday, March 15 (Jim Allenspach)
Re: client-side script to search files in the server (Lars Gregersen)
Re: Do you really need to do 'open(whatever, ..) or die (Andrew M. Langmead)
Re: FAQ 5.16: How can I reliably rename a file? <samuel.patton@wichita.boeing.com>
Re: FAQ 9.19: How do I send mail? (George Crissman)
Re: FAQ 9.19: How do I send mail? (Jonathan Stowe)
Form to a text file... <Leuthard@WebShuttle.ch>
GD Library <s.tuitjer@prosequm.de>
Re: Help needed on pattern matching in reverse <staffan@ngb.se>
Re: Help needed on pattern matching in reverse (Larry Rosler)
Re: HELP: Socket based script under Win32 (Lars Gregersen)
Re: High Quality Web Designer/Webmaster Needed (George Crissman)
Re: How do I get Perl Modules to run in my webspace? dturley@pobox.com
Re: How do I start? mirak63@my-dejanews.com
Re: Info4s about File::Find <jdf@pobox.com>
Re: IO::File <$fh> vs $fh->getline (Michael Stillwell)
Re: IO::File <$fh> vs $fh->getline (Larry Rosler)
Load an array from a file. <rganz@rushu.rush.edu>
Load an Array from a file. <rganz@rushu.rush.edu>
Re: Load an array from a file. <arnej@fc.hp.com>
Re: Load an array from a file. (Greg Bacon)
Re: Looking for a spider script (Randal L. Schwartz)
Re: Looking for a spider script (Steve Linberg)
Re: Looking for a spider script (Clay Irving)
Re: Looking for a spider script (Abigail)
Re: metasearch brad@quicomm.com
Msql-Mysql module / Perl / Windows 98 <jaco@enest.co.za>
Neil Gunther's PDQ in perl? <Alan.Burlison@uk.sun.com>
Special: Digest Administrivia (Last modified: 12 Dec 98 (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Thu, 04 Mar 1999 16:15:55 +0000
From: 23_skidoo <23_skidoo@geocities.com>
Subject: apologies for multiple posts
Message-Id: <36DEB1A7.47A0@geocities.com>
dunno why that happened!? sorry anyway!
-23
------------------------------
Date: Thu, 04 Mar 1999 15:28:39 GMT
From: paulosa@gcm.com
Subject: Re: Asyncronous and nonblocking IO on sockets.
Message-Id: <7bm8qq$g8p$1@nnrp1.dejanews.com>
I would like to know how too, if someone has replied to this
please let me know , thanx
In article <79al1q$6tl$1@nnrp1.dejanews.com>,
spazzz@goplay.com wrote:
> How do I fcntl() a socket to set it's flags for FASYNC or O_NONBLOCK?
>
> TIA,
> Jeff
>
> -----------== Posted via Deja News, The Discussion Network ==----------
> http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
>
-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
------------------------------
Date: Thu, 04 Mar 1999 16:11:24 +0000
From: 23_skidoo <23_skidoo@geocities.com>
Subject: big file of user info vs many individual files
Message-Id: <36DEB098.317E@geocities.com>
hi,
i've been writing cgi scripts for a few months now, sometimes i need to
store information on users eg username, passwords, email addreses etc.
so far i've been doing this by storing all the info in a flat file with
tab delimited lines eg:
23_skidoo password 23_skidoo@geocities.com
fred fredspass foo@bar.com
when i recently downloaded a demo version of the ultimate bulletin
board, i saw that this script stores data by creating a separate file
for each user in a users directory. this seems to me to have advantages,
eg i can check for duplicate usernames by doing:
if (-e "$userdir/$username.htm") { &error(name_exists);}
i can call up user details quickly using
open (USER, "$userdir/$username.htm");
@userdetails = <USER>;
close (USER);
my question is, are there any disadvantages to doing this? are there any
other advantages and are the 2 i listed here actually any faster than
searching a flat file?
thanks for your comments
-23
------------------------------
Date: Thu, 04 Mar 1999 11:43:17 -0500
From: Samuel Beam <sbeam@acunet.net>
Subject: CGI->PGP->mail ???
Message-Id: <36DEB825.E96AA97A@acunet.net>
Does anyone know of a way to automatically PGP-encrypt a mail message
which has been submitted via an HTML form? I have CC#'s which are sent
over SSL to a mail script of my own design, would like to encrypt these
messages before they are sent into the ether. Is this even possible? Am
I nuts? Is there a better way?
Using NT4, IIS and a highly reccommended package by Jan Krynicky
<Jenda@Krynicky.cz> called, appropriately, SendMail.
Thanks
-Szabo
------------------------------
Date: 4 Mar 1999 08:20:57 -0600
From: jima@MCS.COM (Jim Allenspach)
Subject: Chicago.pm meeting Monday, March 15
Message-Id: <7bm4s9$3vvvmvl@Venus.mcs.net>
Keywords: chicago,perl,mongers
The Chicago PM chapter will be having its next meeting on Monday,
March 15, at the offices of American Information Systems (161 N. Clark,
suite 1350), starting at 7:30 PM. Information on the group or on how to
get to the meeting can be found at the group's Website,
http://chicago.pm.org/ .
jma
--
Jim Allenspach (jima@mcs.net)
What part of "s#(\w)#($I++%2&&uc$1)||$1#gei;" don't you understand?
------------------------------
Date: Thu, 04 Mar 1999 14:08:49 GMT
From: lg@kt.dtu.dk (Lars Gregersen)
Subject: Re: client-side script to search files in the server
Message-Id: <36de9319.23235862@news.dtu.dk>
On 4 Mar 1999 08:59:09 GMT, "Sheila Eugenio" <seugenio@man.amis.com>
wrote:
>Hello,
> I have a directory in my server where hundreds of text files will reside.
>I am planning to create a CGI that will enable the users to fetch the files
>from their browsers but how can I do this?
First things first. Try to make the small "hello world!" example
before making something useful. This will teach you the basics. Use
the modules provided with Perl to make life easier. Especially
handling of forms can be tricky.
> This is my first time to create
>a client side script. As far as I know, using opendir will not work
>because it will search the users local PC. Please help me. Thanks..
Now, why will this be a client side script? Scripts run on the
_server_!
Lars
------------------------------
Lars Gregersen (lg@kt.dtu.dk)
http://www.gbar.dtu.dk/~matlg
------------------------------
Date: Thu, 4 Mar 1999 14:49:42 GMT
From: aml@world.std.com (Andrew M. Langmead)
Subject: Re: Do you really need to do 'open(whatever, ..) or die..'
Message-Id: <F82ruu.Duo@world.std.com>
Philip Newton <Philip.Newton@datenrevision.de> writes:
>And read perlipc to find out why you probably need to set $SIG{'PIPE'}
>if you're opening a pipe to write to.
Most likely, but it depends. If you are going to say "or die" when
opening then leaving the $SIG{PIPE} untrapped is a close
approximation.
--
Andrew Langmead
------------------------------
Date: Thu, 4 Mar 1999 15:54:30 GMT
From: "Sam Patton" <samuel.patton@wichita.boeing.com>
Subject: Re: FAQ 5.16: How can I reliably rename a file?
Message-Id: <F82uv9.BCF@news.boeing.com>
Jonathan Feinberg wrote in message ...
>Tom Christiansen <tchrist@mox.perl.com> writes:
>
>> In comp.lang.perl.misc,
>> ilya@math.ohio-state.edu (Ilya Zakharevich) writes:
>> :This description is has serious flaws, since it does not explain the
>> :difference of rename()ing on POSIX and DOSISH systems.
>>
>> No sir, it's your embarrassingly miserable excuse for a disk loader
>> that has serious flaws.
>[etc.]
>
>Listening to these guys going at it is like being one of the troopers
>when they opened the Ark in "Raiders of the Lost Ark".
>
>--
>Jonathan Feinberg jdf@pobox.com Sunny Brooklyn, NY
>http://pobox.com/~jdf
Thing is one both neither correct. :-)
------------------------------
Date: Thu, 04 Mar 1999 15:29:13 GMT
From: strads@tmisnet.com (George Crissman)
Subject: Re: FAQ 9.19: How do I send mail?
Message-Id: <36177d68.1341040@news2.tmisnet.com>
It would be a help if you could expand this faq to include:
** mailx
** qmail
** mail
** port 25 access
-- George Crissman
-- strads@tmisnet.com
I just gave up fighting with a machine that offered only "mail".
On 24 Feb 1999 05:46:14 -0700, Tom Christiansen
<perlfaq-suggestions@perl.com> wrote:
>(This excerpt from perlfaq9 - Networking
> ($Revision: 1.24 $, $Date: 1999/01/08 05:39:48 $)
>part of the standard set of documentation included with every
>valid Perl distribution, like the one on your system.
>See also http://language.perl.com/newdocs/pod/perlfaq9.html
>if your negligent system adminstrator has been remiss in his duties.)
>
> How do I send mail?
>
> Use the `sendmail' program directly:
>
> open(SENDMAIL, "|/usr/lib/sendmail -oi -t -odq")
> or die "Can't fork for sendmail: $!\n";
> print SENDMAIL <<"EOF";
> From: User Originating Mail <me\@host>
> To: Final Destination <you\@otherhost>
> Subject: A relevant subject line
>
> Body of the message goes here after the blank line
> in as many lines as you like.
> EOF
> close(SENDMAIL) or warn "sendmail didn't close nicely";
>
> The -oi option prevents sendmail from interpreting a line consisting of
> a single dot as "end of message". The -t option says to use the headers
> to decide who to send the message to, and -odq says to put the message
> into the queue. This last option means your message won't be immediately
> delivered, so leave it out if you want immediate delivery.
>
> Or use the CPAN module Mail::Mailer:
>
> use Mail::Mailer;
>
> $mailer = Mail::Mailer->new();
> $mailer->open({ From => $from_address,
> To => $to_address,
> Subject => $subject,
> })
> or die "Can't open: $!\n";
> print $mailer $body;
> $mailer->close();
>
> The Mail::Internet module uses Net::SMTP which is less Unix-centric than
> Mail::Mailer, but less reliable. Avoid raw SMTP commands. There are many
> reasons to use a mail transport agent like sendmail. These include
> queueing, MX records, and security.
>
>--
>The Unix Way of doing something [...] is to make it look as much like a filter
>as possible. (Richard O'Keefe)
------------------------------
Date: Thu, 04 Mar 1999 16:27:54 GMT
From: gellyfish@btinternet.com (Jonathan Stowe)
Subject: Re: FAQ 9.19: How do I send mail?
Message-Id: <36deb3cd.26989713@news.dircon.co.uk>
On Thu, 04 Mar 1999 15:29:13 GMT, strads@tmisnet.com (George Crissman)
wrote:
>It would be a help if you could expand this faq to include:
>** mailx
>** qmail
>** mail
There are mail user agents of basically the same functionality - the
way that one would use them is documented perfectly well in their
respective manpages.
>** port 25 access
>
It does cover port 25 access:
> Avoid raw SMTP commands. There are many
> reasons to use a mail transport agent like sendmail. These include
> queueing, MX records, and security.
You could easily provide examples of the others.
/J\
------------------------------
Date: Thu, 4 Mar 1999 16:56:42 +0100
From: "Thomas Leuthard" <Leuthard@WebShuttle.ch>
Subject: Form to a text file...
Message-Id: <7bmae0$m4f$1@sibyl.sunrise.ch>
I'm looking for a CGI-Script that make a textfile out of a HTML Form. This
is because the server uses SSL and I cannot send this encrypted by E-Mail.
So I write this file to the server and get it over a SSL secured connection.
Where can I find such a Form to Text script?
Thanks for your help.
Thomas Leuthard
www.leuthard.com
------------------------------
Date: Thu, 4 Mar 1999 14:05:02 +0100
From: "Stephan Tuitjer" <s.tuitjer@prosequm.de>
Subject: GD Library
Message-Id: <36de8476.0@news.ka.choin.net>
Does anybody know, where I can find the GD Library
Many thanks,
Stephan
http://www.prosequm.de (TQM-Framework written in Perl)
------------------------------
Date: Thu, 04 Mar 1999 13:05:45 +0100
From: Staffan Liljas <staffan@ngb.se>
Subject: Re: Help needed on pattern matching in reverse
Message-Id: <36DE7719.BD1740AF@ngb.se>
Tony Curtis wrote:
>
> Re: Help needed on pattern matching in reverse,
> rnbernardo <rnbernardo@yahoo.com> said:
> TMTOWTDI
>
> #17. search for all occurrences and pop() the last
> one off the array returned.
or use reverse.
$foo = reverse $bar;
$foo =~ /oof/;
$match = reverse $1;
Staffan
------------------------------
Date: Thu, 4 Mar 1999 07:51:40 -0800
From: lr@hpl.hp.com (Larry Rosler)
Subject: Re: Help needed on pattern matching in reverse
Message-Id: <MPG.11484be5e2f896349896d4@nntp.hpl.hp.com>
In article <36DE7719.BD1740AF@ngb.se> on Thu, 04 Mar 1999 13:05:45
+0100, Staffan Liljas <staffan@ngb.se >says...
...
> $foo = reverse $bar;
> $foo =~ /oof/;
> $match = reverse $1;
But do remember to set $1 first. On the other hand, why bother? The
last occurrence of 'foo' looks very much like the first occurrence. At
the least, one should test if the match succeeded at all.
I think the original poster had something more in mind. If all he wants
is to search for a literal string, the rindex() function is likely to be
more useful. If he wants to match a *pattern* (as he said), you'd
certainly want to capture the match.
--
(Just Another Larry) Rosler
Hewlett-Packard Company
http://www.hpl.hp.com/personl/Larry_Rosler/
lr@hpl.hp.com
------------------------------
Date: Thu, 04 Mar 1999 14:03:45 GMT
From: lg@kt.dtu.dk (Lars Gregersen)
Subject: Re: HELP: Socket based script under Win32
Message-Id: <36de9226.22992214@news.dtu.dk>
On Thu, 04 Mar 1999 11:28:50 GMT, brethel@dcc.unicamp.br wrote:
>Hi,
>i'm doing a Socket based script to run under Win32, and
>i don't know how to find out my machine's local IP
>( dynamically assigned at each connection ); under
>Unix i know'd be the $localhost=`hostname`, but how does that's
>done in Windows 9x/NT ???
One way of doing this is to get hostname.exe (of course :-).
Unfortunately I know only of a very big download. It is part of the
Cygnus tools (compilers, Unic tools etc.). You'll find it at:
http://www.cygnus.com
http://sourceware.cygnus.com/cygwin/download.html
BTW the compilers gcc, g++, g77 that comes with the free download are
great!
Lars
------------------------------
Lars Gregersen (lg@kt.dtu.dk)
http://www.gbar.dtu.dk/~matlg
------------------------------
Date: Thu, 04 Mar 1999 15:29:24 GMT
From: strads@tmisnet.com (George Crissman)
Subject: Re: High Quality Web Designer/Webmaster Needed
Message-Id: <36dea585.3295901@news2.tmisnet.com>
On Tue, 02 Mar 1999 11:54:43 -0500, comdog (brian d foy) wrote:
>In article <7bg7hb$9e4$1@nnrp1.dejanews.com>, webmaster posted:
>> Once we have received a contract, we will ask two or three people to
>> submit one design to us (usually the index page) prior to us agreeing a
>> contract. Only one person can win the work,
>note to the uninitiated: some unscrupulous "designers" will have you
>submit work for which they will not pay you so that they can show it
>to the client as one of the several samples they promised,
There was a company around here that tried that stunt. I told them
I worked from a retainer that guaranteed them 8 hours per week of
my time and that I would be happy to work for them once they submitted
their check.
Not only did I never hear from them again, but they never posted
online again, either.
-- George Crissman
-- strads@tmisnet.com
------------------------------
Date: Thu, 04 Mar 1999 13:12:35 GMT
From: dturley@pobox.com
Subject: Re: How do I get Perl Modules to run in my webspace?
Message-Id: <7bm0ru$92j$1@nnrp1.dejanews.com>
In article <ebohlmanF82940.6Fw@netcom.com>,
Eric Bohlman <ebohlman@netcom.com> wrote:
> ActiveState has a prebuilt DB_File module which works with their 5.00502
> builds.
>
Cool! I missed it when Ilooked the first time. THX.
--
____________________________________
David Turley
-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
------------------------------
Date: Thu, 04 Mar 1999 16:13:53 GMT
From: mirak63@my-dejanews.com
Subject: Re: How do I start?
Message-Id: <7bmbfm$in2$1@nnrp1.dejanews.com>
As a "network only" guy I haven't had much experience w/ languages outside of
school so I can tell you that the Perl for Dummies will get you up and running
enough to be dangerous. And when you are ready for the next step, try the
O'Reilly book Learning Perl on Win32 System or Dave Roth's book, Win32 Perl
Programming: The Standard Extensions. The Roth book has helped move me along
quite well since I "graduated" from the dummies book. Good luck.
Karim
>
> Doc wrote:
>
> > Hi
> > I am a very experienced programmer using an Intel Pentium PC with Win95.
> > I must be going senile because I have spent days on perl.com trying to
> > find what I need to start using perl, and what to do with it. I have
> > downloaded everything from 'perl for W32' to activestate's build 509, to
> > DCOM, to binary GCC. Every area seems to suggest something different.
> > I would appreciate it if some kind person would just tell me which files
> > I need to install, and what else needs to be done, so that I can start
> > writing programmes in perl for the internet. Having programmed in many
> > languages I thought that I would need a weekend to come to terms with
> > most of this - 4 days and still can't do 'HELLO WORLD' is embarrassing!
> >
> > Thanks in advance, (and hope)
> > doc
> >
> > --
> > Doc
>
> --
> HORIZON
> Software Solutions
>
> Developers / Consultants
>
> -= Integrated Systems / Internet / Unix /
> Windows / Linux =-
>
>
-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
------------------------------
Date: 04 Mar 1999 11:40:39 -0500
From: Jonathan Feinberg <jdf@pobox.com>
To: Dirk Schumacher <Dirk.Schumacher@depot147.dpd.de>
Subject: Re: Info4s about File::Find
Message-Id: <m3k8wxxl6g.fsf@joshua.panix.com>
Dirk Schumacher <Dirk.Schumacher@depot147.dpd.de> writes:
> I have seen the perdoc File::Find, but there are no info4s about
> follow links
You must have missed the last two lines of the docs:
BUGS
There is no way to make find or finddepth follow symlinks.
--
Jonathan Feinberg jdf@pobox.com Sunny Brooklyn, NY
http://pobox.com/~jdf
------------------------------
Date: 4 Mar 1999 12:14:10 GMT
From: mist@yoyo.cc.monash.edu.au (Michael Stillwell)
Subject: Re: IO::File <$fh> vs $fh->getline
Message-Id: <7bltei$t25$1@towncrier.cc.monash.edu.au>
On 03 Mar 1999 19:36:33 -0500, Uri Guttman <uri@ibnets.com> wrote:
: so the original bug posted was doing this:
:
: my ($line) = <$fh>;
:
: which slurped in the entire file (list context) and assigned the first
: line to $line. the fix is to eother declare it on another line from the
: assignment (my style) or remove the list context by deleting the parens:
:
: my $line = <$fh>;
:
: this assigns the first line to $line and doesn't slurp in the rest of
: the file.
It appears[1] that
my ($line) = scalar <$fh>;
is also effective.
Michael
1. By comparing the running times of
my ($line) = scalar <REALLY_BIG_FILE>;
with and without the scalar. Is there a better way?
--
.. ABSOLUT .SIG. ..
.. Michael Stillwell ..
.. mist@yoyo.cc.monash.edu.au ..
.. http://yoyo.cc.monash.edu.au/~mist/ ..
------------------------------
Date: Thu, 4 Mar 1999 07:12:41 -0800
From: lr@hpl.hp.com (Larry Rosler)
Subject: Re: IO::File <$fh> vs $fh->getline
Message-Id: <MPG.114842bd2a4225c19896d2@nntp.hpl.hp.com>
[Posted and a courtesy copy sent.]
In article <7bltei$t25$1@towncrier.cc.monash.edu.au> on 4 Mar 1999
12:14:10 GMT, Michael Stillwell <mist@yoyo.cc.monash.edu.au >says...
+ On 03 Mar 1999 19:36:33 -0500, Uri Guttman <uri@ibnets.com> wrote:
+ : so the original bug posted was doing this:
+ :
+ : my ($line) = <$fh>;
+ :
+ : which slurped in the entire file (list context) and assigned the
first
+ : line to $line. the fix is to eother declare it on another line from
the
+ : assignment (my style) or remove the list context by deleting the
parens:
+ :
+ : my $line = <$fh>;
+ :
+ : this assigns the first line to $line and doesn't slurp in the rest
of
+ : the file.
+
+ It appears[1] that
+
+ my ($line) = scalar <$fh>;
+
+ is also effective.
+
+ Michael
+
+ 1. By comparing the running times of
+
+ my ($line) = scalar <REALLY_BIG_FILE>;
+
+ with and without the scalar. Is there a better way?
Sure there is. Try a second read on any file with more than one line.
+ --
+ .. ABSOLUT .SIG. ..
+ .. Michael Stillwell ..
+ .. mist@yoyo.cc.monash.edu.au ..
+ .. http://yoyo.cc.monash.edu.au/~mist/ ..
Add an invisible space character after the two dashes, so newsreaders
will recognize and cut this.
--
(Just Another Larry) Rosler
Hewlett-Packard Company
http://www.hpl.hp.com/personl/Larry_Rosler/
lr@hpl.hp.com
------------------------------
Date: Thu, 4 Mar 1999 08:59:59 -0600
From: "Robert B. Ganz" <rganz@rushu.rush.edu>
Subject: Load an array from a file.
Message-Id: <7bm78a$bl9$1@gail.ripco.com>
Hi,
I was wonder if Perl is capable of loading an array from a file?
I can't seem to find sample code in either the Lama or the Camel books.
I want to do something like this.
@array = ();
$i = 0;
while (<INPUTFILENAME>)
{
push @array, shift @array;
sort @array;
print "$class[$i]\n";
$i++;
}
Any help would be great!
Tx,
Bob
RGanz@rushu.rush.edu
------------------------------
Date: Thu, 4 Mar 1999 10:16:49 -0600
From: "Robert B. Ganz" <rganz@rushu.rush.edu>
Subject: Load an Array from a file.
Message-Id: <7bmboc$eqr$1@gail.ripco.com>
Hi,
I was wonder if Perl is capable of loading an array from a file?
I can't seem to find sample code in either the Lama or the Camel books.
I want to do something like this.
@array = ();
$i = 0;
while (<INPUTFILENAME>)
{
push @array, shift @array;
sort @array;
print "$class[$i]\n";
$i++;
}
Any help would be great!
Tx,
Bob
RGanz@rushu.rush.edu
------------------------------
Date: Thu, 04 Mar 1999 09:38:22 -0700
From: Arne Jamtgaard <arnej@fc.hp.com>
Subject: Re: Load an array from a file.
Message-Id: <36DEB6FE.6CB7@fc.hp.com>
Robert B. Ganz wrote:
> Hi,
> I was wonder if Perl is capable of loading an array from a file?
> I can't seem to find sample code in either the Lama or the Camel
> books.
Try:
@array = <INPUTFILENAME>;
(after correctly opening the file, of course.)
HTH,
Arne
------------------------------
Date: 4 Mar 1999 16:04:55 GMT
From: gbacon@itsc.uah.edu (Greg Bacon)
Subject: Re: Load an array from a file.
Message-Id: <7bmav7$3la$2@info.uah.edu>
In article <7bm78a$bl9$1@gail.ripco.com>,
"Robert B. Ganz" <rganz@rushu.rush.edu> writes:
: I was wonder if Perl is capable of loading an array from a file?
: I can't seem to find sample code in either the Lama or the Camel books.
Assuming the array elements are on separate lines:
my @array;
my $input = "input-file.dat";
open IN, $input or die "$0: failed open $input: $!\n";
@array = <IN>;
close IN;
Greg
--
UNIX should be used as an adjective.
-- AT&T
------------------------------
Date: 04 Mar 1999 07:47:05 -0800
From: merlyn@stonehenge.com (Randal L. Schwartz)
Subject: Re: Looking for a spider script
Message-Id: <m1hfs1gsue.fsf@halfdome.holdit.com>
comp.lang.perl is dead. Please stop posting there.
>>>>> "johnny99" == johnny99 <johnny99@sydney.dialix.oz.au> writes:
johnny99> Where I work, we have a big site (in the fifty to one
johnny99> hundred thousand pages range) and I'd very much like to have
johnny99> a perl script that could do a full search of the site: not a
johnny99> search engine, just a listing of all documents and
johnny99> directories, and some useful stuff like document sizes and
johnny99> last-modified dates.
johnny99> This must be possible, but, I can't seem to find it by
johnny99> searching at the usual places.
Maybe you need to search some unusual places. :)
For my monthly WebTechniques Perl column, I've now written *4*
spiders, performing various successively smarter link verification for
a site. In fact, I just put the latest one up at my archive in
<URL:http://www.stonehenge.com/merlyn/WebTechniques/>... this one has
a *memory* and doesn't report false positives on a missed fetch... it
waits until you can't get it for a while (tunable). It can also run
in "incremental" mode... like for 60 minutes every night, picking up
where it left off if it takes more than 60 minutes to process an
entire site.
It would be easy to start with this code and add a report of "last
modified" or "size" to all the found links, which are all found since
it's fetching every page anyway.
print "Just another Perl hacker,"
--
Name: Randal L. Schwartz / Stonehenge Consulting Services (503)777-0095
Keywords: Perl training, UNIX[tm] consulting, video production, skiing, flying
Email: <merlyn@stonehenge.com> Snail: (Call) PGP-Key: (finger merlyn@teleport.com)
Web: <A HREF="http://www.stonehenge.com/merlyn/">My Home Page!</A>
Quote: "I'm telling you, if I could have five lines in my .sig, I would!" -- me
------------------------------
Date: Thu, 04 Mar 1999 10:50:18 -0500
From: linberg@literacy.upenn.edu (Steve Linberg)
Subject: Re: Looking for a spider script
Message-Id: <linberg-0403991050180001@ltl1.literacy.upenn.edu>
In article <7blhke$t68$1@nnrp1.dejanews.com>, johnny99@sydney.dialix.oz.au
wrote:
> Where I work, we have a big site (in the fifty to one hundred thousand pages
> range) and I'd very much like to have a perl script that could do a full
> search of the site: not a search engine, just a listing of all documents and
> directories, and some useful stuff like document sizes and last-modified
> dates.
>
> This must be possible, but, I can't seem to find it by searching at the usual
> places.
>
> Anyone got an idea?
What "usual places" did you search, out of curiosity?
Use File::Find.
--
Steve Linberg, Systems Programmer &c.
National Center on Adult Literacy, University of Pennsylvania
email: <linberg@literacy.upenn.edu>
WWW: <http://www.literacyonline.org>
------------------------------
Date: 4 Mar 1999 11:02:54 -0500
From: clay@panix.com (Clay Irving)
Subject: Re: Looking for a spider script
Message-Id: <slrn7dtblb.kei.clay@panix.com>
On Thu, 04 Mar 1999 08:52:33 GMT, johnny99@sydney.dialix.oz.au
<johnny99@sydney.dialix.oz.au> wrote:
>Where I work, we have a big site (in the fifty to one hundred thousand pages
>range) and I'd very much like to have a perl script that could do a full
>search of the site: not a search engine, just a listing of all documents and
>directories, and some useful stuff like document sizes and last-modified
>dates.
perldoc File::Find
--
Clay Irving <clay@panix.com>
Posterity is as likely to be wrong as anybody else.
- Heywood Broun
------------------------------
Date: 4 Mar 1999 16:27:01 GMT
From: abigail@fnx.com (Abigail)
Subject: Re: Looking for a spider script
Message-Id: <7bmc8l$idd$1@client2.news.psi.net>
johnny99@sydney.dialix.oz.au (johnny99@sydney.dialix.oz.au) wrote on MMXI
September MCMXCIII in <URL:news:7blhke$t68$1@nnrp1.dejanews.com>:
[] Where I work, we have a big site (in the fifty to one hundred thousand pages
[] range) and I'd very much like to have a perl script that could do a full
[] search of the site: not a search engine, just a listing of all documents and
[] directories, and some useful stuff like document sizes and last-modified
[] dates.
[]
[] This must be possible, but, I can't seem to find it by searching at the usual
[] places.
[]
[] Anyone got an idea?
system "ls", "-lR", "/whatever/directory";
Abigail
--
sub f{sprintf$_[0],$_[1],$_[2]}print f('%c%s',74,f('%c%s',117,f('%c%s',115,f(
'%c%s',116,f('%c%s',32,f('%c%s',97,f('%c%s',0x6e,f('%c%s',111,f('%c%s',116,f(
'%c%s',104,f('%c%s',0x65,f('%c%s',114,f('%c%s',32,f('%c%s',80,f('%c%s',101,f(
'%c%s',114,f('%c%s',0x6c,f('%c%s',32,f('%c%s',0x48,f('%c%s',97,f('%c%s',99,f(
'%c%s',107,f('%c%s',101,f('%c%s',114,f('%c%s',10,)))))))))))))))))))))))))
------------------------------
Date: Thu, 04 Mar 1999 16:23:00 GMT
From: brad@quicomm.com
Subject: Re: metasearch
Message-Id: <7bmc0n$j7d$1@nnrp1.dejanews.com>
In article <36CD8BE3.7991EB0D@banet.net>,
msfruch@banet.net wrote:
> Hi,
> does anyone know where I might find a metasearch script to search
> multiple search engines? I've searched and searched but haven't found
> any...
> Thanks in advance,
> -Marc
Marc:
You may wish to check out our QuickSearch script:
http://www.quicomm2.com/QuickSearch/demo.htm
It can also be easily customized for other search engines.
Regards,
--- Brad
-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
------------------------------
Date: Thu, 4 Mar 1999 14:25:11 +0200
From: "Jaco van Eeden" <jaco@enest.co.za>
Subject: Msql-Mysql module / Perl / Windows 98
Message-Id: <7blu38$ilv$1@hermes.is.co.za>
Hi
My goal is:
To connect to a Msql 2.0 database using Perl on a Windows 98 machine.
This is what I did so far:
I am using Activestate's Perl (build 509). I also have Msql 2.0 running on
my machine. I successfully installed the DBI and Data:Showtables modules
with PPM.
Now I want to install the Msql-Mysql module, but I see it is not available
from Activestate. I downloaded a Msql-Mysql module from CPAN. I did the
"perl makefile.pl" and the "nmake". Everything worked fine up until this
point. I then did the "nmake test" and got quite a few errors (one of them
is "too many parameters &&").
Am I doing something wrong? Must I use nmake or is there some other utility
I can use?
Any help ould be appreciated.
Regards
Jaco
------------------------------
Date: Thu, 04 Mar 1999 13:57:57 +0000
From: Alan Burlison <Alan.Burlison@uk.sun.com>
Subject: Neil Gunther's PDQ in perl?
Message-Id: <36DE9165.3B4E439C@uk.sun.com>
I'm looking for a version of Neil Gunther's BDQ queueing circuit solver
written in Perl. I believe from him that someone in Australia has
already done this - can anyone provide any pointers?
Thanks,
Alan Burlison
------------------------------
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 5052
**************************************