[10228] in Perl-Users-Digest
Perl-Users Digest, Issue: 3821 Volume: 8
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Fri Sep 25 10:08:02 1998
Date: Fri, 25 Sep 98 07:00:28 -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 Fri, 25 Sep 1998 Volume: 8 Number: 3821
Today's topics:
Re: .pl to .bat conversion <dennis.kowalski@daytonoh.ncr.com>
Re: 64K Limit on @Lines=<FILEIN> for Perl NT? scott@softbase.com
Re: 64K Limit on @Lines=<FILEIN> for Perl NT? <zenin@bawdycaste.org>
Re: cat reese > /dev/null (was Re: Perl & Java - differ (John Klassa)
Current package detection <ets@egnetz.uebemc.siemens.de>
Re: Current package detection (Kjetil Skotheim)
Re: Current package detection (Mark-Jason Dominus)
Re: Help using Perl and Tk <rick.delaney@shaw.wave.ca>
Re: Help using Perl and Tk <jdf@pobox.com>
Re: HELP:: s/// problem... (David A. Black)
How can i avoid this?????? URGENT Please help. <P.Poelman@cable.a2000.nl>
Re: how can i avoid this?????? URGENT (J.H.M. Dassen)
Re: How do I implement perl with javascript or vice ver <poohba@io.com>
Re: Installing Win32::API?? <perlguy@inlink.com>
Re: Learning Perl Advice <denewman@cs.buffalo.edu>
Re: Learning Perl Advice <zenin@bawdycaste.org>
LWP on NT fails to fetch more than 4000 URLs. (Fergus McMenemie)
Re: Many processes communication - How To? (Kjetil Skotheim)
Perl as http User Agent?! (Soren Andersen)
Re: Perl as http User Agent?! (Mads Toftum)
Re: Perl as http User Agent?! <zenin@bawdycaste.org>
Re: Perl as http User Agent?! <merlyn@stonehenge.com>
Re: Poll: How Did You Learn Perl? (David Cantrell)
Re: Poll: How Did You Learn Perl? sr@pc-plus.de
Re: Regular Expression Operator Precedence <jdf@pobox.com>
Re: Regular Expression Operator Precedence (Mark-Jason Dominus)
Re: send geroge reese (was Re: Call for Participation: <jdporter@min.net>
Re: sending email attachments using just perl? (I.J. Garlick)
Re: setting path in win95 scott@softbase.com
Special: Digest Administrivia (Last modified: 12 Mar 98 (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Fri, 25 Sep 1998 08:26:29 -0400
From: Dennis Kowalski <dennis.kowalski@daytonoh.ncr.com>
Subject: Re: .pl to .bat conversion
Message-Id: <360B8BF5.782C@daytonoh.ncr.com>
Brian Day wrote:
>
> I used the pl2bat file that comes with the perl distribution to convert
> a perl script to a batch file. I'm on a Win95 system, and whenever I
> call any of my standard batch files by name alone they work fine.
> However, even if I give the explicit path to the converted .bat file, I
> still get a "bad command or filename" message. The only way it works is
> if I am actually in the c:\perl\bin directory and call it with the
> explicit path c:\perl_work\hello
>
> Is there any way to get this to work by simply typing hello while in
> c:\perl_work ???
>
> Any info is greatly appreciated
> Thanks,
> Brian Day
I ran into the a similar problem.
Here is what it was.
If the generated .bat file is in a PATH directory it could be run with a
short name such as abc.bat.
But if I full path invoked it such as c:\aaa\bbb\abc.bat
i got the message "can not execute abc.bat"
The solution was to always invoke with the short name and let the OS use
the PATH variable to find it.
By the way, beware of one more glitch.
The .bat file generated by pl2bat.bat contains the following line
perl.exe -S %CMD% %ARGS%
The potential problem is with the -S.
The -S parameter tells perl to search for the script to execute in the
PATH directories.
If you are in a work directory that is NOT in your PATH, you can run the
.pl directly with no problem.
i.e. perl xxx.pl
BUT, now run pl2bat and generate xxx.bat.
Then run xxx.bat
When the perl -S line is executed, you will get the message "can not
execute xxx.bat" from Perl because the -S searches only the PATH
directories and if the current directory is not in the PATH, it can not
find the %CMD% file which is of course xxx.bat.
The solution is to make sure that the current directory ".:" is in your
PATH.
------------------------------
Date: 25 Sep 1998 13:16:28 GMT
From: scott@softbase.com
Subject: Re: 64K Limit on @Lines=<FILEIN> for Perl NT?
Message-Id: <360b97ac.0@news.new-era.net>
Caitlin (caitlin@nospam.intranet.ca) wrote:
> Is there a limit on how much data can be read from a text file
> using a statement similar to the following:
> @Lines = <FILEIN>;
> I'm running Perl for NT Version 5.003, Build 316
Nope. I've read megabytes at a time.
Scott
--
Look at Softbase Systems' client/server tools, www.softbase.com
Check out the Essential 97 package for Windows 95 www.skwc.com/essent
All my other cool web pages are available from that site too!
My demo tape, artwork, poetry, The Windows 95 Book FAQ, and more.
------------------------------
Date: 25 Sep 1998 13:39:14 GMT
From: Zenin <zenin@bawdycaste.org>
Subject: Re: 64K Limit on @Lines=<FILEIN> for Perl NT?
Message-Id: <906730685.554520@thrush.omix.com>
[posted & mailed]
Caitlin <caitlin@nospam.intranet.ca> wrote:
: Is there a limit on how much data can be read from a text file
: using a statement similar to the following:
: @Lines = <FILEIN>;
How much RAM ya got? No, there is no arbitrary limit.
: I'm running Perl for NT Version 5.003, Build 316
perldoc -f binmode
This might be the problem if you happen to have an invalid
"end of file" character in the file. -Is this really a text
file, or might it be holding information of a more interesting
format?
--
-Zenin (zenin@archive.rhps.org) From The Blue Camel we learn:
BSD: A psychoactive drug, popular in the 80s, probably developed at UC
Berkeley or thereabouts. Similar in many ways to the prescription-only
medication called "System V", but infinitely more useful. (Or, at least,
more fun.) The full chemical name is "Berkeley Standard Distribution".
------------------------------
Date: 25 Sep 1998 12:04:36 GMT
From: klassa@aur.alcatel.com (John Klassa)
Subject: Re: cat reese > /dev/null (was Re: Perl & Java - differences and uses)
Message-Id: <6ug0sk$kcl@news01.aud.alcatel.com>
On Tue, 22 Sep 1998 13:47:48 GMT, George Reese <borg@imaginary.com> wrote:
> Ahh, yes, let's all be judged by the code we wrote a decade ago in
> college.
You didn't write code a decade ago, in college. You didn't write code a
decade ago, period. You didn't write code until at least 1991, according
to your web page (excerpted below, without permission). Since you claim to
be a stickler for the facts, and for what's been said, I thought this was
relevant.
GR> I moved back to Maine in 1992 and began work with the University
GR> of Maine distance education center broadcasting college classes to
GR> remote sites in Maine. This job got me computing experience which
GR> eventually led me back to Bates College where I was hired to help in
GR> a database conversion. It is interesting to note that up until 1991,
GR> all I knew about computers was how to write my college papers--I have
GR> not had any formal programming education save a couple of community
GR> college classes I never finished while living in Los Angeles.
GR> In 1994, a company called York and Associates in Minneapolis,
GR> Minnesota offered me the opportunity to move to the frozen tundra
GR> of the upper midwest and do client/server consulting. Somehow I got
GR> involved in Java while at York and Associates and ended up taking
GR> a job doing Java development at Carlson Marketing Group in late
GR> 1996. You can take a look at my resume online.
--
John Klassa / Alcatel Telecom / Raleigh, NC, USA <><
------------------------------
Date: Fri, 25 Sep 1998 11:43:24 +0200
From: "Hr. Jochen Stenzel" <ets@egnetz.uebemc.siemens.de>
Subject: Current package detection
Message-Id: <360B65BC.48EF7DA3@egnetz.uebemc.siemens.de>
Hello,
is there a way to detect which package I am in?
Can I get a list of all modules currently loaded by a program?
Thanks in advance
Jochen
------------------------------
Date: 25 Sep 1998 13:10:20 GMT
From: kjetil.skotheim@usit.uio.no (Kjetil Skotheim)
Subject: Re: Current package detection
Message-Id: <6ug4ns$1mk$1@readme.uio.no>
In article <360B65BC.48EF7DA3@egnetz.uebemc.siemens.de>,
ets@egnetz.uebemc.siemens.de says...
>
>Hello,
>
>is there a way to detect which package I am in?
$curpack = __PACKAGE__;
print $curpack;
>
>Can I get a list of all modules currently loaded by a program?
Maybe %INC is what you are looking for.
print join("\n","Loaded modules:",sort keys %INC,"\n");
>
>Thanks in advance
>
> Jochen
>
------------------------------
Date: 25 Sep 1998 09:22:27 -0400
From: mjd@op.net (Mark-Jason Dominus)
Subject: Re: Current package detection
Message-Id: <6ug5ej$7k7$1@monet.op.net>
In article <360B65BC.48EF7DA3@egnetz.uebemc.siemens.de>,
Hr. Jochen Stenzel <ets@egnetz.uebemc.siemens.de> wrote:
>is there a way to detect which package I am in?
The current package for any part of your program is usually determined
statically, at compile time. So the best answer to your question is:
You can always tel what package you are in just by examining the
source code of your porgram. Look for the nearest applicable
`package' directive, and that is the answer.
You can also examine the contents of the __PACKAGE__ token:
$curpackage = __PACKAGE__;
print "The current package is $curpackage.\n";
Finally, you can use the `caller' function to find out what package
you are in, or the package of the function that called the current
function.
>Can I get a list of all modules currently loaded by a program?
Not really. It's possible that the information you want is what is in
%INC. But you didn't say what you're trying to accomplish, so it's
difficult to help you.
------------------------------
Date: Fri, 25 Sep 1998 12:35:18 GMT
From: Rick Delaney <rick.delaney@shaw.wave.ca>
Subject: Re: Help using Perl and Tk
Message-Id: <360B8F94.A89AD99E@shaw.wave.ca>
Jonathan Feinberg wrote:
>
> Soon there will be an O'Reilly book about Perl/Tk. Hang in there.
Is this fact or wish?
--
Rick Delaney
rick.delaney@shaw.wave.ca
------------------------------
Date: 25 Sep 1998 15:19:42 +0200
From: Jonathan Feinberg <jdf@pobox.com>
To: Rick Delaney <rick.delaney@shaw.wave.ca>
Subject: Re: Help using Perl and Tk
Message-Id: <m390j8uy6p.fsf@joshua.panix.com>
Rick Delaney <rick.delaney@shaw.wave.ca> writes:
> Jonathan Feinberg wrote:
>
> > Soon there will be an O'Reilly book about Perl/Tk. Hang in there.
>
> Is this fact or wish?
http://www.oreilly.com/catalog/lperltk/
--
Jonathan Feinberg jdf@pobox.com Sunny Brooklyn, NY
http://pobox.com/~jdf
------------------------------
Date: Fri, 25 Sep 1998 08:25:08 EDT
From: dblack@saturn.superlink.net (David A. Black)
Subject: Re: HELP:: s/// problem...
Message-Id: <6ug234$ius$1@earth.superlink.net>
Hello -
hampus@my-dejanews.com writes:
>Hello everone.
>I have some problem with the following: I want to do a search/replace in a
>text-file. The format of the textfile is like this
>($star,$starpic,$starpicnr,$description) example: star,3,5,this is a
>star;star2,6,7,this is also a star;star3,4,4,ssstttaaarr; ----- Now, I want
>to change one of the numbers in the string. This is done by first using
>($star and $starpic already have values - in this case let's say thay match
>the star2): ---- $filen=~m/$star,$starpic,(.*),(.*);/; $starpicnr=$1;
>$starpicnr++; ---- so far - no problems... now - I want to write back that
>variable: ----
>$filen=~s/$star,$starpic,.*,.*;/$star,$starpic,$starpicnr,$description;/; ---
>And well... the number is increasing - but the rest of the file is gone... I
>mean - all entries after the one changed disappear. So after writing it back
>to the file - it all looks like this: --- star,3,5,this is a
>star;star2,6,7,this is also a star;
I'm not sure I entirely follow this (perhaps you could make more use of your
<ENTER> and <SPACE> keys!), but if I understand it correctly, I think something
along these lines would be preferable to what you're doing now:
my $filen = do { local $/; <DATA> };
print "Before: \n$filen";
$filen =~ s/(\d+)(?=,\D)/$1 + 1/ge;
print "\nAfter:\n$filen\n";
__DATA__
star,3,5,this is a star;star2,6,7,this is also a star;star3,4,4,ssstttaaarr;
star,3,50,this is a star;star2,6,70,this is also a star;star3,4,40,ssstttaaarr;
star,3,52,this is a star;star2,6,73,this is also a star;star3,4,45,ssstttaaarr;
The "After" result looks like this:
After:
star,3,6,this is a star;star2,6,8,this is also a star;star3,4,5,ssstttaaarr;
star,3,51,this is a star;star2,6,71,this is also a star;star3,4,41,ssstttaaarr;
star,3,53,this is a star;star2,6,74,this is also a star;star3,4,46,ssstttaaarr;
Doing the calculation in the substitution field of the s/// operator keeps it
cleaner and easier to see and debug.
David Black
dblack@saturn.superlink.net
------------------------------
Date: Fri, 25 Sep 1998 12:00:08 +0200
From: "P. Poelman" <P.Poelman@cable.a2000.nl>
Subject: How can i avoid this?????? URGENT Please help.
Message-Id: <6ufpjs$l40$1@pascal.a2000.nl>
I'm trying to compile perl 5.005 on an IRIX6.3
What i'm trying to do, everytime i run ./Configure or run ./configure.gnu
the moment i run gmake then this is the result.
Use of uninitialized value at configpm line 339, <GLOS> chunk 539.
Use of uninitialized value at configpm line 339, <GLOS> chunk 540.
Use of uninitialized value at configpm line 339, <GLOS> chunk 541.
Use of uninitialized value at configpm line 339, <GLOS> chunk 542.
Use of uninitialized value at configpm line 403.
configpm: tmp not valid at configpm line 403.
gmake: *** [lib/Config.pm] Error 2
I'm running gnu-gcc-2.8.1
Is there anyone who had the same problem and how can i avoid this??????
URGENT.
respons to:
P.Poelman@cable.a2000.nl
THANKS
------------------------------
Date: 25 Sep 1998 09:43:32 GMT
From: jdassen@wi.LeidenUniv.nl (J.H.M. Dassen)
Subject: Re: how can i avoid this?????? URGENT
Message-Id: <6ufok4$jam$2@noc.wi.leidenuniv.nl>
P. Poelman <P.Poelman@cable.a2000.nl> wrote in gnu.gcc.help:
>I'm trying to compile perl 5.005 on an IRIX6.3
>What i'm trying to do, everytime i run ./Configure or run ./configure.gnu
>the moment i run gmake then this is the result.
>
>Use of uninitialized value at configpm line 339, <GLOS> chunk 539.
>Use of uninitialized value at configpm line 339, <GLOS> chunk 540.
>Use of uninitialized value at configpm line 339, <GLOS> chunk 541.
>Use of uninitialized value at configpm line 339, <GLOS> chunk 542.
>Use of uninitialized value at configpm line 403.
>configpm: tmp not valid at configpm line 403.
>gmake: *** [lib/Config.pm] Error 2
This is in all likeliness not related to the compiler.
The warning messages you see are perl ones. Apperantly, there's either an
error in "configpm", or it is fed unexpected input; perhaps the people on
comp.lang.perl.misc can provide more help.
HTH,
Ray
--
Cyberspace, a final frontier. These are the voyages of my messages,
on a lightspeed mission to explore strange new systems and to boldly go
where no data has gone before.
------------------------------
Date: Fri, 25 Sep 1998 08:57:22 -0500
From: Chocolate <poohba@io.com>
To: Sam Wang <samwang@freewwweb.com>
Subject: Re: How do I implement perl with javascript or vice versa?
Message-Id: <Pine.BSF.4.02A.9809250856260.29005-100000@dillinger.io.com>
I thought about trying that but isn't onLoad a javascript event. And
logout.cgi is not a javascript function. It is a perl script. Would it
still work?
On Sat, 19 Sep 1998, Sam Wang wrote:
> change your body tag to:
>
> <BODY onUnload="logout.cgi">
>
> (not sure that onUnload is the right event, as i havent' used javascript in
> about 6 months)
> however, this might not work, if they click close. you'll have to open up
> javascript to open another window and go to that uri, to fix that.
>
> however, this will not be transparent to the user, because when they leave, it
> goes to somewhere they didn't expect to go. leaving the user confused. maybe,
> you can have it open a new window, tell the window to go to logout.cgi and
> then close the window. should be mostly transparent. though you might want
> have the window say "logging out..." or something.
>
> Chocolate wrote:
>
> > I am not sure it this is the right group or not. I want to set a cookie.
> > I do this best with perl CGI but I know it can be done with JavaScript.
> > The situation:
> > I have this page that you have to log into. There is a flat file with
> > your username and a password that you made up along with some other
> > information. Once logged in your username is put into another file that
> > says that you are online now. It also gives you access to other parts of
> > the page. Now if you close the browser then your cookie is unset and you
> > would have to log back in later but your name is still in the file that
> > says that you are still here. If you log out by clicking logout then you
> > are removed from the file before you are logged out. What I want to do is
> > something like: onUnload logout.cgi. How do I do this?
> >
> > * Web Page Designs *
> > < poohba@io.com | www.io.com/~poohba >
> > * (919)599-5543 *
> >
>
>
>
* Web Page Designs *
< poohba@io.com | www.io.com/~poohba >
* (919)599-5543 *
------------------------------
Date: Fri, 25 Sep 1998 11:16:54 GMT
From: Brent Michalski <perlguy@inlink.com>
Subject: Re: Installing Win32::API??
Message-Id: <360B7BA6.1E4AEEDA@inlink.com>
Have you tried the Perl Package Manager (ppm.pl) that comes with
Activestate Perl?
It goes something like this:
cd /perl/5.00502/bin
perl ppm.pl
... The PPM command-line interface starts ...
install Win32-API
quit
That *should* install it for you.
Please note that I had problems with version 0.9.1 of PPM but version
0.9 worked for me.
Good luck!
Brent
--
$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
$ Brent Michalski $
$ -- Perl Evangelist -- $
$ E-Mail: perlguy@technologist.com $
$ Resume: http://www.inlink.com/~perlguy $
$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
------------------------------
Date: 25 Sep 1998 13:10:28 GMT
From: David E Newman <denewman@cs.buffalo.edu>
Subject: Re: Learning Perl Advice
Message-Id: <6ug4o4$ifb$1@prometheus.acsu.buffalo.edu>
My boss introduced Perl to me in November of 1997.
Most of my acquired knowlege of Perl has been through
the projects I've been assigned. I use allot of trial
and error and ask my boss several questions at first.
I then picked up a few books:
Learning Perl
This is an ok starter book. I wouldn't get Programming Perl
without this book.
Programming Perl
A good refrence book once you have some experience writing
scripts.
The Official Guide to Programming with CGI.pm
This is a ausome book for those who want to use the power
of CGI.pm
Perl 5 Interactive Course
I think this is the best book to learn Perl from. Interactive
Course books seem to assist me the most.
I have begun to use the Perl help files. These are helpful if
I know what I'm looking for and know were to find it.
------------------------------
Date: 25 Sep 1998 13:44:23 GMT
From: Zenin <zenin@bawdycaste.org>
Subject: Re: Learning Perl Advice
Message-Id: <906730994.820841@thrush.omix.com>
[posted & mailed]
David E Newman <denewman@cs.buffalo.edu> wrote:
>snip<
: I have begun to use the Perl help files. These are helpful if
: I know what I'm looking for and know were to find it.
If you have the access, try installing the module Text::English.
After that, index your current distribution by running:
perlindex -index
Now the next time you're looking for something in the perl
documentation, instead of manually greping all the files you
can run:
perlindex some_word
Example:
$ perlindex socket
1 2.121 lib/perl5/i386-freebsd/5.00404/IO/Socket.pm
2 2.121 lib/perl5/site_perl/LWP/SecureSocket.pm
3 2.121 lib/perl5/site_perl/LWP/Socket.pm
4 2.121 lib/perl5/i386-freebsd/5.00401/IO/Socket.pm
5 2.121 lib/perl5/IO/Socket.pm
6 2.121 lib/perl5/pod/perlipc.pod
7 1.061 lib/perl5/Socket.pm
8 1.061 lib/perl5/i386-freebsd/5.00401/Socket.pm
9 1.061 lib/perl5/i386-freebsd/5.00404/Socket.pm
a 0.998 lib/perl5/ExtUtils/Embed.pm
b 0.943 lib/perl5/site_perl/Net/DummyInetd.pm
c 0.795 lib/perl5/site_perl/HTTP/Daemon.pm
d 0.742 lib/perl5/IO/Select.pm
e 0.707 lib/perl5/i386-freebsd/5.00401/IO.pm
f 0.707 lib/perl5/i386-freebsd/5.00404/IO.pm
Enter Number or 'q'> 5
Running pod2man /usr/local/lib/perl5/IO/Select.pm
...man page for IO::Select is shown...
--
-Zenin (zenin@archive.rhps.org) From The Blue Camel we learn:
BSD: A psychoactive drug, popular in the 80s, probably developed at UC
Berkeley or thereabouts. Similar in many ways to the prescription-only
medication called "System V", but infinitely more useful. (Or, at least,
more fun.) The full chemical name is "Berkeley Standard Distribution".
------------------------------
Date: Fri, 25 Sep 1998 11:41:24 +0000
From: fergus@twig.demon.co.uk (Fergus McMenemie)
Subject: LWP on NT fails to fetch more than 4000 URLs.
Message-Id: <1dfwqav.g013qlqric4yN@twig.demon.co.uk>
hello
We are using perl LWP on NT4 to download thousands of pages
from a local web site. (actually its a CGI being called with
different parameters:-)
However we regularly see that the script fails to fetch any
more than about 3968 pages. The $ua->request call fails with
res->content of "Could not connect to xxxx:80". I suspect
the perl script since to solve the problem I simply ^c the
script and restart it, whereupon it fetches the next 3968
pages.
I tried adding a pause of 30min, within my script, after 3000
pages to let NT/Netscape/the machine recover. This had no
effect.
perl version is 5.004_2 for NT with LWP included.
WEB server is netscape fasttrack 2
Machine is running NT4 with service pack 3
Any ideas or suggestions.
--
======================================================================
Fergus McMenemie Email: fergus@twig.demon.co.uk
Technical Basis
======================================================================
------------------------------
Date: 25 Sep 1998 13:29:09 GMT
From: kjetil.skotheim@usit.uio.no (Kjetil Skotheim)
Subject: Re: Many processes communication - How To?
Message-Id: <6ug5r5$1mk$2@readme.uio.no>
In article <360AF855.AE7B710@mail.pt>, sergio@mail.pt says...
>
>Hi all,
>
...
>
>The program has a big initial processment, and must load
>a lot o data into memory to make the right choices at the
>right time, at the fastest speed...
>
>So... my idea was to make some kind of a daemon, always
>in memory, and small clients to ask the questions very
>quickly.
>
>Also, all the clients must be serialised, it cannot be
>2 or more clients asking a question to the daemon at a time!
>
>I've read perlipc man page, and tryed to use named pipes:
>
>DEAMON read from pipe_A, process, write to pipe_B
>CLIENTS write to pipe_A, read from pipe_B
>
>I thowgth the pipes automaticaly serialize que clients...
>
>Well... it is not working... perhaps i'm not using the
>open() and close() correctly... perhaps the pipes are
>not the solution...
>
>Any other solutions?
>
See "Unix-Domain TCP Clients and Servers" in that same perlipc
man page. Works fine for me.
------------------------------
Date: 25 Sep 1998 11:19:46 GMT
From: sorentin@m6.sprynet.com (Soren Andersen)
Subject: Perl as http User Agent?!
Message-Id: <MPG.10754662c7d63a3498968c@netnews.worldnet.att.net>
In checking the log for my WWW site, I find the following entry (as a
courtesy of course the complete IP address is not copied here):
------------------------------
A visitor from ________.___.rr.com (___.___.43.57) was logged once,
starting at 5:10:59 AM on Friday, August 28, 1998.
The initial browser was libwww-perl/5.11.
------------------------------
When the 'browser' at the client end of the connection made its initial
request it reported itself to be 'libwww-perl/5.11'. A typical response
would of course be something like this: "Mozilla/4.0 (compatible; MSIE
4.01; Windows NT)".
Can anyone offer a knowledgeable explanation or even a sound conjecture
about who my mystery visitor was? A search bot or spider implemented in
Perl?
Thanks - I am a new webmaster and need to learn about what's going on,
clearly.
soren andersen
--
Windows 95: n. 32 bit extensions and a graphical shell for a 16 bit patch
to an 8 bit operating system originally coded for a 4 bit microprocessor,
written by a 2 bit company that can't stand 1 bit of competition.
------------------------------
Date: Fri, 25 Sep 1998 11:42:35 GMT
From: mt@dev.null (Mads Toftum)
Subject: Re: Perl as http User Agent?!
Message-Id: <360b8147.1470923996@news.inet.tele.dk>
Check out: http://www.linpro.no/lwp/
vh.
Mads Toftum, (QDPH/JAPH)
---
A computer lets you make more mistakes faster than any other
invention, with the possible exceptions of handguns and Tequilla.
-- Mitch Ratcliffe
------------------------------
Date: 25 Sep 1998 11:56:07 GMT
From: Zenin <zenin@bawdycaste.org>
Subject: Re: Perl as http User Agent?!
Message-Id: <906724507.393691@thrush.omix.com>
[posted & mailed]
Soren Andersen <sorentin@m6.sprynet.com> wrote:
>snip<
: The initial browser was libwww-perl/5.11.
: When the 'browser' at the client end of the connection made its initial
: request it reported itself to be 'libwww-perl/5.11'. A typical response
: would of course be something like this: "Mozilla/4.0 (compatible; MSIE
: 4.01; Windows NT)".
:
: Can anyone offer a knowledgeable explanation or even a sound conjecture
: about who my mystery visitor was? A search bot or spider implemented in
: Perl?
Yes, it likely was. There is a collection of Perl modules for
general web programming entitled libwww. By default they call
themself "libwww-perl/version". Code could look as simple as
just a one line command:
perl -MLWP::Simple -e 'getprint "http://www.yoursite.com/"'
What they are doing with this library however, is entirely a
different subject. It could be a spider or search engine, or it
could be someone building a new web browser in Perl, or it could
simply be someone that wants to keep an eye on a particular page
of yours or a particular search. For instance, many classified
ad sites on the 'Net will only auto-email you if you pay them,
but you can do all the manual searches you'd like. With nothing
too much more complex then the one liner above, I often have setup
mini "bots" that just run the search for me once a day, and if it
finds anything interesting to let me know.
Is this cheating? Maybe (probably), but I like to think of it more
as productive living. :-)
--
-Zenin (zenin@archive.rhps.org) From The Blue Camel we learn:
BSD: A psychoactive drug, popular in the 80s, probably developed at UC
Berkeley or thereabouts. Similar in many ways to the prescription-only
medication called "System V", but infinitely more useful. (Or, at least,
more fun.) The full chemical name is "Berkeley Standard Distribution".
------------------------------
Date: Fri, 25 Sep 1998 13:44:00 GMT
From: Randal Schwartz <merlyn@stonehenge.com>
Subject: Re: Perl as http User Agent?!
Message-Id: <8csohgpasg.fsf@gadget.cscaper.com>
>>>>> "Soren" == Soren Andersen <sorentin@m6.sprynet.com> writes:
Soren> When the 'browser' at the client end of the connection made its initial
Soren> request it reported itself to be 'libwww-perl/5.11'. A typical response
Soren> would of course be something like this: "Mozilla/4.0 (compatible; MSIE
Soren> 4.01; Windows NT)".
Soren> Can anyone offer a knowledgeable explanation or even a sound conjecture
Soren> about who my mystery visitor was? A search bot or spider implemented in
Soren> Perl?
Boy, you're gonna be really confused when my LWP-based bot connects
up to your site and calls itself "Mozilla/19.2 (SonyPlaystation)".
That string is arbitrary.
--
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: Fri, 25 Sep 1998 10:31:40 GMT
From: NukeEmUp@ThePentagon.com (David Cantrell)
Subject: Re: Poll: How Did You Learn Perl?
Message-Id: <36126eba.62575659@thunder>
Behold, the heavens opened and, on 24 Sep 1998 10:38:11 -0700,
larry@kiev.wall.org (Larry Wall) spake thus:
>In article <360d0c81.58155423@thunder>,
>David Cantrell <NukeEmUp@ThePentagon.com> wrote:
>
>> Larry Wall wrote:
>>
>>> I dunno how I learned it.
>>
>>From the source code?
>
>Hmm, doubtful. The source code generally wasn't there when I needed it.
I meant more in the sense of creating it being a learning experience
in itself.
--
David Cantrell, part-time Unix/perl/SQL/java techie
full-time chef/musician/homebrewer
http://www.ThePentagon.com/NukeEmUp
------------------------------
Date: Fri, 25 Sep 1998 11:50:59 GMT
From: sr@pc-plus.de
Subject: Re: Poll: How Did You Learn Perl?
Message-Id: <6ug033$o17$1@nnrp1.dejanews.com>
In article <360923EC.8E9919D0@min.net>,
John Porter <jdporter@min.net> wrote:
> So here's a poll for everyone.
>
> From what resource(s) did you learn Perl?
Is anyone actually counting all these replies? I hope so :-)
For me it was a matter of taking the bull by the horns. I had to re-write a
rather nasty sh script, and decided to try perl 4.036 instead. I basically
had three windows open: one with the old script, one with the new perl script,
and one with the perl4 man page. I used less' searching capabilities to find
the bits I needed, and in about a day I had learned enough to be able to code
largish chunks without the man page. I miss having ALL the documentation in
one huge file. Once I got the hang of it I started watching clp, and have
since rounded off my education with both camels and the panther :-)
clp is still a great source of inspiration - definitely wouldn't want to miss
it!
Steve
-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/rg_mkgrp.xp Create Your Own Free Member Forum
------------------------------
Date: 25 Sep 1998 15:26:16 +0200
From: Jonathan Feinberg <jdf@pobox.com>
To: isaacw@my-dejanews.com
Subject: Re: Regular Expression Operator Precedence
Message-Id: <m367ecuxvr.fsf@joshua.panix.com>
isaacw@my-dejanews.com writes:
> Could someone please help me by telling me the standard UNIX regular
> expression operators in order of precedence ?
The O'Reilly book "Mastering Regular Expressions" is an exhaustive
treatment. You need it.
--
Jonathan Feinberg jdf@pobox.com Sunny Brooklyn, NY
http://pobox.com/~jdf
------------------------------
Date: 25 Sep 1998 09:36:18 -0400
From: mjd@op.net (Mark-Jason Dominus)
Subject: Re: Regular Expression Operator Precedence
Message-Id: <6ug68i$7n6$1@monet.op.net>
In article <6ufkth$e21$1@nnrp1.dejanews.com>, <isaacw@my-dejanews.com> wrote:
>Could someone please help me by telling me the standard UNIX regular
>expression operators in order of precedence ?
There isn't a standard. Every program is a little different.
Welcome to Unix.
>I'm writing a Finite State Machine regular expression matcher as part
>of a debugging tool and need to know the relative precedences of the
>operators.
That really doesn't make a lot of sense. Most of the operators are
unary postfix operators. There are really only two operators that are
infix: Concatenation and alternation. And concatenation doesn't even
use an operator symbol; you indicate it by abutting the things you
want to concatenate. I think you need to unask the question. I also
think you need to learn how regular expressions work before you start
this project.
If you insist on a table, I guess it would look something like this:
(none) Concatenation
* + ? Quantification
| Alternation
All this tells you is that
ab*|c+
means
((a(b*))|(c+))
Maybe that's what you wanted? Hard to believe, but I hope so. By the
way: Standard Unix `grep' does not supply | or ?.
The other likely symbols are not operators; [...] and [^...] are part
of the lexical structure, and behave lexically like single symbols; ^
and $ have special meaning at the beginnings and ends of regexes;
. has a special meaning but is a token and not an operator.
I have a parser for regexes at http://www.plover.com/~mjd/perl/Regex/
that you might want to look at. You might get a little more
understanding by having it print out the parse trees.
------------------------------
Date: Fri, 25 Sep 1998 08:57:55 -0400
From: John Porter <jdporter@min.net>
Subject: Re: send geroge reese (was Re: Call for Participation: Python Conference)
Message-Id: <360B9353.B05C95D5@min.net>
Zenin wrote:
>
> I think a SmallTalk conference might do a better job of teaching
> OO however.
>
> A Scheme conference though, would give us much more interesting
> code in the long run. <evil grin>
Personally, I think we all -- and some of us more than others --
could stand to take in an ML conference or two.
--
John "Many Jars" Porter
------------------------------
Date: Fri, 25 Sep 1998 09:12:54 GMT
From: ijg@csc.liv.ac.uk (I.J. Garlick)
Subject: Re: sending email attachments using just perl?
Message-Id: <Ezu1LI.F32@csc.liv.ac.uk>
In article <36096761.31631561@news.demon.co.uk>,
tim@tpickup.demon.co.uk (tim pickup) writes:
> I am writnig a perl script which sends an email built up on an html
> form on a browser. Similar to the service yahoo/hotmail provides.
>
> The problem is I want to attach a local file to the email message.
> I think yahoo.com uses java to encode the file and attach it.
> Is there a way of doing this directly using just perl?
>
> Thanks
>
> tim
Search CPAN for the MIME modules, it's all there and quite easy to use.
I've been doing this fo Months now.
--
--
Ian J. Garlick
<ijg@csc.liv.ac.uk>
<postmaster@merseymail.com>
strategy, n.:
A comprehensive plan of inaction.
------------------------------
Date: 25 Sep 1998 13:25:47 GMT
From: scott@softbase.com
Subject: Re: setting path in win95
Message-Id: <360b99db.0@news.new-era.net>
Brian Day (brianjulz@earthlink.net) wrote:
> I am very familiar with setting a path in the Unix environment, but
> can't figure out how to
> do the same on a Win95 system.
The only way to set the PATH for the entire system is in AUTOEXEC.BAT,
which is processed at boot time. Any process may modify its own path
by changing its PATH environment variable.
Windows 95 has extreme length restrictions on the PATH.
Scott
--
Look at Softbase Systems' client/server tools, www.softbase.com
Check out the Essential 97 package for Windows 95 www.skwc.com/essent
All my other cool web pages are available from that site too!
My demo tape, artwork, poetry, The Windows 95 Book FAQ, and more.
------------------------------
Date: 12 Jul 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 Mar 98)
Message-Id: <null>
Administrivia:
Special notice: in a few days, the new group comp.lang.perl.moderated
should be formed. I would rather not support two different groups, and I
know of no other plans to create a digested moderated group. This leaves
me with two options: 1) keep on with this group 2) change to the
moderated one.
If you have opinions on this, send them to
perl-users-request@ruby.oce.orst.edu.
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 3821
**************************************