[16882] in Perl-Users-Digest
Perl-Users Digest, Issue: 4294 Volume: 9
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Tue Sep 12 06:05:33 2000
Date: Tue, 12 Sep 2000 03:05:10 -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: <968753110-v9-i4294@ruby.oce.orst.edu>
Content-Type: text
Perl-Users Digest Tue, 12 Sep 2000 Volume: 9 Number: 4294
Today's topics:
ActivePerl Build 617 ISAPI not working. <mike.reid@scomagg.co.uk>
Re: Change Windows Desktop BG (Homer Simpson)
Error message <abel@inlander.es>
Re: Error message <elephant@squirrelgroup.com>
Re: Error message (Gwyn Judd)
Re: File Upload using a require .pm <anders@wall.alweb.dk>
gcc, compiling perl, and ld mpressnall@my-deja.com
Re: help in writing a card game (Tony L. Svanstrom)
Re: help in writing a card game <godzilla@stomp.stomp.tokyo>
Re: Holy moly! Substitution on 10-kb scalar takes over <bart.lateur@skynet.be>
Re: how to match the hole string by first word? (need h <anmcguire@ce.mediaone.net>
Re: how to match the hole string by first word? (need h <monty@primenet.com>
Re: How to set userid of a forked process <pinin@xchain.com>
If you can write this script or help out let me know (Valkhorn)
Re: If you can write this script or help out let me kno <elephant@squirrelgroup.com>
Re: Incremental HTML output as script is running <Peter.Dintelmann@dresdner-bank.com>
Re: Is there a file rename function? <kenn_mar@hotmail.com>
Re: memory deallocation (Eric Bohlman)
Need help of installing mod_perl <lgao@cs.mcgill.ca>
Re: Need help of installing mod_perl huw_watkins@my-deja.com
Re: Need help of installing mod_perl <bill.kemp@wire2.com>
Re: Not matching regex strings <tina@streetmail.com>
Re: Perl substraction weird result <colapso@usa.net>
Re: Perl substraction weird result <bcaligari@my-deja.com>
Re: Perl substraction weird result (Gwyn Judd)
Digest Administrivia (Last modified: 16 Sep 99) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Tue, 12 Sep 2000 08:35:37 +0100
From: "Mike Reid" <mike.reid@scomagg.co.uk>
Subject: ActivePerl Build 617 ISAPI not working.
Message-Id: <8pkmaa$vk8$1@news5.svr.pol.co.uk>
Hi,
I am developing some CGI based web pages on Windows 2000 / IIS 5, and
recently upgraded from ActivePerl Build 613 to Build 617.
I upgraded because I wanted to have the ability to create PerlScript Active
Server Pages as well as the ability to run perl scripts to produce HTML
(using ISAPI). The upgrade worked - I can now run PerlScript in pages, but
it has broken my ability to run scripts directly.
Now, whenever I try to run a page with a .pl extension, I get error 404 page
not found (even by clicking on the file in the directory listing produced by
the server).
Does anyone know how to re-register the ISAPI extensions correctly?
--
Mike Reid
Systems Engineer
Scomagg Ltd.
+44 1224 707700
------------------------------
Date: 12 Sep 2000 04:14:12 GMT
From: homer.simpson@springfield.nul (Homer Simpson)
Subject: Re: Change Windows Desktop BG
Message-Id: <8pkaik$fi0$0@216.39.140.70>
In article <39BD3418.EF377E9D@draper.com>, "James M. Luongo" <jluongonospam@draper.com> wrote:
>How would I use Perl for Windows to randomly change my windows desktop
>background each time I logged into my computer?
glob %windir% for *.bmp
put the files into an array
gen a random number
copy that file to wallpaper.bmp
Set Windows to use whatever file is called Wallpaper.bmp as your background.
Or download WebShots ... which has nothing to do with Perl but is really cool
and free.
------------------------------
Date: Tue, 12 Sep 2000 07:33:52 GMT
From: Abel Almazan <abel@inlander.es>
Subject: Error message
Message-Id: <39BDDC36.E487CA61@inlander.es>
Hi,
I use ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) =
gmtime(time);
But when i execute the perl script, i get the next error message:
Global symbol "$sec" requires explicit package name at postal.pl line
10.
Global symbol "$min" requires explicit package name at postal.pl line
10.
Global symbol "$hour" requires explicit package name at postal.pl line
10.
Global symbol "$mday" requires explicit package name at postal.pl line
10.
Global symbol "$mon" requires explicit package name at postal.pl line
10.
Global symbol "$year" requires explicit package name at postal.pl line
10.
Global symbol "$wday" requires explicit package name at postal.pl line
10.
Global symbol "$yday" requires explicit package name at postal.pl line
10.
Global symbol "$isdst" requires explicit package name at postal.pl line
10.
Execution of postal.pl aborted due to compilation errors.
What happens??
I have other perl running on other machine that use this function and it
works
------------------------------
Date: Tue, 12 Sep 2000 19:06:43 +1100
From: jason <elephant@squirrelgroup.com>
Subject: Re: Error message
Message-Id: <MPG.14288112f0824b25989789@localhost>
Abel Almazan <abel@inlander.es> wrote ..
>Hi,
>
>I use ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) =
>gmtime(time);
>
>But when i execute the perl script, i get the next error message:
>
>Global symbol "$sec" requires explicit package name at postal.pl line
>10.
>Global symbol "$min" requires explicit package name at postal.pl line
>10.
>Global symbol "$hour" requires explicit package name at postal.pl line
>10.
>Global symbol "$mday" requires explicit package name at postal.pl line
>10.
>Global symbol "$mon" requires explicit package name at postal.pl line
>10.
>Global symbol "$year" requires explicit package name at postal.pl line
>10.
>Global symbol "$wday" requires explicit package name at postal.pl line
>10.
>Global symbol "$yday" requires explicit package name at postal.pl line
>10.
>Global symbol "$isdst" requires explicit package name at postal.pl line
>10.
>Execution of postal.pl aborted due to compilation errors.
>
>What happens??
>
>I have other perl running on other machine that use this function and it
>works
did you maybe add 'use strict;' to the start of that script recently ?
those errors are from the strict module because you haven't declared any
of those variables using 'my' so it's expecting an explicit package name
.. eg. $main::sec, $main::min, etc.
see the perlsub section of the documentation .. and maybe perlfaq7:
"What's the difference between dynamic and lexical (static) scoping?
Between local() and my()?"
perldoc perlsub
perldoc -q local.*my
--
jason -- elephant@squirrelgroup.com --
------------------------------
Date: Tue, 12 Sep 2000 09:07:09 GMT
From: tjla@guvfybir.qlaqaf.bet (Gwyn Judd)
Subject: Re: Error message
Message-Id: <slrn8rrshq.aqg.tjla@thislove.dyndns.org>
I was shocked! How could Abel Almazan <abel@inlander.es>
say such a terrible thing:
>Hi,
>
>I use ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) =
>gmtime(time);
>
>But when i execute the perl script, i get the next error message:
>
>Global symbol "$sec" requires explicit package name at postal.pl line
>10.
[gwyn@thislove:~]$ splain
/usr/local/bin/splain: Reading from STDIN
Global symbol "$sec" requires explicit package name at postal.pl line
10.
Global symbol "$sec" requires explicit package name at postal.pl line 10
(#1)
(F) You've said "use strict vars", which indicates that all
variables
must either be lexically scoped (using "my"), declared beforehand
using
"our", or explicitly qualified to say which package the global
variable
is in (using "::").
--
Gwyn Judd (print `echo 'tjla@guvfybir.qlaqaf.bet' | rot13`)
DEJEUNER
n. The breakfast of an American who has been in Paris. Variously pronounced.
------------------------------
Date: Tue, 12 Sep 2000 07:37:35 GMT
From: Anders Lund <anders@wall.alweb.dk>
Subject: Re: File Upload using a require .pm
Message-Id: <33lv5.420$Tn3.8162@news010.worldonline.dk>
grover_muppit@hotmail.com wrote:
> I have an file upload quirk that is baffling me and I hope someone can
> help.
>
> A simple explanation of the problem is as such:
>
> I have a PERL CGI which has come code like the following:
>
> my $file_name = $q->param('uploadfile');
>
> print "<h2>File: $file_name</h2>";
>
> while (my $line = <$file_name>) {
> print "$line<br>";
> }
>
>
> THIS WORKS FINE! Prints the contents of the text file uploaded through
> the HTML form.
>
> BUT ..... if I wish to take this code and place it into a PERL module
> such as:
>
> #! /usr/local/pd/bin/perl5
> package file_stuff;
> require Exporter;
> @ISA = qw(Exporter);
> @EXPORT = qw(upload_file);
>
> sub upload_file { my($file_name) = @_;
>
> print "<h2>File: $file_name</h2>";
>
> while (my $line = <$file_name>) {
> print "$line<br>";
> }
> }
>
> 1;
>
>
>
> AND then in the CGI program use the following:
>
> require 'file_stuff.pm';
>
> &file_stuff::upload_file($file_name);
>
>
> It does not print the file contents.
>
> If I instead use a .pl instead of a .pm as follows:
>
> #! /usr/local/pd/bin/perl5
> sub upload_file { my($file_name) = @_;
>
> print "<h2>File: $file_name</h2>";
>
> while (my $line = <$file_name>) {
> print "$line<br>";
> }
> }
>
> AND then in the CGI program use the following:
>
> require 'file_stuff.pl';
>
> &upload_file($file_name);
>
> It works!
>
>
> So, after all that ..... can someone expain to me why the PERL module
> is not working as I am expecting it to??
>
>
> Sent via Deja.com http://www.deja.com/
> Before you buy.
Read the CGI documentation.
CGI delivers the filename as a file handle, but by passing it to your
module, you turn it into a string.
-anders
--
[ the word wall - and the trailing dot - in my email address
is my _fire_wall - protecting me from the criminals abusing usenet]
------------------------------
Date: Tue, 12 Sep 2000 04:09:15 GMT
From: mpressnall@my-deja.com
Subject: gcc, compiling perl, and ld
Message-Id: <8pka8t$8gb$1@nnrp1.deja.com>
Hey There --
Trying to compile perl on an Intel Solaris 8 box with gcc as the
compiler.
Going through the Configure routine, I get:
========================================================
Use which C compiler? [gcc] gcc
Checking for GNU cc in disguise and/or its version number...
*** WHOA THERE!!! ***
Your C compiler "gcc" doesn't seem to be working!
You'd better start hunting for one and let me know about it.
========================================================
gcc works fine but I read somewhere else that for Perl to compile fine,
the output of:
$perl -V:ld should be:
$ld='gcc'; mine is:
ld='cc';
Anyone know where to make the appropriate change so that ld knows to use
gcc?
TIA,
Matt
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
Date: Tue, 12 Sep 2000 07:12:06 +0200
From: tony@svanstrom.com (Tony L. Svanstrom)
Subject: Re: help in writing a card game
Message-Id: <1egu3x4.1teqeei1c9iwj6N%tony@svanstrom.com>
Kelley Kent <kelley.a.kent@intel.com> wrote:
> With regards to the deck: At first a 2 dimension array seemed ok
> (rows=suits, columns=values), and then 4 seperate arrays (one for each
> suit) seemed that it might be a better solution, then of course a hash
> table came to mind. But neither of these solutions had anything really
> going for it, in my mind.
Why complicate it like that? This might not be the best solution
RNG-wise (it sucks when it comes to the RNG), but it's a simple example
on how to get a randomish deck:
@vars =
('2s','3s','4s','5s','6s','7s','8s','9s','Ts','Js','Qs','Ks','As',
'2d','3d','4d','5d','6d','7d','8d','9d','Td','Jd','Qd','Kd','Ad',
'2c','3c','4c','5c','6c','7c','8c','9c','Tc','Jc','Qc','Kc','Ac',
'2h','3h','4h','5h','6h','7h','8h','9h','Th','Jh','Qh','Kh','Ah');
for (@vars) {
{ redo if $h{$r = int rand @vars}++ }
push(@NewVars, $vars[$r]);
}
$i = 1;
foreach (@NewVars[0..@vars-1]) {print $i++ . ": $_\n"};
/Tony
--
/\___/\ Who would you like to read your messages today? /\___/\
\_@ @_/ Protect your privacy: <http://www.pgpi.com/> \_@ @_/
--oOO-(_)-OOo---------------------------------------------oOO-(_)-OOo--
on the verge of frenzy - i think my mask of sanity is about to slip
---ôôô---ôôô-----------------------------------------------ôôô---ôôô---
\O/ \O/ ©99-00 <http://www.svanstrom.com/?ref=news> \O/ \O/
------------------------------
Date: Mon, 11 Sep 2000 23:43:37 -0700
From: "Godzilla!" <godzilla@stomp.stomp.tokyo>
Subject: Re: help in writing a card game
Message-Id: <39BDD099.E54FDD01@stomp.stomp.tokyo>
"Tony L. Svanstrom" wrote:
> Kelley Kent wrote:
> > With regards to the deck: At first a 2 dimension array seemed ok
> > (rows=suits, columns=values), and then 4 seperate arrays (one for each
> > suit) seemed that it might be a better solution, then of course a hash
> > table came to mind. But neither of these solutions had anything really
> > going for it, in my mind.
> Why complicate it like that? This might not be the best solution
> RNG-wise (it sucks when it comes to the RNG), but it's a simple example
> on how to get a randomish deck:
(snipped code)
I am going to enjoy this thread having more
expertise at this than anyone here. Actually,
I believe nobody here has any expertise in
this area of Perl.
Lots faster to deal with numbers only and pick
cards at random. No need for a randomized deck,
consisting of an array of mix of numbers and
letters, yes? Actually, no need for this type
of array at all. Simply pick cards at random.
Godzilla!
--
Average successful requests per day: 1,058
Average data transferred per day: 8.391 Mbytes
How popular is your homepage?
------------------------------
Date: Tue, 12 Sep 2000 08:40:00 GMT
From: Bart Lateur <bart.lateur@skynet.be>
Subject: Re: Holy moly! Substitution on 10-kb scalar takes over *one second*!
Message-Id: <qnqrrs4jsg0119i9lur0v8lhfmaggtgtj0@4ax.com>
Ilya Zakharevich wrote:
> $_ = "a" x 70 . "\n"; $_ x= 100; $_ .= "\t"; /.*?\t/
Replacing ".*?" with "[^\t\n]*" in the regex surely helps. I get a
speedup of at least a factor of 100000 on the above test string.
--
Bart.
------------------------------
Date: Mon, 11 Sep 2000 23:32:34 -0500
From: "Andrew N. McGuire " <anmcguire@ce.mediaone.net>
Subject: Re: how to match the hole string by first word? (need help)
Message-Id: <Pine.LNX.4.21.0009112309200.21124-100000@hawk.ce.mediaone.net>
On Tue, 12 Sep 2000, Gwyn Judd quoth:
GJ> I was shocked! How could Larry Rosler <lr@hpl.hp.com>
GJ> say such a terrible thing:
GJ> >In article <39BCFF74.9762CE52@nwu.edu> on Mon, 11 Sep 2000 10:51:16 -
GJ> >0500, Alexandr Kogan <a-kogan@nwu.edu> says...
GJ> >
GJ> >...
GJ> >
GJ> >> I need to go through a huge text file find strings that start with
GJ> >> the same word and convert the whole line to lowercase. I'm having
GJ> >> problems getiing a hold of a whole string, that's what I'm doing:
GJ> >>
GJ> >> while (<INPUT>) {
GJ> >> if ($s =~ /^objectclass: /i) {
GJ> >> chop $_;
GJ> >> $_ = lc($_);
GJ> >> print OUTPUT $_;}
GJ> >> else {print OUTPUT $_;}
GJ> >> }
GJ> >>
GJ> >> Could someone tell me what is wrong and how to do it right?
GJ> >
GJ> >Good answers are already posted. This is for the folks who object to
GJ> >compact syntax, including the ternary conditional operator:
GJ> >
GJ> > print OUTPUT /^objectclass: /i ? lc : $_ while <INPUT>;
GJ> >
GJ> >This is 'clean' Golf -- clear, expressive, no superfluities.
GJ>
GJ> how about:
GJ>
GJ> perl -wpe 's/^(objectclass: .*)/lc $1/ie' < input > output
Or shorter, a wee bit harder to read, but without the io redirection:
perl -wpi -e 's~^objectclass: .*~\L$&~i' file
or, of course with backup:
perl -wpi.bak -e 's~^objectclass: .*~\L$&~i' file
There is plenty of overhead incurred by use of $&, and Larry's is
still prettier.
Best Wishes!
anm
--
BEGIN { $\ = $/; $$_ = $_ for qw~ just another perl hacker ~ }
my $J = sub { return \$just }; my $A = sub { return \$another };
my $P = sub { return \$perl }; my $H = sub { return \$hacker };
print map ucfirst() . " " => ${&$J()}, ${&$A()}, ${&$P()}, ${&$H()};
------------------------------
Date: 12 Sep 2000 06:57:31 GMT
From: Jim Monty <monty@primenet.com>
Subject: Re: how to match the hole string by first word? (need help)
Message-Id: <8pkk4r$si8$1@nnrp2.phx.gblx.net>
Gwyn Judd <tjla@guvfybir.qlaqaf.bet> wrote:
> Larry Rosler <lr@hpl.hp.com> wrote:
> > Alexandr Kogan <a-kogan@nwu.edu> wrote:
> > > I need to go through a huge text file find strings that start with
> > > the same word and convert the whole line to lowercase. I'm having
> > > problems getiing a hold of a whole string, that's what I'm doing:
> > >
> > > while (<INPUT>) {
> > > if ($s =~ /^objectclass: /i) {
> > > chop $_;
> > > $_ = lc($_);
> > > print OUTPUT $_;}
> > > else {print OUTPUT $_;}
> > > }
> > >
> > > Could someone tell me what is wrong and how to do it right?
> >
> > Good answers are already posted. This is for the folks who object to
> > compact syntax, including the ternary conditional operator:
> >
> > print OUTPUT /^objectclass: /i ? lc : $_ while <INPUT>;
> >
> > This is 'clean' Golf -- clear, expressive, no superfluities.
>
> how about:
>
> perl -wpe 's/^(objectclass: .*)/lc $1/ie' < input > output
The substitution, use of regular expression memory, and eval are
expensive and unnecessary.
perl -pe '$_ = lc if /^objectclass: /i'
But, then, so too is the assignment to $_. There's always this
little abomination:
perl -pe 'print lc and goto LINE if /^objectclass: /i'
But Larry's version is the clear winner [double entendre intended].
Here it is with -n instead of ... while <>:
perl -ne 'print /^objectclass: /i ? lc : $_'
--
Jim Monty
monty@primenet.com
Tempe, Arizona USA
------------------------------
Date: Tue, 12 Sep 2000 11:16:34 +0300
From: pinin <pinin@xchain.com>
Subject: Re: How to set userid of a forked process
Message-Id: <39BDE662.486F88FC@xchain.com>
sherry wrote:
> Hi ,
>
> Problem: I would like to run a script as root, and find all users of a
> machine and
> run a program as each user. All these users are non privileged users.
>
> I would like to fork a process, set userid of that process as userA and
> exec programA.
> How can I do this?
use "POSIX" module with "setuid" function
------------------------------
Date: 12 Sep 2000 04:10:36 GMT
From: valkhorn@aol.com (Valkhorn)
Subject: If you can write this script or help out let me know
Message-Id: <20000912001036.01129.00000838@ng-cr1.aol.com>
Hi. My name is Wilhelm Valkhorn and I am currently working on and desigining a
brand new hosting site and am stuck in the mud with a current task that I need
a script for.
Unfortunately I cannot find anyone (YET) that can do it for me so I'm hoping
one of you guys here can assist.
In this hosting site I plan to have quite a bit of content but what I would
really like to have is a bunch of cheat codes and the only way that I can
really get enough of them to compete with the big guys is to "steal" their
content somehow.
What I need for a script is something that can spider through a site like
gamewinners.com or cheatcc.com and pull out all of the information regarding
cheat codes and copy them to my server.
Once the data is retrieved I need the script to somehow keep track of what
pages are built, build them on the server (so that no extra CGI is called) and
check the other sites for new data and refresh it whenever any new data is
found.
When it builds the pages, it would help to somehow create an indexed listing of
all the cheat codes per console too.
The ultimate version of this would not only get the codes, but rummage through
5 or so sites daily/weekly to get EVERY SINGLE cheat code and strategy guide
out there.
I also need other programmers and paid positions are possible with the right
coercsion :)
Please write to me at valkhorn@aol.com and dont hit the reply button as I
rarely have time to check through newsgroups.
Thanks for helping and I appreciate any help/direction you can give me...
-Wilhelm
------------------------------
Date: Tue, 12 Sep 2000 15:43:54 +1100
From: jason <elephant@squirrelgroup.com>
Subject: Re: If you can write this script or help out let me know
Message-Id: <MPG.14285184e122188b989788@localhost>
Valkhorn <valkhorn@aol.com> wrote ..
>In this hosting site I plan to have quite a bit of content but what I would
>really like to have is a bunch of cheat codes and the only way that I can
>really get enough of them to compete with the big guys is to "steal" their
>content somehow.
read: I can't think of a good idea to make money fast and so I'm going
to steal someone else's idea - but not even do it better - just do
it the same .. with the same information
>I also need other programmers and paid positions are possible with the right
>coercsion :)
wow .. you're even willing to pay someone .. let me introduce you to an
old friend of mine .. I call her KF
*plonk*
--
jason -- elephant@squirrelgroup.com --
------------------------------
Date: Tue, 12 Sep 2000 10:18:09 +0200
From: "Dr. Peter Dintelmann" <Peter.Dintelmann@dresdner-bank.com>
Subject: Re: Incremental HTML output as script is running
Message-Id: <8pkord$skq1@intranews.bank.dresdner.net>
Hi,
Andy Flisher schrieb in Nachricht ...
[snip]
>Because of the length of time the script takes I would like to output
>various status lines as HTML to keep the customer informed as to what
>stage the script is at.
>
>This all works a treat at command line, but when initiated as a CGI I
>simply get the hourglass until the script has finished, at which point
it
>nicely outputs all the status lines at once :-(
The webserver may delay sending data to the client
until the script finished.
I have seen a CGI::Push module (but not yet tried out
myself) which might help you.
Regards,
Peter Dintelmann
------------------------------
Date: Tue, 12 Sep 2000 20:14:09 +1200
From: Ken <kenn_mar@hotmail.com>
Subject: Re: Is there a file rename function?
Message-Id: <39BDE5D1.242D0AF5@hotmail.com>
Thanks Tom, for your very instructional and useful reply. I've refrained from
getting into the sort stupid unproductive responses coming from quite a number of
users of this newsgroup. We all know who the real gurus and kind hearted experts
are; you being one of them.
May I humbly request kindness be extended to newbies or people new to using perl.
For those who have nothing constructive to offer, may I humbly request that you
shut up.
BTW, I have solved my perl problems with work arounds and learned many new things
about perl which is in no small way due to kindnesses from people like Tom and
others. I knew there are bastards in every group of people but just didn't know
there are so many so eager to identify themselves as such.
-Ken
------------------------------
Date: 12 Sep 2000 07:40:25 GMT
From: ebohlman@netcom.com (Eric Bohlman)
Subject: Re: memory deallocation
Message-Id: <8pkml9$thi$1@slb6.atl.mindspring.net>
Gavin Sherlock (sherlock@genome.stanford.edu) wrote:
: I have a program (under perl 5.004, running on Solaris 2.6), that
: uses large amounts of memory reading stuff from a database. It does
: some subsequent filtering of that data, which is in a nested hash, and
: often filters out over half the data (the filtering can't be done on
: the database side). For that data that I don't need, I delete the
: appropriate keys in the hash. Memory usage never decreases (at least
: when monitored via top), and so when I subsequently retrieve other
: information from the database, the process goes over the 200Mb system
: imposed limit, and gets killed. Is there any way I can get that memory
: freed up, or am I going to have to change my implementation? If I move
: to a two-dimensional array implementation, or even a hash of arrays,
: will it be likely to save memory? I have 300 users who need large
: datasets :-(
perl (like most Unix programs) doesn't return memory to the OS until the
process that allocated terminates. It will re-use freed memory for its
own purposes, though. The immediately obvious solution is to fork off a
new process for each data set; the child's memory will be returned to the
OS when it terminates.
------------------------------
Date: Tue, 12 Sep 2000 02:00:22 -0400
From: Liqian Gao <lgao@cs.mcgill.ca>
Subject: Need help of installing mod_perl
Message-Id: <39BDC676.9D6AAB16@cs.mcgill.ca>
Hi,
I am trying to install mod_perl on Linux. I installed Apache 1.3.12,
Perl 5.6 and mod_perl-1.24 on Linux 6.0, so far it seems OK. In order to
let Apache know where mod_perl is, I am supposed to set up enviroment in
perl.conf file, but I couldn't find perl.conf file.
Any help is appreciated.
Best regards,
Gao
------------------------------
Date: Tue, 12 Sep 2000 08:46:04 GMT
From: huw_watkins@my-deja.com
Subject: Re: Need help of installing mod_perl
Message-Id: <8pkqg9$qn4$1@nnrp1.deja.com>
perl.conf is an optional file you can create to group
together the Apache Perl API directives, so you will
need to create it and then include it from httpd.conf
Regards,
Huw Watkins
huw@sharpsoftware.co.uk
--
Learning Perl? http://perltutor.com
In article <39BDC676.9D6AAB16@cs.mcgill.ca>,
Liqian Gao <lgao@cs.mcgill.ca> wrote:
>
> Hi,
>
> I am trying to install mod_perl on Linux. I installed Apache 1.3.12,
> Perl 5.6 and mod_perl-1.24 on Linux 6.0, so far it seems OK. In order
to
>
> let Apache know where mod_perl is, I am supposed to set up enviroment
in
>
> perl.conf file, but I couldn't find perl.conf file.
>
> Any help is appreciated.
>
> Best regards,
>
> Gao
>
>
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
Date: Tue, 12 Sep 2000 10:34:09 +0100
From: "W Kemp" <bill.kemp@wire2.com>
Subject: Re: Need help of installing mod_perl
Message-Id: <968751465.6543.0.nnrp-03.c3ad6973@news.demon.co.uk>
Liqian Gao wrote in message <39BDC676.9D6AAB16@cs.mcgill.ca>...
>
>Hi,
>
>I am trying to install mod_perl on Linux. I installed Apache 1.3.12,
>Perl 5.6 and mod_perl-1.24 on Linux 6.0, so far it seems OK. In order to
>
>let Apache know where mod_perl is,
I don't really get the question.
mod_perl is compiled into apache.
So your new Apache IS Mod_perl.
(and hopefully you've moved the new apache binary to the right place)
>I am supposed to set up enviroment in
>perl.conf file, but I couldn't find perl.conf file.
I don't have one of these at all. I don't know whether to feel left out
------------------------------
Date: 12 Sep 2000 04:10:15 GMT
From: Tina Mueller <tina@streetmail.com>
Subject: Re: Not matching regex strings
Message-Id: <8pkab6$cfp4c$1@ID-24002.news.cis.dfn.de>
hi,
In comp.lang.perl.misc Derek Fountain <nomail@hursley.ibm.com> wrote:
> Is it possible to formulate one regex which matches one
> string as long as another string isn't matched? For example,
> I want to pick out a substring as long as it is *not*
> surrounded by other given strings:
> xyzI-WANT-THISxyz
> should *not* match because although I'm looking for
> I-WANT-THIS, I don't want it if it's got an "xyz" on each
what about this:
/(?<!xyz)(I-WANT-THIS)|\1(?!xyz)/
there might be a better way, i couldn't get it to
work with both lookahead and lookbehind together, so
i put the | in.
tina
--
http://tinita.de \ enter__| |__the___ _ _ ___
tina's moviedatabase \ / _` / _ \/ _ \ '_(_-< of
search & add comments \ \__,_\___/\___/_| /__/ perception
please don't email unless offtopic or followup is set. thanx
------------------------------
Date: Tue, 12 Sep 2000 08:50:37 +0200
From: COLAPSO <colapso@usa.net>
Subject: Re: Perl substraction weird result
Message-Id: <39BDD23D.E3340387@usa.net>
Sean Malloy wrote:
> karabot@canada.com wrote:
> >We are running version 5.005_03 built for i386-linux on a slackware 7.0
> >server. Check out the following calculation:
> >
> >% perl -e 'print(30.4 - 30 . "\n")'
> >0.399999999999999
> >
> >Does anybody know why the result is NOT 0.4 ?
>
> It's because _computers_ think in binary, so fractions have to be
> represented as _binary_ fractions, and most of them wind up as
> _approximations_ of their decimal value. 0.4 cannot be properly
> expressed as a sum of inverse powers of two
This C code work fine:
void main(void){
float a=30.4;
float b=30;
printf("%f\n", a-b);
}
So, is possible to represent 0.4 numbers. C do.
Regards,
Eduardo Oliveros
colapso@usa.net
http://personal1.iddeo.es/oliveros
------------------------------
Date: Tue, 12 Sep 2000 08:44:54 GMT
From: Brendon Caligari <bcaligari@my-deja.com>
Subject: Re: Perl substraction weird result
Message-Id: <8pkqe3$qlh$1@nnrp1.deja.com>
In article <39BDD23D.E3340387@usa.net>,
COLAPSO <colapso@usa.net> wrote:
> Sean Malloy wrote:
>
> > karabot@canada.com wrote:
> > >We are running version 5.005_03 built for i386-linux on a
slackware 7.0
> > >server. Check out the following calculation:
> > >
> > >% perl -e 'print(30.4 - 30 . "\n")'
> > >0.399999999999999
> > >
> > >Does anybody know why the result is NOT 0.4 ?
> >
> > It's because _computers_ think in binary, so fractions have to be
> > represented as _binary_ fractions, and most of them wind up as
> > _approximations_ of their decimal value. 0.4 cannot be properly
> > expressed as a sum of inverse powers of two
>
> This C code work fine:
>
> void main(void){
> float a=30.4;
> float b=30;
>
> printf("%f\n", a-b);
> }
>
> So, is possible to represent 0.4 numbers. C do.
>
off topic, but...
...had it been possible to represent numbers to infinite precision,
0.399999999999999999999999999999.....
is equal to 0.4 :)
Brendon
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
Date: Tue, 12 Sep 2000 09:12:27 GMT
From: tjla@guvfybir.qlaqaf.bet (Gwyn Judd)
Subject: Re: Perl substraction weird result
Message-Id: <slrn8rrsro.aqg.tjla@thislove.dyndns.org>
I was shocked! How could COLAPSO <colapso@usa.net>
say such a terrible thing:
>This C code work fine:
>
>void main(void){
>float a=30.4;
>float b=30;
>
>printf("%f\n", a-b);
>}
>
>So, is possible to represent 0.4 numbers. C do.
No it doesn't. I suggest you read the documentation (start with "man 3
printf". This is off topic anyway.
--
Gwyn Judd (print `echo 'tjla@guvfybir.qlaqaf.bet' | rot13`)
I disagree with what you say, but will defend to the death your right to
tell such LIES!
------------------------------
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 4294
**************************************