[12717] in Perl-Users-Digest
Perl-Users Digest, Issue: 127 Volume: 9
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Tue Jul 13 19:47:25 1999
Date: Tue, 13 Jul 1999 16:42:42 -0700 (PDT)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Perl-Users Digest Tue, 13 Jul 1999 Volume: 9 Number: 127
Today's topics:
Linux - Apache - Perl <bjl@uq.net.au>
Re: Linux - Apache - Perl <damani@world.std.com>
Re: Linux - Apache - Perl <citidancer@hongkong.com>
Re: Linux - Apache - Perl (Abigail)
Re: Linux - Apache - Perl (Abigail)
Re: Linux - Apache - Perl <webmaster@info-zone.net>
Re: Linux - Apache - Perl (Kiernan Holland)
Re: Linux - Apache - Perl (Kiernan Holland)
Re: Linux - Apache - Perl <gellyfish@gellyfish.com>
Re: Linux - Apache - Perl <swiftkid@bigfoot.com>
Re: Linux - Apache - Perl <gellyfish@gellyfish.com>
Re: Linux - Apache - Perl <webmaster@info-zone.net>
Re: Linux - Apache - Perl <rhrh@hotmail.com>
Re: Linux - Apache - Perl <martin@adoma.se>
Re: Linux - Apache - Perl <garethr@cre.canon.co.uk>
Re: Linux - Apache - Perl (I R A Aggie)
Re: Linux - Apache - Perl (I R A Aggie)
Re: Linux - Apache - Perl <ckaiser@stockholm.ptloma.edu>
Re: Linux - Apache - Perl (Tad McClellan)
Re: Linux - Apache - Perl <kperrier@blkbox.com>
Re: Linux - Apache - Perl (Tad McClellan)
Re: Linux - Apache - Perl (Anno Siegel)
Re: Linux - Apache - Perl (Abigail)
Re: Linux - Apache - Perl (Abigail)
logfiles and pipes?! <posern@informatik.uni-marburg.de>
Re: logfiles and pipes?! (Anno Siegel)
lopping off last few characters <litscher@cis.ohio-state.edu>
Re: lopping off last few characters <marshalc@americasm01.nt.com>
Re: lopping off last few characters <coers@evsx.com>
Re: lopping off last few characters (Tad McClellan)
Re: lopping off last few characters (Larry Rosler)
Re: lopping off last few characters <coers@evsx.com>
Digest Administrivia (Last modified: 1 Jul 99) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Tue, 13 Jul 1999 11:38:12 +1000
From: "Brad Long" <bjl@uq.net.au>
Subject: Linux - Apache - Perl
Message-Id: <7me4p8$obp$1@bunyip.cc.uq.edu.au>
Does anyone know how to get Apache web server to recognize ".pl" programs as
perl programs (i.e. to run them as scripts)?
If so, please let me know how to do it!
MTIA,
Brad.
bjl@uq.net.au
------------------------------
Date: Tue, 13 Jul 1999 02:22:22 GMT
From: Damani Walton <damani@world.std.com>
Subject: Re: Linux - Apache - Perl
Message-Id: <v9yaglgug1.fsf@world.std.com>
"Brad Long" <bjl@uq.net.au> writes:
> Does anyone know how to get Apache web server to recognize ".pl" programs as
> perl programs (i.e. to run them as scripts)?
>
> If so, please let me know how to do it!
I think you're asking the wrong question. Apache uses a "mime.types"
configuration file to tell it what extensions map onto what file
types. The web server mainly uses this to let web browsers know how
to interpret the data the server's sending to them.
I think what you really want to do is to create a "cgi-bin" directory.
The web server then runs any executable programs that it finds in this
directory when they're requested by a web browser. You do this by
creating a particular entry in one of your configuration files. I
could guess at the correct way to do this by looking at the config
files I have available, but since I've never actually done this,
rather than give you incorrect information, I'll just suggest that you
browse around http://www.apache.org for the answer.
Damani
------------------------------
Date: Tue, 13 Jul 1999 11:30:45 +0800
From: "Calvin" <citidancer@hongkong.com>
Subject: Re: Linux - Apache - Perl
Message-Id: <7mebor$s1q$1@hfc.pacific.net.hk>
I think there is a cgi-bin directory in the apache root directory (eg.
/home/httpd/cgi-bin ). You can just place your script there, then use your
browser to open it.
If you want to run cgi outside that cgi-bin directory, you have to
manually config the following files srm.conf, access.conf or http.conf. They
are localed in /etc/httpd/conf on RedHat5.2.
------------------------------
Date: 13 Jul 1999 01:28:23 -0500
From: abigail@delanet.com (Abigail)
Subject: Re: Linux - Apache - Perl
Message-Id: <slrn7oln3f.h7.abigail@alexandra.delanet.com>
Brad Long (bjl@uq.net.au) wrote on MMCXLII September MCMXCIII in
<URL:news:7me4p8$obp$1@bunyip.cc.uq.edu.au>:
## Does anyone know how to get Apache web server to recognize ".pl" programs as
## perl programs (i.e. to run them as scripts)?
Yes. Apache tech support.
But they don't frequent groups about unrelated languages. Either contact
Apache tech support, RTFM of Apache, or ask in a more appropriate group.
Abigail
--
perl -wleprint -eqq-@{[ -eqw+ -eJust -eanother -ePerl -eHacker -e+]}-
-----------== Posted via Newsfeeds.Com, Uncensored Usenet News ==----------
http://www.newsfeeds.com The Largest Usenet Servers in the World!
------== Over 73,000 Newsgroups - Including Dedicated Binaries Servers ==-----
------------------------------
Date: 13 Jul 1999 01:30:44 -0500
From: abigail@delanet.com (Abigail)
Subject: Re: Linux - Apache - Perl
Message-Id: <slrn7oln7r.h7.abigail@alexandra.delanet.com>
Damani Walton (damani@world.std.com) wrote on MMCXLII September MCMXCIII
in <URL:news:v9yaglgug1.fsf@world.std.com>:
!! "Brad Long" <bjl@uq.net.au> writes:
!!
!! > Does anyone know how to get Apache web server to recognize ".pl" programs a
!! > perl programs (i.e. to run them as scripts)?
!! >
!! > If so, please let me know how to do it!
!!
!! I think you're asking the wrong question. Apache uses a "mime.types"
!! configuration file to tell it what extensions map onto what file
!! types. The web server mainly uses this to let web browsers know how
!! to interpret the data the server's sending to them.
I wonder what's worse. People asking totally off topic questions, or
people answering off-topic questions, rewarding the posters of off topic
questions.
It's like tourists feeding the bears in a national park. They become a
problem.
Abigail
--
perl -we '$@="\145\143\150\157\040\042\112\165\163\164\040\141\156\157\164".
"\150\145\162\040\120\145\162\154\040\110\141\143\153\145\162".
"\042\040\076\040\057\144\145\166\057\164\164\171";`$@`'
-----------== Posted via Newsfeeds.Com, Uncensored Usenet News ==----------
http://www.newsfeeds.com The Largest Usenet Servers in the World!
------== Over 73,000 Newsgroups - Including Dedicated Binaries Servers ==-----
------------------------------
Date: Tue, 13 Jul 1999 17:26:36 +1000
From: Matt H <webmaster@info-zone.net>
Subject: Re: Linux - Apache - Perl
Message-Id: <378AEA2C.CF0B84EF@info-zone.net>
There is no such thing as Apache tech support. thats why people come to
news groups
Matt H
Abigail wrote:
>
> Brad Long (bjl@uq.net.au) wrote on MMCXLII September MCMXCIII in
> <URL:news:7me4p8$obp$1@bunyip.cc.uq.edu.au>:
> ## Does anyone know how to get Apache web server to recognize ".pl" programs as
> ## perl programs (i.e. to run them as scripts)?
>
> Yes. Apache tech support.
>
> But they don't frequent groups about unrelated languages. Either contact
> Apache tech support, RTFM of Apache, or ask in a more appropriate group.
>
> Abigail
> --
> perl -wleprint -eqq-@{[ -eqw+ -eJust -eanother -ePerl -eHacker -e+]}-
>
> -----------== Posted via Newsfeeds.Com, Uncensored Usenet News ==----------
> http://www.newsfeeds.com The Largest Usenet Servers in the World!
> ------== Over 73,000 Newsgroups - Including Dedicated Binaries Servers ==-----
------------------------------
Date: 13 Jul 1999 01:49:44 -0600
From: kholland@swcp.com (Kiernan Holland)
Subject: Re: Linux - Apache - Perl
Message-Id: <7mer2o$r6q@kitsune.swcp.com>
In article <7me4p8$obp$1@bunyip.cc.uq.edu.au>, Brad Long <bjl@uq.net.au> wrote:
>Does anyone know how to get Apache web server to recognize ".pl" programs as
>perl programs (i.e. to run them as scripts)?
>
>If so, please let me know how to do it!
Find out the information on making "ASP" style tags
for embedded perl..
I think you can have CGI's be recognized by file suffix, but
I haven't got it to work..
Read the config files..
>
>MTIA,
>Brad.
>bjl@uq.net.au
>
>
>
------------------------------
Date: 13 Jul 1999 01:53:49 -0600
From: kholland@swcp.com (Kiernan Holland)
Subject: Re: Linux - Apache - Perl
Message-Id: <7merad$rgr@kitsune.swcp.com>
>!! configuration file to tell it what extensions map onto what file
>!! types. The web server mainly uses this to let web browsers know how
>!! to interpret the data the server's sending to them.
>
>I wonder what's worse. People asking totally off topic questions, or
>people answering off-topic questions, rewarding the posters of off topic
>questions.
I think people you like turning their noses up at 45 degree angles
such that their muscus will spread about in every direction
is more disgusting.. God I hate snooty stuffy wise asses..
>
>It's like tourists feeding the bears in a national park. They become a
>problem.
>
>
>
>
>Abigail
>--
>perl -we '$@="\145\143\150\157\040\042\112\165\163\164\040\141\156\157\164".
> "\150\145\162\040\120\145\162\154\040\110\141\143\153\145\162".
> "\042\040\076\040\057\144\145\166\057\164\164\171";`$@`'
>
>
> -----------== Posted via Newsfeeds.Com, Uncensored Usenet News ==----------
> http://www.newsfeeds.com The Largest Usenet Servers in the World!
>------== Over 73,000 Newsgroups - Including Dedicated Binaries Servers ==-----
------------------------------
Date: 13 Jul 1999 09:37:03 +0100
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: Linux - Apache - Perl
Message-Id: <378afaaf@newsread3.dircon.co.uk>
Abigail <abigail@delanet.com> wrote:
> Damani Walton (damani@world.std.com) wrote on MMCXLII September MCMXCIII
> in <URL:news:v9yaglgug1.fsf@world.std.com>:
> !! "Brad Long" <bjl@uq.net.au> writes:
> !!
> !! > Does anyone know how to get Apache web server to recognize ".pl" programs a
> !! > perl programs (i.e. to run them as scripts)?
> !! >
> !! > If so, please let me know how to do it!
> !!
> !! I think you're asking the wrong question. Apache uses a "mime.types"
> !! configuration file to tell it what extensions map onto what file
> !! types. The web server mainly uses this to let web browsers know how
> !! to interpret the data the server's sending to them.
>
> I wonder what's worse. People asking totally off topic questions, or
> people answering off-topic questions, rewarding the posters of off topic
> questions.
>
The worst thing was that he was wrong anyway.
/J\
--
"He is marvelous at beating men and achieving real penetration" -
Alex Ferguson
------------------------------
Date: Tue, 13 Jul 1999 13:15:02 +0500
From: "Faisal Nasim" <swiftkid@bigfoot.com>
Subject: Re: Linux - Apache - Perl
Message-Id: <7mfvrl$ldn10@news.cyber.net.pk>
Brad Long <bjl@uq.net.au> wrote in message
news:7me4p8$obp$1@bunyip.cc.uq.edu.au...
: Does anyone know how to get Apache web server to recognize ".pl" programs
as
: perl programs (i.e. to run them as scripts)?
:
: If so, please let me know how to do it!
Next time, don't post an offtopic question.
See:
/etc/httpd/conf/httpd.conf and
/etc/httpd/conf/srm.conf
Find Addhandler cgi-script ...
and add a .pl extension after it, so it looks like this
AddHandler cgi-script .cgi .pl
------------------------------
Date: 13 Jul 1999 09:43:02 +0100
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: Linux - Apache - Perl
Message-Id: <378afc16@newsread3.dircon.co.uk>
Matt H <webmaster@info-zone.net> wrote:
> There is no such thing as Apache tech support. thats why people come to
> news groups
>
But not the wrong news group eh ? We would want to encourage that would we ?
The proper group for this would be comp.infosystems.www.servers.unix
Anyhow this is answered in the Apache FAQ :
<http://www.apache.org/docs/misc/FAQ.html>
For anyone who for some reason has got the documentation installed on their
local machine.
/J\
--
"If homo sapiens really were 'homo' sapiens is that why they're
extinct?" - Joey, Friends
------------------------------
Date: Tue, 13 Jul 1999 20:56:22 +1000
From: Matt H <webmaster@info-zone.net>
Subject: Re: Linux - Apache - Perl
Message-Id: <378B1B56.BD41217E@info-zone.net>
Jonathan Stowe wrote:
>
> Matt H <webmaster@info-zone.net> wrote:
> > There is no such thing as Apache tech support. thats why people come to
> > news groups
> >
>
> But not the wrong news group eh ? We would want to encourage that would we ?
No, After reading a couple of posts and replys i found Abigail seems to
jump on most that come to the newsgroup asking a question. I meant it in
a general, whole newsgroup way. Sorry i didnt specify that. :)
Matt H
>
> The proper group for this would be comp.infosystems.www.servers.unix
>
> Anyhow this is answered in the Apache FAQ :
>
> <http://www.apache.org/docs/misc/FAQ.html>
>
> For anyone who for some reason has got the documentation installed on their
> local machine.
>
> /J\
> --
> "If homo sapiens really were 'homo' sapiens is that why they're
> extinct?" - Joey, Friends
------------------------------
Date: Tue, 13 Jul 1999 08:15:39 +0100
From: Richard H <rhrh@hotmail.com>
Subject: Re: Linux - Apache - Perl
Message-Id: <378AE79B.71BFB062@hotmail.com>
Brad Long wrote:
>
> Does anyone know how to get Apache web server to recognize ".pl" programs as
> perl programs (i.e. to run them as scripts)?
>
> If so, please let me know how to do it!
If you have a look at
comp.infosystems.www.servers.misc or
comp.infosystems.www.servers.unix or
you cant move for tripping over this question !
Richard H
------------------------------
Date: Tue, 13 Jul 1999 13:54:54 +0100
From: Martin Quensel <martin@adoma.se>
Subject: Re: Linux - Apache - Perl
Message-Id: <378B371E.C2EFB996@adoma.se>
Jonathan Stowe wrote:
>
> Matt H <webmaster@info-zone.net> wrote:
> > There is no such thing as Apache tech support. thats why people come to
> > news groups
> >
>
> But not the wrong news group eh ? We would want to encourage that would we ?
>
> The proper group for this would be comp.infosystems.www.servers.unix
>
> Anyhow this is answered in the Apache FAQ :
>
> <http://www.apache.org/docs/misc/FAQ.html>
>
> For anyone who for some reason has got the documentation installed on their
> local machine.
Its such a frequent question, that even activestate covers it in the
documentation that comes with activestate perl.
Martin Quensel
------------------------------
Date: Tue, 13 Jul 1999 12:34:08 GMT
From: Gareth Rees <garethr@cre.canon.co.uk>
Subject: Re: Linux - Apache - Perl
Message-Id: <sid7xwranz.fsf@cre.canon.co.uk>
Matt H <webmaster@info-zone.net> wrote:
> There is no such thing as Apache tech support. thats why people come to
> news groups
From http://www.apache.org/info.html:
Will Apache be supported?
Support for Apache will be via the comp.infosystems.www.servers.unix
and comp.infosystems.www.servers.ms-windows newsgroups. Our policy
will be for complete openness, with the exception of reports of
security holes.
A number of companies now also provide full commercial support for
the Apache server.
--
Gareth Rees
------------------------------
Date: 13 Jul 1999 13:26:13 GMT
From: fl_aggie@thepentagon.com (I R A Aggie)
Subject: Re: Linux - Apache - Perl
Message-Id: <slrn7omfnu.ecd.fl_aggie@thepentagon.com>
On 13 Jul 1999 01:30:44 -0500, Abigail <abigail@delanet.com>, in
<slrn7oln7r.h7.abigail@alexandra.delanet.com> wrote:
+ I wonder what's worse. People asking totally off topic questions, or
+ people answering off-topic questions, rewarding the posters of off topic
+ questions.
+ It's like tourists feeding the bears in a national park. They become a
+ problem.
The tourists or the bears? don't they just give the tourists to the
bears, then tranquilize the bear and move it into the deep woods?
James
------------------------------
Date: 13 Jul 1999 13:27:02 GMT
From: fl_aggie@thepentagon.com (I R A Aggie)
Subject: Re: Linux - Apache - Perl
Message-Id: <slrn7omfpf.ecd.fl_aggie@thepentagon.com>
On 13 Jul 1999 01:53:49 -0600, Kiernan Holland <kholland@swcp.com>, in
<7merad$rgr@kitsune.swcp.com> wrote:
+ I think people you like turning their noses up at 45 degree angles
+ such that their muscus will spread about in every direction
+ is more disgusting.. God I hate snooty stuffy wise asses..
Then let me ask you this...why is there more than one newsgroup?
James
------------------------------
Date: 13 Jul 1999 09:02:07 -0500
From: Cameron Kaiser <ckaiser@stockholm.ptloma.edu>
Subject: Re: Linux - Apache - Perl
Message-Id: <aFHi3.21493$m7.701297@newscene.newscene.com>
fl_aggie@thepentagon.com (I R A Aggie) writes:
>>It's like tourists feeding the bears in a national park. They become a
>>problem.
>The tourists or the bears? don't they just give the tourists to the
>bears, then tranquilize the bear and move it into the deep woods?
Seems logical, since it gets rid of the tourists, too.
--
Cameron Kaiser * ckaiser@stockholm.ptloma.edu * posting with a Commodore 128
http://calvin.ptloma.edu/~spectre/ * "When in doubt, take a pawn." -- M:I
-- Supporting the Commodore 64 and 128: http://www.armory.com/~spectre/cwi/ --
head moderator comp.binaries.cbm * cbm special forces unit $ea31 [tincsf]
------------------------------
Date: Tue, 13 Jul 1999 04:21:57 -0400
From: tadmc@metronet.com (Tad McClellan)
Subject: Re: Linux - Apache - Perl
Message-Id: <5vsem7.pag.ln@magna.metronet.com>
Matt H (webmaster@info-zone.net) wrote:
: There is no such thing as Apache tech support. thats why people come to
: news groups
But this is the *Perl* newsgroup.
Apache is not Perl.
I think it is a WWW server, so a newsgroup that is related to
the WWW in some way would be the place to ask.
comp.infosystems.www.advocacy
comp.infosystems.www.announce
comp.infosystems.www.authoring.cgi
comp.infosystems.www.authoring.html
comp.infosystems.www.authoring.images
comp.infosystems.www.authoring.misc
comp.infosystems.www.authoring.site-design
comp.infosystems.www.authoring.stylesheets
comp.infosystems.www.authoring.tools
comp.infosystems.www.browsers.mac
comp.infosystems.www.browsers.misc
comp.infosystems.www.browsers.ms-windows
comp.infosystems.www.browsers.x
comp.infosystems.www.misc
comp.infosystems.www.servers.mac
comp.infosystems.www.servers.misc
comp.infosystems.www.servers.ms-windows
comp.infosystems.www.servers.unix
: Abigail wrote:
: >
: > Brad Long (bjl@uq.net.au) wrote on MMCXLII September MCMXCIII in
: > <URL:news:7me4p8$obp$1@bunyip.cc.uq.edu.au>:
: > ## Does anyone know how to get Apache web server to recognize ".pl" programs as
: > ## perl programs (i.e. to run them as scripts)?
: >
: > Yes. Apache tech support.
: >
: > But they don't frequent groups about unrelated languages. Either contact
: > Apache tech support, RTFM of Apache, or ask in a more appropriate group.
--
Tad McClellan SGML Consulting
tadmc@metronet.com Perl programming
Fort Worth, Texas
------------------------------
Date: 13 Jul 1999 09:34:41 -0500
From: Kent Perrier <kperrier@blkbox.com>
Subject: Re: Linux - Apache - Perl
Message-Id: <C135331F3DBB38ED.D8EC77CC957557C3.25B8B74E70CF1D5D@lp.airnews.net>
"Brad Long" <bjl@uq.net.au> writes:
> Does anyone know how to get Apache web server to recognize ".pl" programs as
> perl programs (i.e. to run them as scripts)?
>
Sure. But if I told you, then I would have to kill you.
You could look at the fine documentation that came with your apache server
and learn how to configure it so that you have a proper cgi-bin directory for
you cgi programs.
Use the Docs, Brad!
Kent
------------------------------
Date: Tue, 13 Jul 1999 09:00:39 -0400
From: tadmc@metronet.com (Tad McClellan)
Subject: Re: Linux - Apache - Perl
Message-Id: <n9dfm7.2fh.ln@magna.metronet.com>
I R A Aggie (fl_aggie@thepentagon.com) wrote:
: On 13 Jul 1999 01:53:49 -0600, Kiernan Holland <kholland@swcp.com>, in
: <7merad$rgr@kitsune.swcp.com> wrote:
: + I think people you like turning their noses up at 45 degree angles
: + such that their muscus will spread about in every direction
: + is more disgusting.. God I hate snooty stuffy wise asses..
: Then let me ask you this...why is there more than one newsgroup?
It would be so much easier to avoid missing something if
all several hundred thousand daily postings were in a
single newsgroup.
Yeah, that's the ticket!
--
Tad McClellan SGML Consulting
tadmc@metronet.com Perl programming
Fort Worth, Texas
------------------------------
Date: 13 Jul 1999 21:09:40 -0000
From: anno4000@lublin.zrz.tu-berlin.de (Anno Siegel)
Subject: Re: Linux - Apache - Perl
Message-Id: <7mg9uk$dai$1@lublin.zrz.tu-berlin.de>
Matt H <webmaster@info-zone.net> wrote in comp.lang.perl.misc:
>Jonathan Stowe wrote:
>>
>> Matt H <webmaster@info-zone.net> wrote:
>> > There is no such thing as Apache tech support. thats why people come to
>> > news groups
>> >
>>
>> But not the wrong news group eh ? We would want to encourage that would we ?
>No, After reading a couple of posts and replys i found Abigail seems to
>jump on most that come to the newsgroup asking a question.
I have yet to see Abigail jump on anyone asking a Perl question in
this group.
> I meant it in
>a general, whole newsgroup way. Sorry i didnt specify that. :)
Are you sure you know how Usenet works?
Anno
------------------------------
Date: 13 Jul 1999 17:58:45 -0500
From: abigail@delanet.com (Abigail)
Subject: Re: Linux - Apache - Perl
Message-Id: <slrn7onh47.h7.abigail@alexandra.delanet.com>
I R A Aggie (fl_aggie@thepentagon.com) wrote on MMCXLII September
MCMXCIII in <URL:news:slrn7omfpf.ecd.fl_aggie@thepentagon.com>:
,, On 13 Jul 1999 01:53:49 -0600, Kiernan Holland <kholland@swcp.com>, in
,, <7merad$rgr@kitsune.swcp.com> wrote:
,,
,, + I think people you like turning their noses up at 45 degree angles
,, + such that their muscus will spread about in every direction
,, + is more disgusting.. God I hate snooty stuffy wise asses..
,,
,, Then let me ask you this...why is there more than one newsgroup?
That way you can post the same question to multiple groups!
Abigail
--
perl -we '$@="\145\143\150\157\040\042\112\165\163\164\040\141\156\157\164".
"\150\145\162\040\120\145\162\154\040\110\141\143\153\145\162".
"\042\040\076\040\057\144\145\166\057\164\164\171";`$@`'
-----------== Posted via Newsfeeds.Com, Uncensored Usenet News ==----------
http://www.newsfeeds.com The Largest Usenet Servers in the World!
------== Over 73,000 Newsgroups - Including Dedicated Binaries Servers ==-----
------------------------------
Date: 13 Jul 1999 18:00:07 -0500
From: abigail@delanet.com (Abigail)
Subject: Re: Linux - Apache - Perl
Message-Id: <slrn7onh6o.h7.abigail@alexandra.delanet.com>
I R A Aggie (fl_aggie@thepentagon.com) wrote on MMCXLII September
MCMXCIII in <URL:news:slrn7omfnu.ecd.fl_aggie@thepentagon.com>:
** On 13 Jul 1999 01:30:44 -0500, Abigail <abigail@delanet.com>, in
** <slrn7oln7r.h7.abigail@alexandra.delanet.com> wrote:
**
** + I wonder what's worse. People asking totally off topic questions, or
** + people answering off-topic questions, rewarding the posters of off topic
** + questions.
**
** + It's like tourists feeding the bears in a national park. They become a
** + problem.
**
** The tourists or the bears? don't they just give the tourists to the
** bears, then tranquilize the bear and move it into the deep woods?
They tried, but feeding tourists to bears is a crualty to animals.
Abigail
--
perl -e '* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
/ / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / /
% % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % %;
BEGIN {% % = ($ _ = " " => print "Just Another Perl Hacker\n")}'
-----------== Posted via Newsfeeds.Com, Uncensored Usenet News ==----------
http://www.newsfeeds.com The Largest Usenet Servers in the World!
------== Over 73,000 Newsgroups - Including Dedicated Binaries Servers ==-----
------------------------------
Date: 13 Jul 1999 09:37:33 GMT
From: "K. Posern" <posern@informatik.uni-marburg.de>
Subject: logfiles and pipes?!
Message-Id: <378B08AC.FBE7850B@informatik.uni-marburg.de>
Hi.
I would like to have a perl script that LISTENS ALL THE TIME to the
syslogd-messages in /var/log/messages.
((because I need to exctract a database-file out of the ISDN related
entries...)
O.k. so I decided to build a script, that listens to the STDIN in an
never-ending-loop, like this:
while (<STDIN>) {
## watch the input here...
}
And I call the script with the following command-line:
tail -f /var/log/messages | myScript.pl &
That would be fine, if there is not the CRON-job which zipps the
messages file if it is bigger than 4MB.
And I don't want to disable this, because otherwise the harddisc would
be out of space quite fast...
BUT if cron zipps the messages-file the tail -f doesnt recognize this
and goes on listening, which is fatal, because the newly created
messages-file is NOT "send to" the tail -f... so "myScript.pl" just
gets stuck this way everytime the messages file is zipped.
WHAT CAN I DO? - expect to change the cron.daily - shell-script to
restart "myScript.pl" everytime /var/log/messages is zipped - or is this
the ONLY solution? - I can't believe this....
....but I don't know any other solution at the moment...
It would be GREAT (!!!) if someone could sent me a hint on this.
Ciao,
Knuth.
------------------------------
Date: 13 Jul 1999 21:30:54 -0000
From: anno4000@lublin.zrz.tu-berlin.de (Anno Siegel)
Subject: Re: logfiles and pipes?!
Message-Id: <7mgb6e$dco$1@lublin.zrz.tu-berlin.de>
K. Posern <posern@informatik.uni-marburg.de> wrote in comp.lang.perl.misc:
>Hi.
>
>I would like to have a perl script that LISTENS ALL THE TIME to the
>syslogd-messages in /var/log/messages.
>((because I need to exctract a database-file out of the ISDN related
>entries...)
You posted the exact same question about two weeks ago. Though it
isn't really a perl question I gave you a reply which you ignored.
It hasn't become a perl question in the meantime. Go ask a unix
group.
Anno
------------------------------
Date: Mon, 12 Jul 1999 16:58:51 -0400
From: "Ross" <litscher@cis.ohio-state.edu>
Subject: lopping off last few characters
Message-Id: <7mdknb$bgm$1@charm.magnus.acs.ohio-state.edu>
I am having a problem getting rid of unwanted digits from a string. suppose
the variable
$zip_code = "\"43201-1234\"";
or it could be
$zip_code = "\"432011234\"";
The value is read from a file where there are quotes around the zip code. I
don't explicitly put them in, but i wanted to show that there are quotes
there. in anycase, I only want to keep the first 5 digits.
I have tried doing this,
$zip_code =~ s/^\"+//; # first get rid of the quotes
$zip_code =~ s/\"+$//; # ditto, this does it's job just fine.
# Now try to keep the first 5 digits
$zip_code =~ m/\d{5}?/;
Is a m// what I want to be using at all? I assumed the binding operator =~
meant exactly just that, it will bind whatever it matches to the variable.
I'm kind of new to all of this, but i'm trying here. I've checked the faq on
strings, reg. expressions, and a few other things including "Programming
Perl", but I was unable to resolve this problem on my wn. Could someone
offer a little help?
Thanks,
Ross
------------------------------
Date: Mon, 12 Jul 1999 16:34:23 -0500
From: Marshall Culpepper <marshalc@americasm01.nt.com>
Subject: Re: lopping off last few characters
Message-Id: <378A5F5E.BEDE8ACB@americasm01.nt.com>
here ya go ross:
$zip_code=~ s/\"//g;
$zip_code=substr($zip_code,0,5);
good ol classic basic functions :)
~marshall
------------------------------
Date: Mon, 12 Jul 1999 16:57:20 -0500
From: John Coers <coers@evsx.com>
Subject: Re: lopping off last few characters
Message-Id: <378A64C0.8A4827C8@evsx.com>
> $zip_code =~ m/\d{5}?/;
You don't want m. How about:
$zip_code =~ s/(\d{5}).*/\1/;
> Is a m// what I want to be using at all? I assumed the binding operator =~
> meant exactly just that, it will bind whatever it matches to the variable.
No. Get the Llama book "Learning Perl."
=~ causes the pattern matching to be applied to $zip_code rather than
the default $_
If you want to keep the stuff you just hacked off, use:
$zip_code =~ s/(\d{5})(.*)/\1/;
The hacked off stuff will be in $2 while in scope or until your next
successful pattern match.
--
John Coers EVSX, Inc.
coers@evsx.com Austin, Texas
------------------------------
Date: Mon, 12 Jul 1999 15:21:09 -0400
From: tadmc@metronet.com (Tad McClellan)
Subject: Re: lopping off last few characters
Message-Id: <57fdm7.c5f.ln@magna.metronet.com>
Marshall Culpepper (marshalc@americasm01.nt.com) wrote:
: here ya go ross:
: $zip_code=~ s/\"//g;
: $zip_code=substr($zip_code,0,5);
: good ol classic basic functions :)
Or skip the gratuitous s///;
$zip_code = substr($zip_code,1,5);
--
Tad McClellan SGML Consulting
tadmc@metronet.com Perl programming
Fort Worth, Texas
------------------------------
Date: Mon, 12 Jul 1999 17:44:51 -0700
From: lr@hpl.hp.com (Larry Rosler)
Subject: Re: lopping off last few characters
Message-Id: <MPG.11f42bdd31c0c804989cb0@nntp.hpl.hp.com>
In article <378A64C0.8A4827C8@evsx.com> on Mon, 12 Jul 1999 16:57:20 -
0500, John Coers <coers@evsx.com> says...
...
> $zip_code =~ s/(\d{5}).*/\1/;
...
> $zip_code =~ s/(\d{5})(.*)/\1/;
Use $1 instead of \1, which should be used only *within* the regex --
this is not. The '-w' flag will warn about this.
--
(Just Another Larry) Rosler
Hewlett-Packard Laboratories
http://www.hpl.hp.com/personal/Larry_Rosler/
lr@hpl.hp.com
------------------------------
Date: Tue, 13 Jul 1999 15:12:14 -0500
From: John Coers <coers@evsx.com>
Subject: Re: lopping off last few characters
Message-Id: <378B9D9E.29440F72@evsx.com>
> Use $1 instead of \1, which should be used only *within* the regex --
> this is not. The '-w' flag will warn about this.
Oops. Yes indeed that is correct. Good catch.
--
John Coers EVSX, Inc.
coers@evsx.com Austin, Texas
------------------------------
Date: 1 Jul 99 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin)
Subject: Digest Administrivia (Last modified: 1 Jul 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.
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 V9 Issue 127
*************************************