[11383] in Perl-Users-Digest
Perl-Users Digest, Issue: 4983 Volume: 8
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Fri Feb 26 11:47:20 1999
Date: Fri, 26 Feb 99 08:38:16 -0800
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Perl-Users Digest Fri, 26 Feb 1999 Volume: 8 Number: 4983
Today's topics:
map + grep replacement for this foreach otis@my-dejanews.com
Re: map + grep replacement for this foreach otis@my-dejanews.com
Re: map + grep replacement for this foreach (M.J.T. Guy)
Re: map + grep replacement for this foreach <jeffp@crusoe.net>
Re: map + grep replacement for this foreach otis@my-dejanews.com
Re: map + grep replacement for this foreach <Allan@due.net>
Re: map + grep replacement for this foreach otis@my-dejanews.com
Re: map + grep replacement for this foreach <Allan@due.net>
Matching an value of varying length <rgarcia@genzyme.com>
Re: Matching an value of varying length (Ronald J Kimball)
mirror.pl and SOCKS nesbit@my-dejanews.com
mirror.pl and socks5 nesbit@my-dejanews.com
mltple sybperl connection help <rburditt@london.gos.fedex.com>
mod_perl leak help (yes, using strict, -w :) frogsmock@my-dejanews.com
Re: mod_perl leak help (yes, using strict, -w :) <matthew.sergeant@eml.ericsson.se>
Re: mod_perl leak help (yes, using strict, -w :) <frogsmock@my-dejanews.com>
mod_perl on NT avivc@amdocs.com
MRTG on Win32 <rickbell@ramkey.com.au>
Re: MRTG on Win32 <pkeefe@ix.netcom.com>
Multiple files via Net::FTP ??? <tturton@cowboys.anet-dfw.com>
Re: Multiple files via Net::FTP ??? <zenin@bawdycaste.org>
Re: My, oh my! <aqumsieh@matrox.com>
Mysql question (John )
Mysql question (John )
Re: Mysql question <root@redbox.caroline.net>
Re: Mysql question (Mads Toftum)
Re: need a clearer explanation of ${1} use in s///i <cook@mediaone.net>
Special: Digest Administrivia (Last modified: 12 Dec 98 (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Mon, 22 Feb 1999 22:48:51 GMT
From: otis@my-dejanews.com
Subject: map + grep replacement for this foreach
Message-Id: <7asmsf$u7j$1@nnrp1.dejanews.com>
Hello,
can somebody help me out here.
what would be the map and/or grep replacement for this piece of code:
foreach my $ex (keys %mustExclude) { $count-- and next if (grep(/$ex/,
$SomethingThatMayContainStringToBeExcluded)) }
Thank you,
Otis
--
eZines Db - 3,000+ magazines, newspapers, journals, e-zines...
http://www.dominis.com/Zines/?dn
-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
------------------------------
Date: Tue, 23 Feb 1999 16:27:14 GMT
From: otis@my-dejanews.com
Subject: Re: map + grep replacement for this foreach
Message-Id: <7auksl$ibn$1@nnrp1.dejanews.com>
In article <7asmsf$u7j$1@nnrp1.dejanews.com>,
otis@my-dejanews.com wrote:
>
> what would be the map and/or grep replacement for this piece of code:
>
> foreach my $ex (keys %mustExclude) { $count-- and next if (grep(/$ex/,
> $SomethingThatMayContainStringToBeExcluded)) }
This seems to do it:
map
{
my $excl = $_;
$matches-- and next if (grep(/$excl/i, $something))
} keys %mustExclude;
is there a more efficient method maybe (in terms of speed and/or memory
usage)?
Thanks,
Otis
--
eZines Db - 3,000+ magazines, newspapers, journals, e-zines...
http://www.dominis.com/Zines/?dn
-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
------------------------------
Date: 24 Feb 1999 00:24:53 GMT
From: mjtg@cus.cam.ac.uk (M.J.T. Guy)
Subject: Re: map + grep replacement for this foreach
Message-Id: <7avgsl$b0j$1@pegasus.csx.cam.ac.uk>
In article <7auksl$ibn$1@nnrp1.dejanews.com>, <otis@my-dejanews.com> wrote:
>This seems to do it:
>
>map
>{
> my $excl = $_;
> $matches-- and next if (grep(/$excl/i, $something))
>} keys %mustExclude;
Seems? You obviously haven't tried it. Watch:
% perl -we 'map {next} 1..3'
Can't "next" outside a block at -e line 1.
OTOH perlfunc.pod is remarkably silent on this point.
Mike Guy
------------------------------
Date: Tue, 23 Feb 1999 19:32:12 -0500
From: evil Japh <jeffp@crusoe.net>
Subject: Re: map + grep replacement for this foreach
Message-Id: <Pine.GSO.3.96.990223192924.8442B-100000@crusoe.crusoe.net>
> > $matches-- and next if (grep(/$excl/i, $something))
Useless use of grep there. grep() is not to be used lightly. Especially
when just examining ONE variable.
I offer this:
... if grep /$str/i, $somestr;
# this should be
... if index(lc($somestr),lc($str)) >= 0;
I find that better in the long run.
--
Jeff Pinyan (jeffp@crusoe.net)
www.crusoe.net/~jeffp
Crusoe Communications, Inc.
973-882-1022
www.crusoe.net
------------------------------
Date: Wed, 24 Feb 1999 13:44:40 GMT
From: otis@my-dejanews.com
To: mjtg@cus.cam.ac.uk
Subject: Re: map + grep replacement for this foreach
Message-Id: <7b0vo7$iuj$1@nnrp1.dejanews.com>
In article <7avgsl$b0j$1@pegasus.csx.cam.ac.uk>,
mjtg@cus.cam.ac.uk (M.J.T. Guy) wrote:
> In article <7auksl$ibn$1@nnrp1.dejanews.com>, <otis@my-dejanews.com> wrote:
> >This seems to do it:
> >
> >map
> >{
> > my $excl = $_;
> > $matches-- and next if (grep(/$excl/i, $something))
> >} keys %mustExclude;
>
> Seems? You obviously haven't tried it. Watch:
>
> % perl -we 'map {next} 1..3'
> Can't "next" outside a block at -e line 1.
are you sure?
I tried it.
Try it in a script (as opposed to from the command line).
Maybe it will work for you like it does for me :)
Otis
--
eZines Db - 3,000+ magazines, newspapers, journals, e-zines...
http://www.dominis.com/Zines/?dn
-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
------------------------------
Date: Wed, 24 Feb 1999 10:01:08 -0500
From: "Allan M. Due" <Allan@due.net>
Subject: Re: map + grep replacement for this foreach
Message-Id: <7b13rc$neu$1@camel18.mindspring.com>
otis@my-dejanews.com wrote in message <7b0vo7$iuj$1@nnrp1.dejanews.com>...
:In article <7avgsl$b0j$1@pegasus.csx.cam.ac.uk>,
: mjtg@cus.cam.ac.uk (M.J.T. Guy) wrote:
:> In article <7auksl$ibn$1@nnrp1.dejanews.com>, <otis@my-dejanews.com>
wrote:
:> >This seems to do it:
:> >
:> >map
:> >{
:> > my $excl = $_;
:> > $matches-- and next if (grep(/$excl/i, $something))
:> >} keys %mustExclude;
:>
:> Seems? You obviously haven't tried it. Watch:
:>
:> % perl -we 'map {next} 1..3'
:> Can't "next" outside a block at -e line 1.
:are you sure?
:I tried it.
:Try it in a script (as opposed to from the command line).
:Maybe it will work for you like it does for me :)
I not sure that that "and" is doing what you think it is. From perlop:
Binary ``and'' returns the logical conjunction of the two surrounding
expressions. In other words "and" will first evaluate the left hand side.
If, and only if, the lside is true the right hand side will be evaluated.
It is the attempt to evaluate the rside that causes the "next" to executed.
Perl uses 1 for true and 0 for false, so the only time the left hand side is
true is if $match = 1. Since you are decrimenting $match, this will never
happen and your "next" will never be evaluated either. If you use ++$match
in your example you will see it die the first time through, producing the
error message, as the $match is incremented to 1 before the evaluation.
Also, grep here certainly seems like overkill as in your examples you are
evaluating strings each time. Lastly you are using map in a void context,
which is generally depreciated.
I am curious as to the what others think about using "and" to execute two
bits of code and ignoring the evalution. Is this considered using "and" in
a void context? Is this generally concered good/poor programming style?
AmD
--
$email{'Allan M. Due'} = ' Allan@Due.net ';
--random quote --
Imagination is more important than knowledge.
Albert Einstein
------------------------------
Date: Thu, 25 Feb 1999 15:54:27 GMT
From: otis@my-dejanews.com
Subject: Re: map + grep replacement for this foreach
Message-Id: <7b3rnd$rm$1@nnrp1.dejanews.com>
In article <7b13rc$neu$1@camel18.mindspring.com>,
"Allan M. Due" <Allan@due.net> wrote:
> otis@my-dejanews.com wrote in message <7b0vo7$iuj$1@nnrp1.dejanews.com>...
> :In article <7avgsl$b0j$1@pegasus.csx.cam.ac.uk>,
> : mjtg@cus.cam.ac.uk (M.J.T. Guy) wrote:
> :> In article <7auksl$ibn$1@nnrp1.dejanews.com>, <otis@my-dejanews.com>
> wrote:
> :> >This seems to do it:
> :> >
> :> >map
> :> >{
> :> > my $excl = $_;
> :> > $matches-- and next if (grep(/$excl/i, $something))
> :> >} keys %mustExclude;
> :>
> :> Seems? You obviously haven't tried it. Watch:
> :>
> :> % perl -we 'map {next} 1..3'
> :> Can't "next" outside a block at -e line 1.
> :are you sure?
> :I tried it.
> :Try it in a script (as opposed to from the command line).
>
> :Maybe it will work for you like it does for me :)
>
> I not sure that that "and" is doing what you think it is. From perlop:
> Binary ``and'' returns the logical conjunction of the two surrounding
> expressions. In other words "and" will first evaluate the left hand side.
> If, and only if, the lside is true the right hand side will be evaluated.
> It is the attempt to evaluate the rside that causes the "next" to executed.
> Perl uses 1 for true and 0 for false, so the only time the left hand side is
> true is if $match = 1. Since you are decrimenting $match, this will never
> happen and your "next" will never be evaluated either. If you use ++$match
> in your example you will see it die the first time through, producing the
> error message, as the $match is incremented to 1 before the evaluation.
Ah, probably, I didn't look up 'and'.
In my code I actually replaced it with && - simply because I felt more
comfortable with && than with 'and' which I never use :)
Is && ok there?
> Also, grep here certainly seems like overkill as in your examples you are
> evaluating strings each time.
I agree - that grep is a leftover from some other code. Now that things are so
simple I certainly don't need grep any more - thanks for pointing that out! :)
> Lastly you are using map in a void context, which is generally depreciated.
Hm, that I don't understand - what do you mean by 'void content'?
Is it because I'm not assigning its return to anything, a la:
@chars = map(chr, @nums);
> I am curious as to the what others think about using "and" to execute two
> bits of code and ignoring the evalution. Is this considered using "and" in
> a void context? Is this generally concered good/poor programming style?
I'm all eyes, too!
Thanks,
Otis
--
eZines Db - 3,000+ magazines, newspapers, journals, e-zines...
http://www.dominis.com/Zines/?dn
-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
------------------------------
Date: Fri, 26 Feb 1999 09:12:58 -0500
From: "Allan M. Due" <Allan@due.net>
Subject: Re: map + grep replacement for this foreach
Message-Id: <7b69ou$sr1$1@camel19.mindspring.com>
otis@my-dejanews.com wrote in message <7b3rnd$rm$1@nnrp1.dejanews.com>...
:In article <7b13rc$neu$1@camel18.mindspring.com>,
: "Allan M. Due" <Allan@due.net> wrote:
:> otis@my-dejanews.com wrote in message
<7b0vo7$iuj$1@nnrp1.dejanews.com>...
:> :In article <7avgsl$b0j$1@pegasus.csx.cam.ac.uk>,
:> : mjtg@cus.cam.ac.uk (M.J.T. Guy) wrote:
:> :> In article <7auksl$ibn$1@nnrp1.dejanews.com>, <otis@my-dejanews.com>
:> wrote:
:> :> >This seems to do it:
:> :> >
:> :> >map
:> :> >{
:> :> > my $excl = $_;
:> :> > $matches-- and next if (grep(/$excl/i, $something))
:> :> >} keys %mustExclude;
:> :>
:> :> Seems? You obviously haven't tried it. Watch:
:> :>
:> :> % perl -we 'map {next} 1..3'
:> :> Can't "next" outside a block at -e line 1.
:> :are you sure?
:> :I tried it.
:> :Try it in a script (as opposed to from the command line).
:>
:> :Maybe it will work for you like it does for me :)
:>
:> I not sure that that "and" is doing what you think it is. From perlop:
:> Binary ``and'' returns the logical conjunction of the two surrounding
:> expressions. In other words "and" will first evaluate the left hand
side.
:> If, and only if, the lside is true the right hand side will be evaluated.
:> It is the attempt to evaluate the rside that causes the "next" to
executed.
:> Perl uses 1 for true and 0 for false, so the only time the left hand side
is
:> true is if $match = 1. Since you are decrimenting $match, this will
never
:> happen and your "next" will never be evaluated either. If you use
++$match
:> in your example you will see it die the first time through, producing the
:> error message, as the $match is incremented to 1 before the evaluation.
:
:Ah, probably, I didn't look up 'and'.
:In my code I actually replaced it with && - simply because I felt more
:comfortable with && than with 'and' which I never use :)
:Is && ok there?
Um, what did it tell you when you looked it up in perlop?
C-style Logical And
Binary ``&&'' performs a short-circuit logical AND operation. That is, if
the left operand is false, the right operand is not even evaluated. Scalar
or list context propagates down to the right operand if it is evaluated.
So it looks like it still doesn't do what you thought it did.
:
:> Also, grep here certainly seems like overkill as in your examples you are
:> evaluating strings each time.
:I agree - that grep is a leftover from some other code. Now that things are
so
:simple I certainly don't need grep any more - thanks for pointing that out!
:)
:> Lastly you are using map in a void context, which is generally
depreciated.
:Hm, that I don't understand - what do you mean by 'void content'?
:Is it because I'm not assigning its return to anything, a la:
:@chars = map(chr, @nums);
:
Yep, that is it. Below is more info from the documentation provided with
your distribution.
perldoc -q void
Found in perlfaq6.pod
What's wrong with using grep or map in a void context?
Both grep and map build a return list, regardless of
their context. This means you're making Perl go to the
trouble of building up a return list that you then just
ignore. That's no way to treat a programming language,
you insensitive scoundrel!
HTH
AmD
--
$email{'Allan M. Due'} = ' All@n.Due.net ';
--random quote --
'Out, out brief candle!
Life's but a walking shadow,
a poor player, that struts and frets his hour upon the stage,
And then is heard no more; It is a tale, told by an idiot,
full of sound and fury, signifying nothing'
MacBeth
------------------------------
Date: Sun, 21 Feb 1999 21:52:40 GMT
From: Robert Garcia <rgarcia@genzyme.com>
Subject: Matching an value of varying length
Message-Id: <36D08027.3E7AB3D7@genzyme.com>
Hello all,
The following problem is most likely the result of rampant stupidity on
my part. However, in an attempt to embarrass myself into enlightenment,
I submit my dilemma for the world to see. :-) I've reviewed both the
Camel book as well as the HTML docs but as of yet I've not been
successful in locating my answer. I thank any who take the time to
respond.
I'm trying to get some data out of a log file (naturally, this is Perl,
after all, ;->). My goal is to extract the user's name and the length
of time they were logged onto the server. The log file looks like this
(extraneous log fields removed for simplicity):
"rasuser1" logged out: user exit after 14:33 (Dial-In PPP,IP,IPX)
"rasuser235" logged out: idle time limit reached after 1:08:06 (Dial-In
PPP,IP)
I've tried a few methods (in particular, index()) to solve my problem
but none has worked. Since each approach I've taken has failed I have a
few questions. They are:
1) How do I use index() and/or rindex() so that it will locate 14:33
and 1:08:06?
2) How do I get split() to operate on the " (double quotes) character
so that I can just grab the username into an array?
3) Is there a way to do both with index()/rindex() or is there a better
function all together?
Thanks again.
Robert "let's just hope I don't try to breed" Garcia
________________________________________________
"I used to be with 'it' but then they changed what
'it' was. Now what I'm with isn't 'it' and what
is 'it' seems weird and scary to me. It'll happen
to you. - Abraham J. Simpson
------------------------------
Date: Sun, 21 Feb 1999 17:26:39 -0500
From: rjk@linguist.dartmouth.edu (Ronald J Kimball)
Subject: Re: Matching an value of varying length
Message-Id: <1dnl6s4.wjzq1u1l4mlqoN@bay1-537.quincy.ziplink.net>
Robert Garcia <rgarcia@genzyme.com> wrote:
> "rasuser1" logged out: user exit after 14:33 (Dial-In PPP,IP,IPX)
> "rasuser235" logged out: idle time limit reached after 1:08:06 (Dial-In
> PPP,IP)
>
> I've tried a few methods (in particular, index()) to solve my problem
> but none has worked. Since each approach I've taken has failed I have a
> few questions. They are:
> 1) How do I use index() and/or rindex() so that it will locate 14:33
> and 1:08:06?
I would use regular expression matching for this.
Assuming that the time is always preceeded by the word 'after' (and
'after' doesn't also appear before that):
($time) = /after (\S+)/;
> 2) How do I get split() to operate on the " (double quotes) character
> so that I can just grab the username into an array?
I'm not sure what you mean by "grab the username into an array". Do you
want an array of *all* the usernames?
Regular expression matching for this too.
For each line in the file:
push(@usernames, /"([^"]+)"/);
> 3) Is there a way to do both with index()/rindex() or is there a better
> function all together?
index()/rindex() are for finding the position of fixed strings. The
strings you're really interested in aren't fixed, so index()/rindex()
may not be the best solution.
--
_ / ' _ / - aka - rjk@linguist.dartmouth.edu
( /)//)//)(//)/( Ronald J Kimball chipmunk@m-net.arbornet.org
/ http://www.ziplink.net/~rjk/
perl -le 'print "Just another \u$^X hacker"'
------------------------------
Date: Wed, 24 Feb 1999 13:54:36 GMT
From: nesbit@my-dejanews.com
Subject: mirror.pl and SOCKS
Message-Id: <7b10ao$jed$1@nnrp1.dejanews.com>
Hello,
When trying to use mirror-2.9 or mirror-2.8 with SOCKS as in:
# runsocks mirror.pl go.conf
I can connect to the remote site via my SOCKS proxy server however,
when mirror tries to put a file, it hangs after the put and times out.
Has anyone had success with using mirror.pl and SOCKS??
TIA!
N.
-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
------------------------------
Date: Thu, 25 Feb 1999 01:05:36 GMT
From: nesbit@my-dejanews.com
Subject: mirror.pl and socks5
Message-Id: <7b27ks$lds$1@nnrp1.dejanews.com>
Hello,
When using mirror-2.9 and socks5 as:
runsocks mirror.pl <conf file>
I can connect to my FTP server however it hangs after putting a file.
In ftp.pl line 1081, I noticed it doesn't return from the following:
$ret = &expect( $timeout, 2, 1 ); # transfer complete, closing connection
ANY help would be appreciated!
N.
-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
------------------------------
Date: Wed, 24 Feb 1999 16:06:53 -0600
From: robert burditt <rburditt@london.gos.fedex.com>
Subject: mltple sybperl connection help
Message-Id: <36D477FD.783B9541@london.gos.fedex.com>
hi, im trying to connect to two different dbases on two different
machines using sybperl.
i thought that this would work, but doesn't:
$ENV{'SYBASE'} = "/path/to/one/nfs_mounted/dbase/machine";
$dbh = new Sybase::DBlib $USER, $PASSWD;
$ENV{'SYBASE'} = "path/to/another/nfs_mounted/dbase/machine";
$lg_dbh = new Sybase::DBlib $LG_USER, $LG_PASSWD;
when i do this, the login fails... can anyone help with how to do this
properly?
thanks,
robert
------------------------------
Date: Mon, 22 Feb 1999 16:49:12 GMT
From: frogsmock@my-dejanews.com
Subject: mod_perl leak help (yes, using strict, -w :)
Message-Id: <7as1q3$9v9$1@nnrp1.dejanews.com>
Hi Folks,
My httpd processes creep up in size with each request. With the first few
requests they increase by 100K or more, and then with subsequent requests
they increase by 10K or more. I kill them off after they process a certain
number of requests, but obviously I'd like to let them live awhile longer and
find out where this leak is. That's the part the puzzles me . . .
I'm using "use strict", "use diagnostics", and -w, and I get no errors or
warnings whatsoever in apache's error_log (that's where it wrote all the
warnings before I stomped out all the globals and unitialized variables). If
my script was leaking, wouldn't I get some indication in error_log, or is it
possible to write a script that leaks and not get some indication from the
logs? Or, since I'm getting no warnings at all, can I assume the leak is
elsewhere?
I am using apache 1.3.4 w/ mod_perl 1.17. On startup, I load the latest
versions of CGI.pm, DBI, and Apache::DBI. I also use DB_File (but I noticed
this problem before I starting using DB_File).
So I guess it boils down to 2 questions:
[1] Could the leak be in my script even though I get no warnings?
[2] Can anyone recommend approaches for tracking this leak down, whether
it's in my script or not?
Thanks!
Jim
-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
------------------------------
Date: Tue, 23 Feb 1999 10:10:15 +0000
From: Matt Sergeant <matthew.sergeant@eml.ericsson.se>
Subject: Re: mod_perl leak help (yes, using strict, -w :)
Message-Id: <36D27E87.66E81117@eml.ericsson.se>
frogsmock@my-dejanews.com wrote:
>
> So I guess it boils down to 2 questions:
>
> [1] Could the leak be in my script even though I get no warnings?
Yes. Easily.
> [2] Can anyone recommend approaches for tracking this leak down, whether
> it's in my script or not?
Make sure you don't have closure problems. This is an easy source of
leaks/problems. See the mod_perl faq on perl.apache.org for details.
--
<Matt email="msergeant@ndirect.co.uk" />
| Fastnet Software Ltd | Perl in Active Server Pages |
| Perl Consultancy, Web Development | Database Design | XML |
| http://come.to/fastnet | Information Consolidation |
------------------------------
Date: Thu, 25 Feb 1999 21:49:29 GMT
From: Jim <frogsmock@my-dejanews.com>
Subject: Re: mod_perl leak help (yes, using strict, -w :)
Message-Id: <8D78AAD18frogsmockmydejanewsc@news.berkshire.net>
>> [1] Could the leak be in my script even though I get no warnings?
>
>Yes. Easily.
Thanks . . . As is so often the case as a newbie to Linux/Perl, my
understanding of the memory management was fundamentally flawed. I did not
realize that processes will generally not return memory to the OS (at
least, that's what I read elsewhere). So these long-lived httpd processes
might hover at one size as long as my Perl/DBI queries pull in small
amounts of data, but as soon as they hit a larger record they'll shoot up
in memory usage to accomodate it, and then won't release it. My
understanding is also that that the process can reuse that memory, but the
OS won't reclaim it until the process dies. I had assumed that the
process-growth was indicative of a leak, but apparently that's not true (I
hope).
Anyway, thanks.
Jim
------------------------------
Date: Mon, 22 Feb 1999 14:49:30 GMT
From: avivc@amdocs.com
Subject: mod_perl on NT
Message-Id: <7arqpm$3b6$1@nnrp1.dejanews.com>
I am porting a unix based apache+mod_perl application to NT. I'm using the
binary distribution of perl 5.005_02 + apache 1.3.3 + mod_perl 1.16.
I used the same configuration files as on the unix.
The relevant configuration declarations are:
In httpd.conf:
LoadModule perl_module modules/ApacheModulePerl
In srm.conf:
PerlScript "c:/server/start.pl"
PerlSendHeader On
In access.conf:
<Files *.cgi>
SetHandler perl-script
PerlHandler Apache::Registry
Options ExecCGI
</Files>
When I start the server it runs the start up script correctly and outputs:
Apache/1.3.3 (Win32) mod_perl/1.16 as expected, but when I run the scripts I
find that the packages are not loaded and ENV{'MOD_PERL'} is not set. There
are no error messages anywhere to be found. Any ideas?
Thanks,
Aviv Cohen
-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
------------------------------
Date: Mon, 22 Feb 1999 23:38:58 +1100
From: "Rick Bell" <rickbell@ramkey.com.au>
Subject: MRTG on Win32
Message-Id: <7arjiq$481$1@reader1.reader.news.ozemail.net>
Hi
I am trying to install MRTG (from
http://ee-staff.ethz.ch/~oetiker/webtools/mrtg/pub/) on Windows 98/NT and
need some assistance.
I have installed ActivePerl 5.005 in C:\PERL and all seems to work ok when I
test it using perl example.pl
As for MRTG I have run into a problem.. how do I complete the setup ?
The installation instructions (http://mirror.aarnet.edu.au/mrtg/) ask me to
do the following:
1. Getting and Install MRTG
2. Get and compile the GD library by Thomas
Boutell:http://www.boutell.com/gd/
3. Make sure you have Perl Version 5.003 or later on your system. (CHECK!)
>From here it goes on to ask me to edit the MRTG Makefile to fit your system.
At least change the PERL and GD_LIB variables. Then use make rateup to
create the rateup binary..... etc etc
If someone has sucessfully installed MRTG under Windows 95/98/Nt I would
appreciate some insight as to how it is done... help!
Thanks in advance
Rick B.
rickbell@ozemail.com.au
------------------------------
Date: Mon, 22 Feb 1999 21:39:24 -0500
From: "Pete Keefe" <pkeefe@ix.netcom.com>
Subject: Re: MRTG on Win32
Message-Id: <7at4ae$480@dfw-ixnews4.ix.netcom.com>
I've had MRTG successfully run on both Win98 and WinNT 4. See the Windows
NT Idiot's Guide to MRTG at
http://mirror.aarnet.edu.au/mrtg/windows_nt_idiot.htm
These instructions do assume that you already have a web server running on
your platform - I've used both Personal Web Server and IIS 4 (both of which
can be downloaded for free from Microsoft).
Good luck,
Pete Keefe
Rick Bell wrote in message <7arjiq$481$1@reader1.reader.news.ozemail.net>...
>Hi
>
>I am trying to install MRTG (from
>http://ee-staff.ethz.ch/~oetiker/webtools/mrtg/pub/) on Windows 98/NT and
>need some assistance.
>
>I have installed ActivePerl 5.005 in C:\PERL and all seems to work ok when
I
>test it using perl example.pl
>
>As for MRTG I have run into a problem.. how do I complete the setup ?
>
>The installation instructions (http://mirror.aarnet.edu.au/mrtg/) ask me to
>do the following:
>
>1. Getting and Install MRTG
>
>2. Get and compile the GD library by Thomas
>Boutell:http://www.boutell.com/gd/
>
>3. Make sure you have Perl Version 5.003 or later on your system. (CHECK!)
>
>From here it goes on to ask me to edit the MRTG Makefile to fit your
system.
>At least change the PERL and GD_LIB variables. Then use make rateup to
>create the rateup binary..... etc etc
>
>If someone has sucessfully installed MRTG under Windows 95/98/Nt I would
>appreciate some insight as to how it is done... help!
>
>Thanks in advance
>Rick B.
>rickbell@ozemail.com.au
>
>
>
------------------------------
Date: Fri, 26 Feb 1999 07:44:55 -0600
From: Tom Turton <tturton@cowboys.anet-dfw.com>
Subject: Multiple files via Net::FTP ???
Message-Id: <36D6A557.85AF8880@cowboys.anet-dfw.com>
I've installed Net::FTP and have it up and working, but it appears to be
missing a feature I normally use on ftp, that of multiple gets and puts
(mget, mput).
Does anyone know if there is a way to do this in Net::FTP, or if there
is another module which allows this feature?
Thank you.
---Tom Turton
------------------------------
Date: 26 Feb 1999 14:10:36 GMT
From: Zenin <zenin@bawdycaste.org>
Subject: Re: Multiple files via Net::FTP ???
Message-Id: <920038220.375460@thrush.omix.com>
[posted & mailed]
Tom Turton <tturton@cowboys.anet-dfw.com> wrote:
: I've installed Net::FTP and have it up and working, but it appears to be
: missing a feature I normally use on ftp, that of multiple gets and puts
: (mget, mput).
:
: Does anyone know if there is a way to do this in Net::FTP, or if there
: is another module which allows this feature?
What do you think your ftp(1) program does to handle "mget"?
foreach my $file (@list_o_files_to_get) {
$ftp->get ($file);
}
--
-Zenin (zenin@archive.rhps.org) From The Blue Camel we learn:
BSD: A psychoactive drug, popular in the 80s, probably developed at UC
Berkeley or thereabouts. Similar in many ways to the prescription-only
medication called "System V", but infinitely more useful. (Or, at least,
more fun.) The full chemical name is "Berkeley Standard Distribution".
------------------------------
Date: Mon, 22 Feb 1999 13:08:44 -0500
From: Ala Qumsieh <aqumsieh@matrox.com>
Subject: Re: My, oh my!
Message-Id: <x3yu2wes443.fsf@tigre.matrox.com>
cory@techlounge.com writes:
>
> I keep having problems with my and use in my perl scripts.
>
> my ($a, $b, $c) = @_;
> use CGI qw (:standard);
> use CGI::Carp qw(fatalsToBrowser);
>
> Each of these lines gives me a syntax error. Why?
Could you tell us what the syntax errors you're getting are? Could you
post some code where you get those errors? What is the version of Perl
you are using?
I have a feeling it might be Perl4.
Ala
------------------------------
Date: Thu, 25 Feb 1999 09:44:44 GMT
From: John@melon17.freeserve.co.uk (John )
Subject: Mysql question
Message-Id: <36d51a96.1952568@news.freeserve.net>
Does anyone know of an
online source example of a
typical database implementation
using the Perl API in conjunction
with Mysql?
John
------------------------------
Date: Thu, 25 Feb 1999 09:58:13 GMT
From: John@melon17.freeserve.co.uk (John )
Subject: Mysql question
Message-Id: <36d81eb2.3004896@news.freeserve.net>
Does anyone know of an
online source example of a
typical database implementation
using the Perl API in conjunction
with Mysql?
John
------------------------------
Date: 25 Feb 1999 04:50:38 -0500
From: root <root@redbox.caroline.net>
Subject: Re: Mysql question
Message-Id: <k8x6dd75.fsf@redbox.caroline.net>
Well if you installed the Mysql stuff it should have included the perl
DBD and perl DBI to go with it. You need to take a look at perldoc
DBD::mysql. That should answer all of your questions, it's pretty
self explanatory from there.
Shane...
------------------------------
Date: Thu, 25 Feb 1999 21:12:57 GMT
From: mt@dev.null (Mads Toftum)
Subject: Re: Mysql question
Message-Id: <36d6bcaa.2801679@news.inet.tele.dk>
On Thu, 25 Feb 1999 09:44:44 GMT, John@melon17.freeserve.co.uk (John )
wrote:
>Does anyone know of an
>online source example of a
>typical database implementation
>using the Perl API in conjunction
>with Mysql?
>
http://mysql.turbolift.com/ - look for the perl/dbi docs.
vh
Mads Toftum, QDPH
som pe USENET reprfsenterer sig selv og ingen andre.
------------------------------
Date: Wed, 24 Feb 1999 23:22:24 -0500
From: edgar <cook@mediaone.net>
Subject: Re: need a clearer explanation of ${1} use in s///i
Message-Id: <36D4D000.224CFF4A@mediaone.net>
still slighly confused but I'm reading the perldoc perlre and trying
examples.
Thanxs all for the help all of you.
-cookie
> snip
> Ilya
------------------------------
Date: 12 Dec 98 21:33:47 GMT (Last modified)
From: Perl-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin)
Subject: Special: Digest Administrivia (Last modified: 12 Dec 98)
Message-Id: <null>
Administrivia:
Well, after 6 months, here's the answer to the quiz: what do we do about
comp.lang.perl.moderated. Answer: nothing.
]From: Russ Allbery <rra@stanford.edu>
]Date: 21 Sep 1998 19:53:43 -0700
]Subject: comp.lang.perl.moderated available via e-mail
]
]It is possible to subscribe to comp.lang.perl.moderated as a mailing list.
]To do so, send mail to majordomo@eyrie.org with "subscribe clpm" in the
]body. Majordomo will then send you instructions on how to confirm your
]subscription. This is provided as a general service for those people who
]cannot receive the newsgroup for whatever reason or who just prefer to
]receive messages via e-mail.
The Perl-Users Digest is a retransmission of the USENET newsgroup
comp.lang.perl.misc. For subscription or unsubscription requests, send
the single line:
subscribe perl-users
or:
unsubscribe perl-users
to almanac@ruby.oce.orst.edu.
To submit articles to comp.lang.perl.misc (and this Digest), send your
article to perl-users@ruby.oce.orst.edu.
To submit articles to comp.lang.perl.announce, send your article to
clpa@perl.com.
To request back copies (available for a week or so), send your request
to almanac@ruby.oce.orst.edu with the command "send perl-users x.y",
where x is the volume number and y is the issue number.
The Meta-FAQ, an article containing information about the FAQ, is
available by requesting "send perl-users meta-faq". The real FAQ, as it
appeared last in the newsgroup, can be retrieved with the request "send
perl-users FAQ". Due to their sizes, neither the Meta-FAQ nor the FAQ
are included in the digest.
The "mini-FAQ", which is an updated version of the Meta-FAQ, is
available by requesting "send perl-users mini-faq". It appears twice
weekly in the group, but is not distributed in the digest.
For other requests pertaining to the digest, send mail to
perl-users-request@ruby.oce.orst.edu. Do not waste your time or mine
sending perl questions to the -request address, I don't have time to
answer them even if I did know the answer.
------------------------------
End of Perl-Users Digest V8 Issue 4983
**************************************