[13583] in Perl-Users-Digest
Perl-Users Digest, Issue: 993 Volume: 9
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Tue Oct 5 18:06:24 1999
Date: Tue, 5 Oct 1999 15:05:24 -0700 (PDT)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Message-Id: <939161124-v9-i993@ruby.oce.orst.edu>
Content-Type: text
Perl-Users Digest Tue, 5 Oct 1999 Volume: 9 Number: 993
Today's topics:
Re: ActivePerl <cpc999@lzwg02-na.comm.mot.com>
Re: bug or feature? (Matthew Bafford)
Re: bug or feature? <sjohns17@uic.edu>
Calling functions between PerlScript and J*Script djearthling@my-deja.com
Compile my Perl Scripts(s)? but86@my-deja.com
Re: Compile my Perl Scripts(s)? <emschwar@rmi.net>
Re: Converting 1.1.1.1 to blah.foo.com <elaine@chaos.wustl.edu>
Re: Converting 1.1.1.1 to blah.foo.com (Michael Budash)
Re: Counter <cassell@mail.cor.epa.gov>
File exists? <mike@dice.net>
Re: File exists? <emschwar@rmi.net>
Re: File exists? <mike@dice.net>
Re: GDBM access behave differently when called from CG <cassell@mail.cor.epa.gov>
Re: Help! I'm having big trouble searching my database <makkulka@cisco.com>
how does her butt taste? <jb4mt@verbatims.com>
Re: How to avoid reading big file into array ? <dove@synopsys.com>
Re: how to detect running process with perl? <cassell@mail.cor.epa.gov>
Re: how write log files in Perl on NT?? <cassell@mail.cor.epa.gov>
Re: I need a programmer to create gimp driven banner ma <cassell@mail.cor.epa.gov>
Re: installing mod_perl on Apache - What is lgdbm? osinglet@my-deja.com
Re: Loking for a Yahoo-like Perl script <cassell@mail.cor.epa.gov>
Re: Need help with input verifier (Jana Cole or John Sayre)
Re: Need help with input verifier (Larry Rosler)
Re: Newbie question ! <madebeer@igc.apc.org>
News, Apache, and Perl seanleblanc@bigfoot.com
Digest Administrivia (Last modified: 16 Sep 99) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: 5 Oct 1999 14:01:11 GMT
From: "Ralph Grothe" <cpc999@lzwg02-na.comm.mot.com>
Subject: Re: ActivePerl
Message-Id: <01bf0f39$80822ab0$480e7891@be14p072>
Maybe it was due to the typo in content-type print
statement which should be "text/html" rather than
"test/html" ;-)
Apart from this if you are using a Win32 based webserver
you better prepend CRs to the linefeeds, which is the
way Mightgosoft's file system indicates new lines:
print "Content-type: text/html\r\n\r\n";
However you can circumvent these traps by using the
excellent CGI.pm module such as:
use CGI;
$cgi = CGI->new();
print $cgi->header(),"\n",$cgi->start_html('Test'),"\n";
print $cgi->h1('Hello World'),"\n";
print $cgi->end_html();
which will format for you the header automatically
find out about all the flutes and whistles CGI.pm offers by typing:
perldoc CGI
on the command line.
Regards
Ralph
joeyandsherry@mindspring.com schrieb im Beitrag
<7t6kf3$j0m$1@nntp1.atl.mindspring.net>...
> Hello,
>
> Thanks in advance.
>
> I've just installed ActivePerl on my Win98 laptop. I've tried to execute
the
> script below:
>
> print "Content-type: test/html\n\n";
> print "<HTML><HEAD><TITLE>Test</TITLE></HEAD>\n";
> print "<BODY>\n";
> print "Hello World!\n";
> print "</BODY></HTML>\n";
>
> I expected my Web Browser to open up and display Hello World!
> Have I really missed something, What gives?
>
> Any assistance would be greatly appreciated.
>
> Joey
>
>
>
------------------------------
Date: Tue, 05 Oct 1999 19:20:11 GMT
From: *@dragons.duesouth.net (Matthew Bafford)
Subject: Re: bug or feature?
Message-Id: <slrn7vkj50.qo.*@dragons.duesouth.net>
On Tue, 05 Oct 1999 18:58:14 +0200, Alexander Knack <ak@dasburo.de> cut
a telephone line, and tapped the following to comp.lang.perl.misc using
only his tongue:
: why does the following not work?
It does exactly what the Perl documentation says it will. :-)
: $x = '23.24.25';
: @y = split '.', $x;
: print (join " ", @y), "\n";
There are actually two bugs in that program. One of them (the one uri, et
al didn't comment on) is quite obvious if you ask perl to help you out.
You should be running perl with -w.
: *shrug*
HTH,
--Matthew
------------------------------
Date: Tue, 5 Oct 1999 14:31:45 -0500
From: Seth David Johnson <sjohns17@uic.edu>
Subject: Re: bug or feature?
Message-Id: <Pine.A41.4.10.9910051430590.311044-100000@tigger.cc.uic.edu>
On Tue, 5 Oct 1999, Alexander Knack wrote:
> why does the following not work?
Didn't escape the wildcard.
>
> $x = '23.24.25';
> @y = split '.', $x;
@y = split '\.', $x;
> print (join " ", @y), "\n";
>
> *shrug*
-Seth
www.pdamusic.com
------------------------------
Date: Tue, 05 Oct 1999 20:24:27 GMT
From: djearthling@my-deja.com
Subject: Calling functions between PerlScript and J*Script
Message-Id: <7tdmpb$ge6$1@nnrp1.deja.com>
Hello all,
Is it possible to have a server-side script that uses PerlScript and
either JScript or JavaScript , such that the PerlScript can call
J*Script functions, and vice-versa ?
I've done a script that had VBScript using a JScript function, like
this:
<%@ LANGUAGE=VBSCRIPT %>
<HTML>
<HEAD>
<SCRIPT LANGUAGE="jscript" RUNAT="server">
function uncodeproblem(problemtext) {
return unescape(problemtext)
}
</SCRIPT>
...
<%
...
if ( isgood(temptext) ) then
temptext = uncodeproblem(temptext)
end if
----
Trying to do the same thing with PerlScript doesn't work. The error
message I get says "Undefined subroutine &main::uncodeproblem called."
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
Date: Tue, 05 Oct 1999 20:46:33 GMT
From: but86@my-deja.com
Subject: Compile my Perl Scripts(s)?
Message-Id: <7tdo35$hco$1@nnrp1.deja.com>
Hello!
how can i compile my perl scripts for running on a unix or nt machine
(better unix)?
helps the perl2exe tool? or could i (partly) translate it to C ...?
there are many html forms in the scripts. are they still functional
after compiling a script?
i could need some speed improvements and prevent abuse of my scripts. as
long as the source is open, that cant be done in the way i want it.
i am really unexperienced and can need any help
thanks
werner
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
Date: 05 Oct 1999 15:25:59 -0600
From: Eric The Read <emschwar@rmi.net>
Subject: Re: Compile my Perl Scripts(s)?
Message-Id: <xkfu2o5cxef.fsf@valdemar.col.hp.com>
but86@my-deja.com writes:
> how can i compile my perl scripts for running on a unix or nt machine
> (better unix)?
You don't want to do that, but I can see how you'd probably think you
do.
> i could need some speed improvements and prevent abuse of my scripts. as
> long as the source is open, that cant be done in the way i want it.
perlfaq3: How can I make my Perl program run faster?
How can I hide the source for my Perl program?
How can I compile my Perl program into byte code or C?
> i am really unexperienced and can need any help
See the above FAQ entries. "Compiling" Perl isn't going to do what you
want.
-=Eric
--
"Cutting the space budget really restores my faith in humanity. It
eliminates dreams, goals, and ideals and lets us get straight to the
business of hate, debauchery, and self-annihilation."
-- Johnny Hart
------------------------------
Date: Tue, 05 Oct 1999 16:10:46 -0400
From: Elaine -HFB- Ashton <elaine@chaos.wustl.edu>
Subject: Re: Converting 1.1.1.1 to blah.foo.com
Message-Id: <37FA5A90.D15D62DA@chaos.wustl.edu>
Eric The Read wrote:
> Brian Preston <brianpp@us.ibm.com> writes:
> > I supposed I could do a system call to some AIX (unix) function but that
> > would take some looking up and I was wondering if someone knew off the
> > top of there heads.
>
> "I could spend ~30 seconds looking in the manuals for the answer, but I'm
> too lazy, so I'll waste the time and bandwidth of hundreds if not
> thousands of people worldwide because I can't be arsed to do an even
> pathetically small amount of work."
Yet you waste the same time and bandwidth posting a pointless tirade.
This newsgroup has become nothing more than a bunch of arrogant wanking.
Either post the answer, a clue or shut the hell up. Goddammit this gets old.
The original poster may find help by either looking at 'perldoc -f
gethostbyaddr', the Net::DNS module found at
http://search.cpan.org/search?module=Net::DNS or may also look at the
FAQ where there is a brief section on this very thing IIRC.
e.
------------------------------
Date: Tue, 05 Oct 1999 14:06:52 -0700
From: mbudash@sonic.net (Michael Budash)
Subject: Re: Converting 1.1.1.1 to blah.foo.com
Message-Id: <mbudash-0510991406520001@adsl-216-103-91-123.dsl.snfc21.pacbell.net>
In article <37FA5A90.D15D62DA@chaos.wustl.edu>, elaine@chaos.wustl.edu wrote:
>Eric The Read wrote:
>> Brian Preston <brianpp@us.ibm.com> writes:
>> > I supposed I could do a system call to some AIX (unix) function but that
>> > would take some looking up and I was wondering if someone knew off the
>> > top of there heads.
>>
>> "I could spend ~30 seconds looking in the manuals for the answer, but I'm
>> too lazy, so I'll waste the time and bandwidth of hundreds if not
>> thousands of people worldwide because I can't be arsed to do an even
>> pathetically small amount of work."
>
>Yet you waste the same time and bandwidth posting a pointless tirade.
>This newsgroup has become nothing more than a bunch of arrogant wanking.
>Either post the answer, a clue or shut the hell up. Goddammit this gets old.
>
excellent.
--
Michael Budash ~~~~~~~~~~ mbudash@sonic.net
------------------------------
Date: Tue, 05 Oct 1999 14:55:30 -0700
From: David Cassell <cassell@mail.cor.epa.gov>
Subject: Re: Counter
Message-Id: <37FA73D2.E1ED1F49@mail.cor.epa.gov>
Frank de Bot wrote:
> Chris Loeser wrote:
> > Tach Post,
> > ich moechte ganz gerne einen Counter in einem HTML-Dokument haben.
> > 1.Server Side Includes ist bei dem HTTP-Server ausgeschaltet, daher :
> > 2. In einer vorhandenen Seite soll ein Perl-Script aufgerufen werden und
> > die Counterzahl soll in das Dokument eingebunden werden....
> > Hat jemand das schon mal gemacht ??
>
> Maybe if you write your messages in English we could all understand.
Gosh Frank, don't you think that's a little harsh? After all,
not everyone speaks English. And there are a lot of people in
this ng who speak foreign languages. I thought his post was
reasonably clear - perhaps clearer than it would have been if
he had tried to translate his problem into English.
And please don't throw stones while you still live in a glass
house. :-) By which I mean that you posted Jeopardy-style, which
is a no-no in this newsgroup. And you've been here long enough
to know that, too.
HTH,
David
--
David Cassell, OAO cassell@mail.cor.epa.gov
Senior computing specialist
mathematical statistician
------------------------------
Date: Tue, 05 Oct 1999 20:47:28 GMT
From: Mike Heller <mike@dice.net>
Subject: File exists?
Message-Id: <37FA63A3.F7C55ABC@dice.net>
I am writing a script that will take input from an HTML form. The user
will input the location of a file (http://server/path/file.exe) and
submit. I want the script to test if the file exists in the location
provided. I know how to get data from forms, how can I check to see if
the file exists? I read about stat() and lstat() and using the -e
switch but this will only work on the local system, right?
Thanks for your help,
Mike
------------------------------
Date: 05 Oct 1999 15:04:20 -0600
From: Eric The Read <emschwar@rmi.net>
Subject: Re: File exists?
Message-Id: <xkfyadhcyej.fsf@valdemar.col.hp.com>
Mike Heller <mike@dice.net> writes:
> I am writing a script that will take input from an HTML form. The user
> will input the location of a file (http://server/path/file.exe) and
> submit. I want the script to test if the file exists in the location
> provided. I know how to get data from forms, how can I check to see if
> the file exists?
When dealing with the web, it's sometimes (as in this case) easier to
think of it as, "does this resource exist?" rather than "does this file
exist?". The easiest way to go about it is probably to use LWP::Simple
or LWP::UserAgent to issue a HEAD request at that URL.
The major problem, of course, is that only HTTP servers support HEAD
requests-- for FTP you have to use a different strategy, and so on.
> I read about stat() and lstat() and using the -e
> switch but this will only work on the local system, right?
Correct.
-=Eric
--
"Cutting the space budget really restores my faith in humanity. It
eliminates dreams, goals, and ideals and lets us get straight to the
business of hate, debauchery, and self-annihilation."
-- Johnny Hart
------------------------------
Date: Tue, 05 Oct 1999 21:43:29 GMT
From: Mike Heller <mike@dice.net>
Subject: Re: File exists?
Message-Id: <37FA70C5.8AEE0926@dice.net>
Thanks for the help, but I'm still having a problem. My script always prints
"file exists". Here is the script:
#!/usr/bin/perl
use LWP::Simple qw(get head);
require "formlib.prl";
&GetPostArgs;
print "Content-type: text/html\n\n";
print "<BR><BR>\n";
$base_url = $in{'rdplayer'};
print "$base_url: \n<BR>";
if (head($base_url)) {
print "file exists<br>\n";
}
else {
print "file does not exist<br>\n";
}
print "end<br>\n";
Any ideas?
Mike
Eric The Read wrote:
> Mike Heller <mike@dice.net> writes:
> > I am writing a script that will take input from an HTML form. The user
> > will input the location of a file (http://server/path/file.exe) and
> > submit. I want the script to test if the file exists in the location
> > provided. I know how to get data from forms, how can I check to see if
> > the file exists?
>
> When dealing with the web, it's sometimes (as in this case) easier to
> think of it as, "does this resource exist?" rather than "does this file
> exist?". The easiest way to go about it is probably to use LWP::Simple
> or LWP::UserAgent to issue a HEAD request at that URL.
>
> The major problem, of course, is that only HTTP servers support HEAD
> requests-- for FTP you have to use a different strategy, and so on.
>
> > I read about stat() and lstat() and using the -e
> > switch but this will only work on the local system, right?
>
> Correct.
>
> -=Eric
> --
> "Cutting the space budget really restores my faith in humanity. It
> eliminates dreams, goals, and ideals and lets us get straight to the
> business of hate, debauchery, and self-annihilation."
> -- Johnny Hart
--
-----------------------------------------
Mike Heller
Programmer
Destiny Software Productions Inc.
http://www.destiny-software.com
Email: mike@dice.net
-----------------------------------------
------------------------------
Date: Tue, 05 Oct 1999 14:47:40 -0700
From: David Cassell <cassell@mail.cor.epa.gov>
Subject: Re: GDBM access behave differently when called from CGI
Message-Id: <37FA71FC.422787C9@mail.cor.epa.gov>
Laurent.Laperrousaz wrote:
[TomP's unattributed post]
> >When you're having trouble with a CGI program in Perl, you should first
> >look at the please-don't-be-offended-by-the-name Idiot's Guide to solving
> >such problems. It's available on CPAN.
> >
> > http://www.perl.com/CPAN/
> > http://www.cpan.org/
> > http://www.cpan.org/doc/FAQs/cgi/idiots-guide.html
> > http://www.cpan.org/doc/manual/html/pod/
>
> I did of course before posting my request
Good, because 99 and 44 100ths percent of the posters here with
your problem do *not* read the FAQ and work through the
problem-solving guides. I hope you weren't offended.
> I'm testing on the same system
>
> I also thought it was a permission problem, but I use the same user for
> Apache and my standard test
Hmmm. Did you check that it wasn't something obvious?
Like a relative-path problem?
David
--
David Cassell, OAO cassell@mail.cor.epa.gov
Senior computing specialist
mathematical statistician
------------------------------
Date: Tue, 05 Oct 1999 13:49:11 -0700
From: Makarand Kulkarni <makkulka@cisco.com>
Subject: Re: Help! I'm having big trouble searching my database
Message-Id: <37FA6447.83464714@cisco.com>
{
sleepernyc@my-deja.com wrote:
> Uh, right. Oversight.
> http://www.tasteofbrooklyn.com/tob/cgi-bin/dbman/html.pl
This has only the portion of the code that
generates the HTML. The query is done
somewhere else.
--
------------------------------
Date: Tue, 05 Oct 1999 21:36:36 GMT
From: "George Jempty" <jb4mt@verbatims.com>
Subject: how does her butt taste?
Message-Id: <EbuK3.783$ry3.7992@news.rdc1.ne.home.com>
I don't want to piss off the truly helpful people on this board who did not
mind answering my easy question to begin with, but Uri: if I'm so clueless,
how come I got my answer more quickly than it would have taken to sift
through hundreds of earlier posts?
------------------------------
Date: Tue, 05 Oct 1999 13:22:18 -0700
From: David Amann <dove@synopsys.com>
Subject: Re: How to avoid reading big file into array ?
Message-Id: <37FA5DFA.375A3B6@synopsys.com>
Hi there.
> This script wrote data into array. And I can
> not use it when I have a big file.
>
> Would someone help me so that
> it does not have to write data into array ?
Try modifying this script to do what you need to do. It modifies the file
using a temporary file.
Hope this helps,
-=dav
#!/usr/local/bin/perl-5.004 -w
# Always use -w to catch errors.
#
# Author: Dav Amann (dove@synopsys.com)
# Version: 1.0
#
use strict; # Always use strict.
my $first_path = "firstfile.txt";
my $second_path = "secondfile.txt";
my $tmp_path = "tmp.txt";
my $comment_char = ";";
my %remove_no_ext;
open (START, "$first_path")
or die "Can't open $first_path: $!\n";
open (REMOVE, "$second_path")
or die "Can't open $second_path: $!\n";
open (TEMP, ">$tmp_path");
# This is the same as an earlier script but rather than using an array
# to store the file, it will write it to a temporary file.
# Get the lines to remove. We could put the remove lines into a
# @remove array, but then we'd have to loop over it for every line in
# our START file. By putting it into a hash, we only have to loop
# over it once, and can use the 'exists' command. This should make
# things run faster.
while (<REMOVE>) {
# Here's a way to create a hash table with just the filename, and
# no extension.
my ($line_no_ext, $ext) = split(/\./, $_);
$remove_no_ext{$line_no_ext}++;
}
while (<START>) {
# Now we parse the $_ variable to get the line with no ext.
my ($line_no_ext, $ext) = split(/\./, $_);
if (exists $remove_no_ext{$line_no_ext}) {
print TEMP $comment_char . $_;
} else {
print TEMP $_;
}
}
# close our files;
close TEMP or die "Can't close $tmp_path: $!\n";
close REMOVE or die "Can't close $second_path: $!\n";
close START or die "Can't close $first_path: $!\n";
# rename our files and create a backup.
rename ($first_path, "$first_path.bak");
rename ($tmp_path, $first_path);
------------------------------
Date: Tue, 05 Oct 1999 14:51:35 -0700
From: David Cassell <cassell@mail.cor.epa.gov>
Subject: Re: how to detect running process with perl?
Message-Id: <37FA72E7.DAE5A536@mail.cor.epa.gov>
[Excuse me, but posting TEST messages in this newsgroup is considered
rude. And posting multiple copies of the same message is considered
to be an error. Please don't do either again. TIA.]
Xiaoyan Liu wrote:
>
> Hi,
>
> In my CGI script, there is the need to detect whether a certain server
> application
> is running before sending the client request. If not, it has to be
> started once.
>
> How to do this with Perl?
Pretty much the same way you would in *any* language. But
I can't give you more useful guidance, since you showed us
no code and gave us no information about what sort of server
you are looking at. A webserver? A mail server? An NIS server?
An NNTP server? A database server? A server for specific
apps? These are not the same.
David
--
David Cassell, OAO cassell@mail.cor.epa.gov
Senior computing specialist
mathematical statistician
------------------------------
Date: Tue, 05 Oct 1999 15:02:38 -0700
From: David Cassell <cassell@mail.cor.epa.gov>
Subject: Re: how write log files in Perl on NT??
Message-Id: <37FA757E.5D2EA719@mail.cor.epa.gov>
acunet3278@my-deja.com wrote:
>
> How can I program a perl script for NT to open a text file?
>
> The script prints a persistant error message:
> "PerlScript: ERROR writing examp_logfile.txt"
Not that helpful, is it? Let's see...
> Specificaly, I am trying to run the vote.pl perl script
> at http://pucho.com/asp/vote/example.html
That may not be the best Perl script on the planet, you know.
> The snippet of vote.pl code that prints the error in question:
> ##Writing $logfile
> if (!open(handle3, ">$logfile")) {printError("ERROR writing
> $logfile\n");}
Oooh. Filehandles should be in all caps, so Perl knows
they are not barewords. I don't like the style either.
And you might get more help if you insert the magic bit $!
in between 'logfile' and '\n' there at the end. That may
tell you what the problem is, so you can more easily correct
it. It may be permissions. It may be a relative path.
It may be something else. We can't tell based on the given
info.
[snip of other stuff]
> About this freeware script. It can be found at:
> http://www.datacomm.ch/atair/perlscript/
Thanks for the warning.
> Can you kindly share your experience with me?
> What has to be modified to make it work? Does NT require special
> permissions for Perl scripts to write log files?
> Does the vote.pl code have to be changed?
Make the change I suggested above. Then see what
results you get. Perhaps the problem will be spelled
out for you.
> About this webserver:
> pucho.com is a virtual MS IIS v4 webserver is running on NT.
I'll take the Fifth here...
> The ISP is using the following Perl version:
> C:\WINNT\system32\inetsrv\PERL\bin>perl -v
> This is perl, version 5.003_07
But not here. Suggest to your ISP that he/she/it/they
upgrade to the current stable version. 5.005_03
David
--
David Cassell, OAO cassell@mail.cor.epa.gov
Senior computing specialist
mathematical statistician
------------------------------
Date: Tue, 05 Oct 1999 14:42:31 -0700
From: David Cassell <cassell@mail.cor.epa.gov>
Subject: Re: I need a programmer to create gimp driven banner maker
Message-Id: <37FA70C7.2A6A666F@mail.cor.epa.gov>
> Don Muller wrote:
>
> Hello,
>
> I am looking for someone to create a gimp driven banner maker for online
> website use. This could be a pay job, or , if you are good at such things, a %
> in the biz.
>
> e-mail me your contact information
Please don't post jobs here.
Please don't post using MIME.
Please don't do the email-instead-of-posting thing.
And please don't make nay more of those hideously annoying
banners. I try to avoid sites which have them. And they
appear to be utterly useless in terms of advertising revenue.
David
--
David Cassell, OAO cassell@mail.cor.epa.gov
Senior computing specialist
mathematical statistician
------------------------------
Date: Tue, 05 Oct 1999 21:25:50 GMT
From: osinglet@my-deja.com
Subject: Re: installing mod_perl on Apache - What is lgdbm?
Message-Id: <7tdqch$j5r$1@nnrp1.deja.com>
It is RedHat 6.0 and there does seem to be a problem with gdbm. I
couldn't get mod_perl to install at all but after a bit of investigation
and a guess I got it to work by uninstalling the gdbm from the RPM and
reinstalling it. This got mod_perl to install but I suspect it is still
a bit wonkey. As part of my attempts to get mod_perl to work I tried
compiling Perl rather than using the RPM. The test harness reports that
a test in the anyDBM module is failing. For good measure I'll do what
you suggest and download and complile gdbm.
If anything this excercise has again taught me that doing it yourself
always works best. The RPM concept is a good one but it seems to mask
problems. From now on I'll be compiling from the source.
Thanks
Owen
In article <MWeK3.170$xs2.6119@nsw.nnrp.telstra.net>,
mgjv@comdyn.com.au (Martien Verbruggen) wrote:
> On Wed, 29 Sep 1999 21:25:17 GMT,
> osinglet@my-deja.com <osinglet@my-deja.com> wrote:
> > Hi,
> >
> > I'm trying to install mod_perl and PHP3 1.30.12 on Apache 1.3.9.
I'm
> > getting the following output when I'm configuring it. It seems to
have
> > something to a missing thing called lgdbm, but I don't know what
that
> > is.
> >
> > Here is the output from the configure script:
> >
> > /usr/lib/perl5/5.00503/i386-linux/auto/DynaLoader/DynaLoader.a
> > -L/usr/lib/perl5/5.00503/i386-linux/CORE -lperl -lnsl -lndbm -lgdbm
-ldb
> > -ldl -lm -lc -lposix -lcrypt
>
> linux hmm? If this is RedHat 6.0 don't bother installing the gdbm
> package that comes with the distribution. It's broken. Just get gdbm
> from gnu.org, and compile and install it.
>
> Martien
> --
> Martien Verbruggen |
> Interactive Media Division |
> Commercial Dynamics Pty. Ltd. | "Mr Kaplan. Paging Mr Kaplan..."
> NSW, Australia |
>
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
Date: Tue, 05 Oct 1999 14:39:50 -0700
From: David Cassell <cassell@mail.cor.epa.gov>
Subject: Re: Loking for a Yahoo-like Perl script
Message-Id: <37FA7026.6DB4D45@mail.cor.epa.gov>
Perulinks wrote:
>
> Hello there,
>
> I am looking for a Perl scripts that works as a search engine and directory.
There are lost of web-search scripts on the Internet. You
can even use Yahoo to search for some. Or you could go to
a place like freshmeat.net to look.
But don't assume you'll get the power of Yahoo. Not unless you
get:
[1] a much better script than what is available without paying
big bucks;
[2] a *lot* more horsepower; and
[3] an awful lot more storage space than you have.
> It must remove dead links authomatically.
Can't do that. You cannot tell whether a link is dead without
going there and checking it _right_now_. So your search
script can never be 100% up-to-date. Dead links have to be
tested on a regualr basis, in which case it is the same problem
as searching a list of URLs to see if they are up.
David
--
David Cassell, OAO cassell@mail.cor.epa.gov
Senior computing specialist
mathematical statistician
------------------------------
Date: Tue, 05 Oct 1999 20:56:19 GMT
From: quikscor@ix.netcom.com (Jana Cole or John Sayre)
Subject: Re: Need help with input verifier
Message-Id: <37fa6480.984832@nntp.ix.netcom.com>
I take all the credit! And to think I just read the book three days
ago!
This is my second post to this group, and I swear, this is the most
sarcastic newsgroup that I've ever posted to, and I've posted to
_many, many_ newsgroups........
Seriously, I truly appreciate the feedback. I always have my goal in
mind, and I don't always focus on elegance in getting there. If you
would be so kind, could you rewrite the code so I can see how it
should be done? I mean that sincerely. I am new to Perl, I've done
plenty of C++ and Java, but I just started reading the Perl book less
than a week ago and could really use the example of someone who knows
the language.
On Tue, 5 Oct 1999 10:30:49 -0700, lr@hpl.hp.com (Larry Rosler) wrote:
>In article <37f9f1c9.2777093@nntp.ix.netcom.com> on Tue, 05 Oct 1999
>12:49:36 GMT, Jana Cole or John Sayre <quikscor@ix.netcom.com> says...
>...
>> I copied this verification code from Flanagan's JavaScript book, but I
>> can't get it to work for me. Maybe the way I'm inbedding it in the
>> Perl, I don't know. Also, I'm not sure if this should be posted here
>> or on a JavaScript newsgroup.
>
>...
>
>> $month = (qw(1 2 3 4 5 6 7 8 9 10 11 12)) [(localtime)[4]];
>> $day = (qw(0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
>> 22 23 24 25 26 27 28 29 30 31)) [(localtime)[3]];
>> $year = (localtime)[5];
>> if ($year > 99)
>> {
>> $year = year - 100;
>> }
>> $todays_date = "$month/$day/$year";
>
>I'm not responding to your question, just commenting on the Perl code.
>I don't know who deserves the credit, you or the book you refer to.
>
>Words have never failed me before, so I'll try to express my admiration
>clearly:
>
>a. Three calls to localtime instead of one.
>
>b. Two lookups in arrays of sequential integers, spelled out instead of
>using ranges. (The brilliance of this might have been harder to spot if
>there were ranges.) Probably the intent is to convert integers into
>strings, which Perl does quite handily on its own.
>
>c. Subtraction instead of mod. (This introduces a Y2.1K problem. :-)
>
>--
>(Just Another Larry) Rosler
>Hewlett-Packard Laboratories
>http://www.hpl.hp.com/personal/Larry_Rosler/
>lr@hpl.hp.com
------------------------------
Date: Tue, 5 Oct 1999 14:28:04 -0700
From: lr@hpl.hp.com (Larry Rosler)
Subject: Re: Need help with input verifier
Message-Id: <MPG.12640d3acff2a65c98a03b@nntp.hpl.hp.com>
In article <37fa6480.984832@nntp.ix.netcom.com> on Tue, 05 Oct 1999
20:56:19 GMT, Jana Cole or John Sayre <quikscor@ix.netcom.com> says...
[Rearranged so comments are after the things commented on.]
> On Tue, 5 Oct 1999 10:30:49 -0700, lr@hpl.hp.com (Larry Rosler) wrote:
> >In article <37f9f1c9.2777093@nntp.ix.netcom.com> on Tue, 05 Oct 1999
> >12:49:36 GMT, Jana Cole or John Sayre <quikscor@ix.netcom.com> says...
...
> >> $month = (qw(1 2 3 4 5 6 7 8 9 10 11 12)) [(localtime)[4]];
> >> $day = (qw(0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
> >> 22 23 24 25 26 27 28 29 30 31)) [(localtime)[3]];
> >> $year = (localtime)[5];
> >> if ($year > 99)
> >> {
> >> $year = year - 100;
> >> }
> >> $todays_date = "$month/$day/$year";
...
> ... If you would be so kind, could you rewrite the code so I can see
> how it should be done?
The first two lines are intended to start you off with good Perl habits.
#!/usr/bin/perl -w
use strict;
my ($day, $month, $year) = (localtime)[3 .. 5]; # array slice
++$month; # change from 0-11 to 1-12
$year %= 100; # reduce to two digits max
my $todays_date = "$month/$day/$year";
print "$todays_date\n";
__END__
In about 90 days, that will print '1/1/0'. If you would like two-digit
formatting with leading zeros, use this:
my $todays_date = sprintf '%.2d/%.2d/%.2d', $month, $day, $year;
> >--
Your newsreader should be able to cut out signatures. If not, please do
it yourself.
--
(Just Another Larry) Rosler
Hewlett-Packard Laboratories
http://www.hpl.hp.com/personal/Larry_Rosler/
lr@hpl.hp.com
------------------------------
Date: Tue, 05 Oct 1999 09:48:21 -0700 (PDT)
From: Michael de Beer <madebeer@igc.apc.org>
Subject: Re: Newbie question !
Message-Id: <APC&1'0'50775dd1'c15@igc.apc.org>
>I am pretty new to perl and would like some help.
>In Benchmark, what is the "iterations" ?
The number of times the chunk of code is run. The dictionary has a more
nuanced definition.
>From basic definition, I understand it is a loop.
Yes.
>Why do I need iterations - can I not make do with only one iteration ?
Oftentime each action is so small, it is more accurately measured in
large quantitities. Imagine weighing 10,000,000 flees or just one flee?
Which will need fine-tuned instruments to give an accurate average
weight of the flee?
Which will be more influenced by interfering data, like the weight of
dust on the scale? There is a whole branch of statistics that attempts
to gauge what is enough data to be relevant. A sample size of one is
generally not enough.
>Or is it that the more the number of iterations, the more accurate is
>the result ?
Yes.
-Mike, confirming you answers.
------------------------------
Date: Tue, 05 Oct 1999 19:51:17 GMT
From: seanleblanc@bigfoot.com
Subject: News, Apache, and Perl
Message-Id: <7tdkrf$f0u$1@nnrp1.deja.com>
I wanted to find a way to download articles from a news server (NNTP),
and then use a browser front-end to search the articles. Now, is what
I'm trying to do already done? If so, I'd rather not waste my time.
I have the part where it gets the articles, but that's as far as I got
- which isn't very far. The reason I'm doing this is because I need
to read some private newsgroups (not indexed by deja.com, in other
words).
Any and all help appreciated,
Sean LeBlanc - sleblanc@amivisions.com
seanleblanc@bigfoot.com
sean_leblanc@hotmail.com
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
Date: 16 Sep 99 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin)
Subject: Digest Administrivia (Last modified: 16 Sep 99)
Message-Id: <null>
Administrivia:
The Perl-Users Digest is a retransmission of the USENET newsgroup
comp.lang.perl.misc. For subscription or unsubscription requests, send
the single line:
subscribe perl-users
or:
unsubscribe perl-users
to almanac@ruby.oce.orst.edu.
| NOTE: The mail to news gateway, and thus the ability to submit articles
| through this service to the newsgroup, has been removed. I do not have
| time to individually vet each article to make sure that someone isn't
| abusing the service, and I no longer have any desire to waste my time
| dealing with the campus admins when some fool complains to them about an
| article that has come through the gateway instead of complaining
| to the source.
To submit articles to comp.lang.perl.announce, send your article to
clpa@perl.com.
To request back copies (available for a week or so), send your request
to almanac@ruby.oce.orst.edu with the command "send perl-users x.y",
where x is the volume number and y is the issue number.
For other requests pertaining to the digest, send mail to
perl-users-request@ruby.oce.orst.edu. Do not waste your time or mine
sending perl questions to the -request address, I don't have time to
answer them even if I did know the answer.
------------------------------
End of Perl-Users Digest V9 Issue 993
*************************************