[7602] in Perl-Users-Digest
Perl-Users Digest, Issue: 1228 Volume: 8
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Sat Oct 25 12:07:28 1997
Date: Sat, 25 Oct 97 09:00:33 -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 Sat, 25 Oct 1997 Volume: 8 Number: 1228
Today's topics:
Re: Adding html to URLs <$_=qq!fearless\@NOSPAMio.com!;y/A-Z//d;print>
Re: Adding html to URLs <$_=qq!fearless\@NOSPAMio.com!;y/A-Z//d;print>
CGI tools (Connie Wang)
Char. set translation routines for HTML, Latin-1/2, Uni (Milivoj Ivkovic)
Re: Char. set translation routines for HTML, Latin-1/2, lvirden@cas.org
DBM (hashes of arrays) stevee@moon.jic.com
Editing Passwords <nishin@bekkoame.or.jp>
Re: Editing Passwords <rootbeer@teleport.com>
Re: Has Perl gone off the deep end or is it me??? (Gabor)
hashes of arrays in dbm (Steven Sajous)
Help! Where do you get started when wanting to learn? <jskates@NOSPAMwebsitefx.com>
Re: mkdir? (Gabor)
Re: Novell port of perl = crippleware? (J. Bacon)
Re: other language for perl (Tad McClellan)
Re: other language for perl lvirden@cas.org
Re: Primes via regexen (Was: Re: non-greedy regexps) (Abigail)
Re: Problems with $ARGV (Milivoj Ivkovic)
Sending a binary attachment with perl question? <barry@megaspace.com>
Re: Shared Memory <rootbeer@teleport.com>
Re: the disappearing label problem... <rootbeer@teleport.com>
Re: Using .forward file to trigger Perl script lvirden@cas.org
Re: WWW::Search and AltaVista lvirden@cas.org
Re: Year 2000 for GNU-Perl5 lvirden@cas.org
Re: Year2000 problem with localtime(); <randy@null.net>
Digest Administrivia (Last modified: 8 Mar 97) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Fri, 24 Oct 1997 20:18:53 -0700
From: "Creede Lambard" <$_=qq!fearless\@NOSPAMio.com!;y/A-Z//d;print>
Subject: Re: Adding html to URLs
Message-Id: <62roeq$h12@bgtnsc01.worldnet.att.net>
If you put the URLs into an ASCII file (in this case, urllist.txt) this
ought to work:
open(LIST,"urllist.txt") or die "Can't open urllist";
open(OUTPUT,">outfile.txt") or die "Can't open output file";
while (<LIST>) {
chop;
print OUTPUT qq!<a href="$_">$_</a>\n!;
}
close OUTPUT;
close LIST;
If for some reason you really want to do this all in one line, this worked
for me just now:
perl -pi.bak -e "s/^(.*?)$/<a href=\"$1\"$1<\/a>/g" urllist.txt
but I recommend the first way because it's much easier to understand. :D
--- Creede Lambard
Minister of Irregular Expressions
Programming Republic of Perl
harry_murphy@sfbayguardian.com wrote in message
<877734649.31401@dejanews.com>...
> I have a list of 1,000 URLs in MSWord that I want to
>put on a Web page. I need to put the HTML coding in
>each URL so that when I click on a URL, it will bring up
>a Web page.
> It would probably take me 20 hours to type in the
>html coding for each URL. However, I understand that
>if I use BBedit and regular expressions, I can have all
>of this done automatically.
> I have tried to use the following regular expression
>but can't seem to get it to work to add the html coding
>for each URL. Can anyone advise me on how to do this
>and what is wrong with my coding:
>Search: (^.*//([^/]+)/.*)
>Replace: <ahref="/1">/2</a>
>
>-------------------==== Posted via Deja News ====-----------------------
> http://www.dejanews.com/ Search, Read, Post to Usenet
------------------------------
Date: Sat, 25 Oct 1997 06:25:59 -0700
From: "Creede Lambard" <$_=qq!fearless\@NOSPAMio.com!;y/A-Z//d;print>
Subject: Re: Adding html to URLs
Message-Id: <62ss11$75j@bgtnsc01.worldnet.att.net>
Oops, left out a bracket. That should have been
perl -pi.bak -e "s/^(.*?)$/<a href=\"$1\">$1<\/a>/g" urllist.txt
of course.
------------------------------
Date: Sat, 25 Oct 1997 13:50:30 GMT
From: c0w0461@unix.tamu.edu (Connie Wang)
Subject: CGI tools
Message-Id: <3451f8cc.970134@news.tamu.edu>
What's the advantage or disadvantage of Perl over other CGI tools such
as Cold Fusion, JDBC, Active Server Pages.
Connie
------------------------------
Date: Fri, 24 Oct 1997 08:29:53 GMT
From: ivkovic@compuserve.com (Milivoj Ivkovic)
Subject: Char. set translation routines for HTML, Latin-1/2, Unicode
Message-Id: <34535bec.7376109@news.compuserve.com>
I need to do various character set translations. I'm sure some or most
of them have been done already. Would you please point me to the ones
you're aware of.
I'm after:
DOS <-> Windows/Latin-1
parts of Unicode <-> Latin-2
Unicode/Latin-1/Latin-2 <-> plain 7bit / HTML
I'm sure at least the HTML <-> Latin-1 must exist, but I don't know
where.
(The point is to manipulate and display HTML files with mixed Latin1
and Latin-2, which have to be translated for text searches and for
display in various browser/OS combinations as good as possible)
Thank you,
Milivoj
------------------------------
Date: 25 Oct 1997 09:02:07 GMT
From: lvirden@cas.org
Subject: Re: Char. set translation routines for HTML, Latin-1/2, Unicode
Message-Id: <62scif$7d2$4@srv38s4u.cas.org>
According to Milivoj Ivkovic <ivkovic@compuserve.com>:
:I need to do various character set translations. I'm sure some or most
:of them have been done already. Would you please point me to the ones
:you're aware of.
:
:I'm after:
:DOS <-> Windows/Latin-1
:parts of Unicode <-> Latin-2
:Unicode/Latin-1/Latin-2 <-> plain 7bit / HTML
:
Have you looked to see if the GNU recode package covers the translations
you need? See
<URL: ftp://ftp.iro.umontreal.ca/pub/contrib/pinard/pretest/ > for
the current development copy.
--
Larry W. Virden INET: lvirden@cas.org
<URL:http://www.teraform.com/%7Elvirden/> <*> O- "We are all Kosh."
Unless explicitly stated to the contrary, nothing in this posting should
be construed as representing my employer's opinions.
------------------------------
Date: Sat, 25 Oct 1997 10:36:38 -0600
From: stevee@moon.jic.com
Subject: DBM (hashes of arrays)
Message-Id: <877730190.27521@dejanews.com>
I have setup a database whit the dbm module with the following code
#!/usr/bin/perl5
$home=$ENV{"HOME"} if $home eq "";
$data = "$home/proshop/allshop.daf";
open(ALL,"newshop") or die("could not open file:$!");
dbmopen(%SHOP,"proshop",0600);
open(ALL,"newshop") or die("could not open file:$!");
while(<ALL>) {
($itemnum,$rest) = split(/::/,$_);
@field = split(/::/,$rest);
$subcat="Miscellaneous" if $subcat =~ /^\s*$/;
$SHOP{$itemnum} = [@field];
}
dbmclose(%SHOP);
close ALL;
So I'm hoping that my hash (database looks like this
%SHOP = ( someitemnumber => ['this','that','the other','etc..'])
however when I write the following code:
#!/usr/bin/perl5
&Parse_Database;
sub Parse_Database {
dbmopen(%SHOP,"proshop",0600) || die("Could not open:$!");
foreach $request (keys %SHOP) {
print $request."\n";
foreach $i (0..$#{ $SHOP{$request} }) {
print "$i = #SHOP{$request}[$i]\n";
}
}
print "\n";
}
I only get the $request (the keys) but not the indexed values.
Is it not possible to set up a database with dbm with a hash of arrays?
Please send me an e-mail:
stevee@moon.jic.com
-------------------==== Posted via Deja News ====-----------------------
http://www.dejanews.com/ Search, Read, Post to Usenet
------------------------------
Date: Sat, 25 Oct 1997 11:55:33 +0900
From: Mic <nishin@bekkoame.or.jp>
Subject: Editing Passwords
Message-Id: <34515FA5.1D98@bekkoame.or.jp>
Does anyone know where I can find a program that with add, change &
delete passwords from the file .htpasswd.
------------------------------
Date: Sat, 25 Oct 1997 06:30:04 -0700
From: Tom Phoenix <rootbeer@teleport.com>
To: Mic <nishin@bekkoame.or.jp>
Subject: Re: Editing Passwords
Message-Id: <Pine.GSO.3.96.971025062944.8796D-100000@usertest.teleport.com>
On Sat, 25 Oct 1997, Mic wrote:
> Does anyone know where I can find a program that with add, change &
> delete passwords from the file .htpasswd.
If there's a module which does what you want, it should be listed in
the module list on CPAN. If you don't find one to your liking, you're
welcome and encouraged to submit one! :-) Hope this helps!
http://www.perl.org/CPAN/
http://www.perl.com/CPAN/
--
Tom Phoenix http://www.teleport.com/~rootbeer/
rootbeer@teleport.com PGP Skribu al mi per Esperanto!
Randal Schwartz Case: http://www.rahul.net/jeffrey/ovs/
Ask me about Perl trainings!
------------------------------
Date: 25 Oct 1997 12:36:37 GMT
From: gabor@vinyl.quickweb.com (Gabor)
Subject: Re: Has Perl gone off the deep end or is it me???
Message-Id: <slrn653pkm.dmi.gabor@vinyl.quickweb.com>
In article <01bce0c3$5882c160$d4000080@ccu09>, Scott Cairns wrote:
>Execute the following code segment on an NT Win32 machine running Perl for
>Win32 version 5.003_07:
>
>use lib 'c:\perl\lib';
>use lib 'c:\perl\lib\Win32';
>
>$Type = "P";
>
>print "Type = $Type\n";
>if ($Type == "X")
>{
> print "Found X!\n";
>}
>else
>{
> print "Found A $Type!\n";
>}
>
>and I get the following results:
>
>C:> test.pl
>Type = P
>Found X!
>
>How can this possibly be?!?!?!?! I've spent the last 2 days trying to
>debug a 700+ line perl program only to trace it down to the if statement
>above which I extracted into a test file and verified that the if logic in
>perl seems to be a bit askew...
>
-w is your friend! '==' compares numerically. You need 'eq'. Why
would 'C' precondition you to use '==' when in C it only works for
numeric comparison as well? You can't compare 2 character arrays with
'==', you'd need strcmp.
gabor.
--
In general, if you think something isn't in Perl, try it out,
because it usually is. :-)
-- Larry Wall in <1991Jul31.174523.9447@netlabs.com>
------------------------------
Date: Sat, 25 Oct 1997 10:41:27 GMT
From: stevee@moon.jic.com (Steven Sajous)
Subject: hashes of arrays in dbm
Message-Id: <3451ccae.301009789@news2.jic.com>
I have setup a database whit the dbm module with the following code
#!/usr/bin/perl5
$home=$ENV{"HOME"} if $home eq "";
$data = "$home/proshop/allshop.daf";
open(ALL,"newshop") or die("could not open file:$!");
dbmopen(%SHOP,"proshop",0600);
open(ALL,"newshop") or die("could not open file:$!");
while(<ALL>) {
($itemnum,$rest) = split(/::/,$_);
@field = split(/::/,$rest);
$subcat="Miscellaneous" if $subcat =~ /^\s*$/;
$SHOP{$itemnum} = [@field];
}
dbmclose(%SHOP);
.
.
.
[To save space in this confirmation email we have abbreviated your
article,
however the entire article will be posted].
===========================================================================
-----------------------------------------------
WHAT TO DO IF YOU DID NOT REQUEST THIS POSTING:
-----------------------------------------------
[This article has NOT yet been posted to Usenet. The reason we send
this email is to authenticate the author of articles we post.]
If you didn't request this article be posted to Usenet via the Deja
News service, that could mean someone using our service forged your
address and attempted to make this article appear as if you had posted
it. The person who did this used the IP address we log in the
X-Originating-IP-Addr: header field of the posting. This person may
be able to be traced if you contact the system administrator at their
site.
If you would like us to try to find out if someone forged your
address,
please write to help@dejanews.com, include a statement like "I
didn't write this, please find out who did", and include this entire
message. We will try to help you as much as we can, but we are not a
legal body and other system administrators are not always cooperative,
so we cannot promise any results. We are sorry for any inconvenience.
------------------------------
Date: Sat, 25 Oct 1997 08:19:42 -0700
From: "Jack Skates" <jskates@NOSPAMwebsitefx.com>
Subject: Help! Where do you get started when wanting to learn?
Message-Id: <62t2sn$jtk@dfw-ixnews4.ix.netcom.com>
Hi everyone,
I recently purchased a book on Perl 5 for NT. I really want to learn and I
am very committed to doing whatever it takes. The problem is, I have never
done any programming and college math was about 13 years ago. I am starting
to realize that I need to learn some programming basics if I am ever to get
this. For the most part, I am getting it....but some of it I can't even grab
on to.
My question(s) is/are is learning basic Perl a good enough primer to
programming in general to learn the basic concepts? Or, should I be learning
something else first to get a better understanding of programming concepts?
I get the if, if-else, if-elsif-else....barely...but I'm getting it. The
while and until is really throwing me into a loop (no pun intended).
Any advice or suggestions would be of great help. BTW, I have been writing
HTML for the last two years, but realize it's no primer to the subject.
Thanks in advance to anyone that can help.
Jack Skates
Remove NOSPAM when replying by email
------------------------------
Date: 25 Oct 1997 12:42:48 GMT
From: gabor@vinyl.quickweb.com (Gabor)
Subject: Re: mkdir?
Message-Id: <slrn653q09.dmi.gabor@vinyl.quickweb.com>
In article <62j7a8$dkm$1@castor.dnai.com>, Tim Meals wrote:
>I apologize now if this is a simple question that I should be able to
>figure out by myself. Maybe after a bite to eat things will make more
>sense.
>
>At any rate, I'm having problems with getting mkdir to create a
>directory. The O'Reilly book, CORE Perl documentation and FAQs (that
>I've found) have very little about how to use mkdir correctly. I've
>tried all of the following:
>
>mkdir($directory,"0776");
>mkdir($directory,"ug+rwx,o+rx");
>mkdir($directory,"00776");
>mkdir($directory,"776");
>
>I get different results with each one, but non give the permissions I
>want, "drwxrwxr-x". Please help out with this simple little statement
>that's driving me bonkers!
>
>Perl version is 5.00401, OS is Solaris x86 2.5 or IRIX 5.2 (both have the
>same problem).
Check to see what your umask is set to. It modifies the permissions.
gabor.
--
Anyway, there's plenty of room for doubt. It might seem easy
enough, but computer language design is just like a stroll in the
park. Jurassic Park, that is.
-- Larry Wall in <1994Jun15.074039.2654@netlabs.com>
------------------------------
Date: 25 Oct 1997 02:54:08 GMT
From: jwbacon@ix.netcom.com (J. Bacon)
Subject: Re: Novell port of perl = crippleware?
Message-Id: <62rn0g$gj8@sjx-ixn4.ix.netcom.com>
In article <62nut8$6uo@neon.btinternet.com>, Gellyfish@btinternet.com
says...
>
>In article <877620524.26794@dejanews.com>, x@apocalypse.org says...
>>
>>I'm being forced to consider using Novell's IntranetWare Web Server and
>>am concerned about its support of perl. From what I understand, Novell
>>wrote their own perl interpreter (or is it ActiveWare's perhaps?). If
>>that's true, what good is that going to do me as a developer? I'm
>getting
>>more into modules, and have noticed that many modules require perl 5.003
>>or perl 5.004. Has anyone used the perl interpreter on IntranetWare?
>What
>>are its limitations?
>>
>>I can't even find a review on IntranetWare web server.
>>
>>Please help.
>>
>>Thanks.
>>
>> - Xochi
>>
>>-------------------==== Posted via Deja News ====-----------------------
>> http://www.dejanews.com/ Search, Read, Post to Usenet
>
>The intranetware Perl is I think a four point something port ( well on my
>server it appears to be ). So you can kiss your modules goodbye - but it
>is fast as it is loaded as an NLM all the time. I have used it for a
>couple of things that had beeb originally on Linux and the only problem
>is getting the pathnames to any external files right which to be honest
>is a bit of guesswork as it is NOT WELL DOCUMENTED !
>
>Given a choice of linux or Intranetware i'd go for Linux but the web
>server is fast and you get a nice red box.
>
The port IS 4.0-something, you can get it from the Perl site, and Linux is
a FAR superior choice, especially if you have to worry about e-mail,
newsgroups, and so forth even on the intranet level. Exactly why Novell
hasn't pursued a higher port is beyond me. The web services in general
were too hard to construct to be useful, so I just ignore them altogether
and use another box for that sort of stuff.
--
Jim Bacon .(o) (o). / + + +\
jwbacon@ix.netcom.com . ___ . / + + + /
303-581-9635 ext 329 (work) ..| |.. / + + + /
303-581-0960 (FAX)(w) |_|_| /_________/ W5-62-93
------------------------------
Date: Sat, 25 Oct 1997 00:02:26 -0500
From: tadmc@flash.net (Tad McClellan)
Subject: Re: other language for perl
Message-Id: <2hur26.isk.ln@localhost>
Geoffrey Hebert (soccer@all-soccer.com) wrote:
: I wish to translate my site to another language.
Why do you so wish?
I assume there is some feature of Perl that you do not like?
Maybe there is a way to overcome that feature that we could suggest
if we knew what feature that was...
[ have you tried asking in comp.lang.another too? ;-) ]
: Most of the site is html created from perl cgi.
Because it is easy to generate web sites with Perl.
Please share with us whatever better language it is that you want
to translate it to.
If there is something better, I'd like to check it out.
: Could someone tell me how the process might work?
1) Learn the new language.
2) Read and understand each perl program.
3) Rewrite the program in the new language.
Lather, rinse, repeat...
--
Tad McClellan SGML Consulting
tadmc@flash.net Perl programming
Fort Worth, Texas
------------------------------
Date: 25 Oct 1997 08:56:20 GMT
From: lvirden@cas.org
Subject: Re: other language for perl
Message-Id: <62sc7k$7d2$2@srv38s4u.cas.org>
According to Tad McClellan <tadmc@flash.net>:
:Geoffrey Hebert (soccer@all-soccer.com) wrote:
:: I wish to translate my site to another language.
:Why do you so wish?
:
:I assume there is some feature of Perl that you do not like?
:
Language such as 'programming language' or language such as Danish,
French, Spanish, Hebrew, Chinese, Japanese, etc.?
--
Larry W. Virden INET: lvirden@cas.org
<URL:http://www.teraform.com/%7Elvirden/> <*> O- "We are all Kosh."
Unless explicitly stated to the contrary, nothing in this posting should
be construed as representing my employer's opinions.
------------------------------
Date: 25 Oct 1997 06:10:03 GMT
From: abigail@fnx.com (Abigail)
Subject: Re: Primes via regexen (Was: Re: non-greedy regexps)
Message-Id: <slrn6533dm.e7.abigail@betelgeuse.wayne.fnx.com>
John L. Allen (allen@gateway.grumman.com) wrote on 1515 September 1993 in
<URL: news:62qqhb$jgq@gateway.grumman.com>:
++ In article <slrn650ao9.qp.abigail@betelgeuse.wayne.fnx.com>,
++ Abigail <abigail@fnx.com> wrote:
++ >
++ >No. 7/8 matches *don't* fail. What you are looking for whether the
++ >string has composite length, the regex engine stops looking as soon
++ >as it finds a possibility. By using (11+?), a matching length for
++ >\1 is found the first step in 50% of the cases - all even numbers.
++ >
++ >By using (11+), you'd need at least n/2 tries before finding
++ >a matching length. Hence the difference.
++
++ Well, my timings seem to have been a fluke. +? _is_ slightly
++ slower! I don't understand it, but it's true. Moreover, this
++ results in
++
++ Benchmark: timing 2000 iterations of 3000 (abi) , 3000 (john)...
++ 3000 (abi) : 11 secs (10.83 usr 0.00 sys = 10.83 cpu)
++ 3000 (john): 15 secs (15.44 usr 0.00 sys = 15.44 cpu)
++
++ as you can see, +? gets slower for bigger numbers. Abi wins!
Hmmm, you only tested 3 values. Here's a test doing 2998 values:
sub test ($) {
my $max = shift;
@x = map {1 x $_} 2 .. $max;
timethese 10, {
"$max (abi) " => 'foreach (@x) {/^(11+)\1+$/}',
"$max (john)" => 'foreach (@x) {/^(11+?)\1+$/}',
};
print "\n";
}
test 3000;
I get the following results:
3000 (abi) : 230 secs (229.75 usr 0.02 sys = 229.77 cpu)
3000 (john): 222 secs (221.78 usr 0.00 sys = 221.78 cpu)
The (11+?) marginally better, but much less than I expected it to be.
Abigail
--
perl -wle 'print "Prime" if (1 x shift) !~ /^(11+?)\1+$/'
------------------------------
Date: Fri, 24 Oct 1997 08:29:50 GMT
From: ivkovic@compuserve.com (Milivoj Ivkovic)
Subject: Re: Problems with $ARGV
Message-Id: <34515982.6758833@news.compuserve.com>
On Thu, 23 Oct 1997 22:54:52 GMT, mschunder@cybernet.com (Mark
Schunder) wrote:
> When the user types in for instance pres4*
>as a program argument, the perl script returns "perl: No Match". I
>know in this instance the problem is the asterisk. Is there any way
>around this problem? Is this an inherent problem in the $ARGV
>variable?
When you use wildcards in arguments, they are interpreted, and @ARGV
contains all filenames that matched. Try this with various arguments
to see:
foreach $ARGV (@ARGV) {
print $ARGV, "\n";
}
------------------------------
Date: Fri, 24 Oct 1997 12:28:27 -0400
From: Barry Kaplan <barry@megaspace.com>
Subject: Sending a binary attachment with perl question?
Message-Id: <3450CCAB.91276C68@megaspace.com>
Is it possible to send a binary attachment using the mailto statement in
perl? If so, can someone show me an example of this? Thanks.
------------------------------
Date: Sat, 25 Oct 1997 06:27:57 -0700
From: Tom Phoenix <rootbeer@teleport.com>
To: PRamanujam <pramanujam@aol.com>
Subject: Re: Shared Memory
Message-Id: <Pine.GSO.3.96.971025062043.8796C-100000@usertest.teleport.com>
On 25 Oct 1997, PRamanujam wrote:
> How do I pass Shared Memory Id between Processes without forking a
> process
Do the methods in perlipc(1) and IPC::SysV do anything good for you? Hope
this helps!
--
Tom Phoenix http://www.teleport.com/~rootbeer/
rootbeer@teleport.com PGP Skribu al mi per Esperanto!
Randal Schwartz Case: http://www.rahul.net/jeffrey/ovs/
Ask me about Perl trainings!
------------------------------
Date: Sat, 25 Oct 1997 06:45:40 -0700
From: Tom Phoenix <rootbeer@teleport.com>
To: Kjell Myksvoll TFR <kjell.myksvoll@fou.telenor.no>
Subject: Re: the disappearing label problem...
Message-Id: <Pine.GSO.3.96.971025063252.8796E-100000@usertest.teleport.com>
On 24 Oct 1997, Kjell Myksvoll TFR wrote:
> Label not found for "redo TRY" at ./label.pl line 9, <IN> chunk 34.
(I think that's the error message for a different version of the code you
posted - since what you posted never reads from IN. :-)
> That is that the TRY label is somehow gone.
I believe that the label on a loop block is not intended to be (ab)used
that way. If you want to effect a timeout, you could try this. But be
aware that (until some future version of Perl) signals are inherently
unreliable. :-(
eval {
local($SIG{ALRM}) = sub { die "TIMEOUT" };
alarm 10; # or whatever
&something_which_may_hang;
alarm 0;
};
if ($@ =~ /TIMEOUT/) {
die "Your message here";
}
You could even, if you wished, put that into a redo-able loop and redo
instead of dying on the first few tries.
> is there some way to rewrite the code so that it
> works both in v. 4 and v. 5 of Perl?
Tell your customers that, in order to accommodate the folks who won't
upgrade to Perl 5, that you're going to require all of them to downgrade
to Perl 4. If they don't like that, try requiring that they all install
Perl 5. :-)
Good luck!
--
Tom Phoenix http://www.teleport.com/~rootbeer/
rootbeer@teleport.com PGP Skribu al mi per Esperanto!
Randal Schwartz Case: http://www.rahul.net/jeffrey/ovs/
Ask me about Perl trainings!
------------------------------
Date: 25 Oct 1997 09:06:15 GMT
From: lvirden@cas.org
Subject: Re: Using .forward file to trigger Perl script
Message-Id: <62scq7$7d2$5@srv38s4u.cas.org>
According to Peter Perchansky <fp@pmpcs.com>:
:Where may I find more information on utilizing the ".forward" file
:(specially in Apache 1.2) to trigger the execution of a Perl script?
Find the mailagent program - a Perl application which works in your
.forward to do just that. Note however I don't think there is any
connection to Apache, which handles HTTP connections and not mail
connections.
:P.S. Please email me a copy of your reply. I do frequent this news
:group, but often find > 100 messages when I come back... and sifting
:through the messages to find replies can be fun ;-)
Note that you should consider either using Trn 4.0 beta, which allows
one to write perl functions to scan for special topics and assign
'scores' to the articles, making it possible to get things like
'replys to my postings' to appear first in the list of articles to
read.
--
Larry W. Virden INET: lvirden@cas.org
<URL:http://www.teraform.com/%7Elvirden/> <*> O- "We are all Kosh."
Unless explicitly stated to the contrary, nothing in this posting should
be construed as representing my employer's opinions.
------------------------------
Date: 25 Oct 1997 08:58:37 GMT
From: lvirden@cas.org
Subject: Re: WWW::Search and AltaVista
Message-Id: <62scbt$7d2$3@srv38s4u.cas.org>
According to John Heidemann <johnh@dash.isi.edu>:
:On 22 Oct 1997 08:40:52 GMT, Kou Sato wrote:
:>But after AltaVist changed its interface(?) and I updated
:>WWW::Search, I only get the first 10 links. Can anybody
:It's a constant struggle to keep WWW::Search's back-ends matching web
:servers. The currently released verson of WWW::Search's AltaVista
Anyone have an idea of other ideas on how to do this type of thing. John's
doing the best he can to build interfaces to WWW search engines, and
the folk on the search engines are doing the best they can to keep upgrading
things as fast as they can. So it becomes an 'arms race' situation...
--
Larry W. Virden INET: lvirden@cas.org
<URL:http://www.teraform.com/%7Elvirden/> <*> O- "We are all Kosh."
Unless explicitly stated to the contrary, nothing in this posting should
be construed as representing my employer's opinions.
------------------------------
Date: 25 Oct 1997 08:52:46 GMT
From: lvirden@cas.org
Subject: Re: Year 2000 for GNU-Perl5
Message-Id: <62sc0u$7d2$1@srv38s4u.cas.org>
According to Doug Seay <seay@absyss.fr>:
:And what is "Perl5 (gnu version)"? The folks at GNU have done a lot of
:good work, but they have never touched Perl. There is one and only one
However, at <URL: ftp://prep.ai.mit.edu/pub/gnu/ > I see:
gnu> dir perl*
-rw-r--r-- 1 14910 23059 586178 Feb 8 1993 perl-4.036.tar.gz
-rw-r--r-- 1 14910 23059 2549616 Sep 11 00:28 perl-5.004.03.tar.gz
-rw-r--r-- 1 14910 23059 2549385 Aug 25 05:18 perl5.004_03.tar.gz
-rw-r--r-- 1 14910 23059 129786 Jan 13 1996 perlref-5.001.2.tar.gz
Thus, if one buys a GNU source code CD-ROM, looks at the GNU web site or
ftp site, etc. one finds a 'GNU version of perl'.
--
Larry W. Virden INET: lvirden@cas.org
<URL:http://www.teraform.com/%7Elvirden/> <*> O- "We are all Kosh."
Unless explicitly stated to the contrary, nothing in this posting should
be construed as representing my employer's opinions.
------------------------------
Date: Sat, 25 Oct 1997 03:12:05 -0500
From: Randy Charles Ford <randy@null.net>
Subject: Re: Year2000 problem with localtime();
Message-Id: <3451A9D5.6DFC@null.net>
Jim Allenspach wrote:
>
> >> >Hi y'all,
> >> > Of the values returned by localtime, the $year value is coming out
> >> >as '97'. Is there a plan to change this to `1997`? It's something that
> >> >could cause *major* problems, don't you think?
> >>
> >> Only if you don't add 1900 to the year . . .
> >>
> >> You apparently had to read the documentation a *little bit* to determine the
> >> structure returned by localtime() . . . why did you stop there? The very next
> >> paragraph had the answer to your question.
> >>
>
> >oh err. this was a bit catty wasn't it?
>
> Actually, for an answer to an FAQ that seemingly gets posted twice
> weekly, it was admirably restrained. Certain c.l.p.m regulars might have
> roasted the original message to a crisp (and still might, come to think of
> it).
>
> In general, programmers are irked by postings that can be answered
> by (a) a cursory look through the available documentation, (b) a quick
> search through old Usenet postings for possible answers to their questions,
> or (c) asking the person in the cubicle/desk/lab next door. Forgive us if
> we bite your head off; we were led to assume you weren't using it in the
> first place.
>
> jma
>
We get this question fairly often on the comp.software.year-2000 group
as well. I already knew the answer, coming from a C background, but I
went back to the perlfunc(1) man page to get the quote. Guess what, how
well this is covered must depend on what version of perl you have
installed. At least, the 5.003 version (maybe it is 5.000? Both are on
the machine I was using.) the localtime function mentions that wday and
month are zero based but does not mention mday. It also doesn't refer
you to the ctime(3) man page. I think that it did refer to "struct tm",
but if you knew what that was, you probably wouldn't need to look at
ctime(3) anyway. However, later on this same manpage, in the localtime
section, it does refer you to the ctime(3) manpage. However, even the
more complete discription in the localtime section does not tell you
that mday is the offset from 1900. I believe that this is a defect in
the manpage.
I generally have a low tolerence for people that do not read the
man(uals). If you don't read the man page, how do you know what errors
to trap. [_What_do_you_mean_"you_don't_trap_errors?"_] But in this case,
the person may have read the manpage; it just didn't tell him what it
should have. And, at least he was thinking ahead to 2000-01-01.
xposting to comp.software.year-2000
Randy
--
Speaking only for myself, and even I may not believe it.
797 days to 2000-01-01. Are your systems OK? Are your SURE?
------------------------------
Date: 8 Mar 97 21:33:47 GMT (Last modified)
From: Perl-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin)
Subject: Digest Administrivia (Last modified: 8 Mar 97)
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.
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 1228
**************************************