[18633] in Perl-Users-Digest
Perl-Users Digest, Issue: 801 Volume: 10
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Mon Apr 30 11:06:30 2001
Date: Mon, 30 Apr 2001 08:05:08 -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: <988643107-v10-i801@ruby.oce.orst.edu>
Content-Type: text
Perl-Users Digest Mon, 30 Apr 2001 Volume: 10 Number: 801
Today's topics:
Re: Chicago Perl Consultants Needed <henryhartley@westat.com>
Re: Chicago Perl Consultants Needed <jhill@technoslave.net>
Re: Chicago Perl Consultants Needed <webmaster@webdragon.unmunge.net>
Re: creating an array of all filenames <magrav@wnt.sas.com>
Re: creating an array of all filenames <bart.lateur@skynet.be>
Re: creating an array of all filenames (Randal L. Schwartz)
Re: DBD::ODBC <dwilga-MUNGE@mtholyoke.edu>
Re: Error while doing perl -MCPAN -e shell <dwilga-MUNGE@mtholyoke.edu>
Re: How to write a multi process program with perl ? (dekuo)
Re: How to write a multi process program with perl ? (dekuo)
How to: Create Regex which extracts N number of words b <notmyrealemail@fake.com>
Re: How to: Create Regex which extracts N number of wor (Garry Williams)
Html link in mysql data <carlfox@netdoor.com>
Re: Jeopardy (was Re: First and last element in list lo <bowman@montana.com>
Need help with regexp and returned data. <jhill@technoslave.net>
Re: Need help with regexp and returned data. <jhill@technoslave.net>
Re: Need help with regexp and returned data. (M.J.T. Guy)
New posters to comp.lang.perl.misc <gbacon@cs.uah.edu>
newbie question <webdaddy@delete.operamail.com>
Re: Perl Editors? <bowman@montana.com>
Re: Point of using perlcc <newspost@coppit.org>
Re: Question: WWW::Search - the second page <jdf@pobox.com>
Re: reg exp (Tad McClellan)
Re: reg exp <news@simonflack.com>
Re: Removing Lines... how's this? (Tad McClellan)
Statistics for comp.lang.perl.misc <gbacon@cs.uah.edu>
Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Mon, 30 Apr 2001 09:45:46 -0400
From: Henry Hartley <henryhartley@westat.com>
Subject: Re: Chicago Perl Consultants Needed
Message-Id: <3AED6C8A.CE29AF7F@westat.com>
> | > He seems as perceptive as a potato.
> |
> | Hey! Don't insult the potatoes that way!
> |
>
> yeah, we wouldn't want them going around with a chip on their
> shoulders...
Or making eyes at us.
--
Henry Hartley
------------------------------
Date: Mon, 30 Apr 2001 09:50:38 -0400
From: "Jason C. Hill" <jhill@technoslave.net>
Subject: Re: Chicago Perl Consultants Needed
Message-Id: <9cjqj9$rs9@spamz.news.aol.com>
Don't make me skin you alive for making these lame posts about potatoes!!!
-J
> > | > He seems as perceptive as a potato.
> > |
> > | Hey! Don't insult the potatoes that way!
> > |
> >
> > yeah, we wouldn't want them going around with a chip on their
> > shoulders...
>
> Or making eyes at us.
------------------------------
Date: 30 Apr 2001 14:53:29 GMT
From: "Scott R. Godin" <webmaster@webdragon.unmunge.net>
Subject: Re: Chicago Perl Consultants Needed
Message-Id: <9cju99$nsl$0@216.155.32.52>
In article <9cjqj9$rs9@spamz.news.aol.com>,
"Jason C. Hill" <jhill@technoslave.net> wrote:
| > > | > He seems as perceptive as a potato.
| > > |
| > > | Hey! Don't insult the potatoes that way!
| > > |
| > >
| > > yeah, we wouldn't want them going around with a chip on their
| > > shoulders...
| >
| > Or making eyes at us.
|
| Don't make me skin you alive for making these lame posts about potatoes!!!
|
Lame? I thought they had a certain appeal, myself.
:-)
--
"DON'T BOGART THE POTATO SALAD" -Randal Schwartz, clpm
------------------------------
Date: Mon, 30 Apr 2001 09:04:44 -0400
From: Max Gravitt <magrav@wnt.sas.com>
Subject: Re: creating an array of all filenames
Message-Id: <75oqets8b12mnd478s8c23q14ru11m0ai6@4ax.com>
On 27 Apr 2001 17:20:32 -0700, merlyn@stonehenge.com (Randal L.
Schwartz) wrote:
>>>>>> "Jon" == Jon Ericson <Jonathan.L.Ericson@jpl.nasa.gov> writes:
>
>Jon> Max Gravitt writes:
>>> I'm trying to create an array that contains all of the filenames in a
>>> directory tree (recursive). I'm almost there. The below function is
>>> called with the directory where to start looking.
>
>Jon> Any reason you're not using File::Find?
because I didn't know that it existed - I'm somewhat new to Perl.
Thanks!
>
>Usually because it's homework. :)
It's not. Your presumptive post reflects poorly on me; it assumes I'm
a student trying to get my homework solutions from a newsgroup. I
resent that.
------------------------------
Date: Mon, 30 Apr 2001 13:45:17 GMT
From: Bart Lateur <bart.lateur@skynet.be>
Subject: Re: creating an array of all filenames
Message-Id: <m3rqet02b3t6fi18cautho93se5dsc5fsh@4ax.com>
Max Gravitt wrote:
>>Usually because it's homework. :)
>
>It's not. Your presumptive post reflects poorly on me; it assumes I'm
>a student trying to get my homework solutions from a newsgroup. I
>resent that.
You wouldn't have been the first. Actually, it turns out you're part of
a tiny minority.
--
Bart.
------------------------------
Date: 30 Apr 2001 07:20:22 -0700
From: merlyn@stonehenge.com (Randal L. Schwartz)
Subject: Re: creating an array of all filenames
Message-Id: <m11yqacvvd.fsf@halfdome.holdit.com>
>>>>> "Max" == Max Gravitt <magrav@wnt.sas.com> writes:
Randal> Usually because it's homework. :)
Max> It's not. Your presumptive post reflects poorly on me; it
Max> assumes I'm a student trying to get my homework solutions from a
Max> newsgroup. I resent that.
I said "usually". And I flagged it as idle humor. See the smiley?
Don't get all worked up. It's an accurate statement, and it doesn't
apply to you, and it was said in jest. Move along. Nothing to see
here.
--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<merlyn@stonehenge.com> <URL:http://www.stonehenge.com/merlyn/>
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!
------------------------------
Date: Mon, 30 Apr 2001 14:57:23 GMT
From: Dan Wilga <dwilga-MUNGE@mtholyoke.edu>
Subject: Re: DBD::ODBC
Message-Id: <dwilga-MUNGE-62C8AB.10572230042001@nap.mtholyoke.edu>
In article <9cio8k01qcd@enews1.newsguy.com>,
"Michael R. McPherson" <mrp@hafatel.com> wrote:
> I have DBD::ODBC installed using Openlink with iodbc. Whe I run a script
> from the shell it works as is expected. Same script yet run via a web page
> and it returns the following error.
>
> Couldn't connect to database[OpenLink][ODBC]RPC: Unknown host (SQL-08004)
> [OpenLink][ODBC]Connection rejected by data source (SQL-08004)(DBD:
> db_login/SQLConnect err=-1) at /home/httpd/cgi-bin/hafa.pl line 18.
>
> What could I be doing wrong ?
The Openlink driver is looking for ~/.odbcini and/or ~/.udbcini (depending
on which version of the dirver you're using.) The home directory is probably
different for the web server, since it's run as a different user.
Easiest thing is to do a symlink from that user's home to wherever you keep
these files.
--
Dan Wilga dwilga-MUNGE@mtholyoke.edu
** Remove the -MUNGE in my address to reply **
------------------------------
Date: Mon, 30 Apr 2001 15:01:20 GMT
From: Dan Wilga <dwilga-MUNGE@mtholyoke.edu>
Subject: Re: Error while doing perl -MCPAN -e shell
Message-Id: <dwilga-MUNGE-7C1DF4.11011830042001@nap.mtholyoke.edu>
In article <20010430000000.A7862@magix.com.sg>,
Benny Chee <bennyc@magix.com.sg> wrote:
> hi,
>
> i encounter this error while doing perl -MCPAN -e shell:
>
> # perl -MCPAN -e shell
> Cannot do `ornaments' in Term::ReadLine::Gnu at
> /usr/local/lib/perl5/5.6.1/CPAN.pm line 101
>
> Anybody knows what's this error msg is about?
It's probably related to the terminal emulation you're using. It apparently
doesn't support ornaments (I think ReadLine wants to do underlining.)
The solution is to use a terminal program that supports vt100, ANSI, or
something else with ornament capability. Either that, or you need to tell your
shell (usually by setting an environment variable) what type of terminal
emulation you are using.
--
Dan Wilga dwilga-MUNGE@mtholyoke.edu
** Remove the -MUNGE in my address to reply **
------------------------------
Date: 30 Apr 2001 21:32:22 +0800
From: dekuo@hello.com.tw (dekuo)
Subject: Re: How to write a multi process program with perl ?
Message-Id: <9cjpg7$5nt$1@news.ethome.net.tw>
(Jonathan Stowe) gellyfish@gellyfish.com wrote:
>dekuo <dekuo@hello.com.tw> wrote:
>> How to use fork() system function to fork multi child process at the same time ?
>>
>> For example:
>>
>> Run a program to fork 5 child process at the same time and the parent must wait
>> until all child exit.
>>
>
>This shows the principle :
>
>
>for ( 1 .. 5 )
>{
> unless ( fork )
> {
> sleep 5;
> print "child $_ exiting\n";
> exit 0;
> }
>}
>
>1 while( wait > 0 );
>print "All children finished\n";
>
>read the perlfunc entries for fork() and wait().
>
>/J\
-- CNews 0.39
------------------------------
Date: 30 Apr 2001 21:32:23 +0800
From: dekuo@hello.com.tw (dekuo)
Subject: Re: How to write a multi process program with perl ?
Message-Id: <9cjpg7$5nt$2@news.ethome.net.tw>
Thanks for your reply..
But I find that this program can not do some thing with parent ?
I have a sample code just only fork one process but it can check now in which process.
===============================================================
if (!defined($kidpid=fork())) {
die "can not fork\n";
}
if ($kidpid == 0) {
# fork returned 0, so this branch is the child
print "PID=$kidpid\n\n";
sleep 30;
exit;
}
else {
# fork returned neither 0 nor undef,
# so this branch is the parent
print "PID=$kidpid\n\n";
waitpid($kidpid, 0);
}
=================================================================
I want the parent to keep 5 child process when one die or exit.
How to do that ?
(Jonathan Stowe) gellyfish@gellyfish.com wrote:
>dekuo <dekuo@hello.com.tw> wrote:
>> How to use fork() system function to fork multi child process at the same time ?
>>
>> For example:
>>
>> Run a program to fork 5 child process at the same time and the parent must wait
>> until all child exit.
>>
>
>This shows the principle :
>
>
>for ( 1 .. 5 )
>{
> unless ( fork )
> {
> sleep 5;
> print "child $_ exiting\n";
> exit 0;
> }
>}
>
>1 while( wait > 0 );
>print "All children finished\n";
>
>read the perlfunc entries for fork() and wait().
>
>/J\
-- CNews 0.39
------------------------------
Date: Mon, 30 Apr 2001 13:17:45 GMT
From: "BarryK" <notmyrealemail@fake.com>
Subject: How to: Create Regex which extracts N number of words before target word
Message-Id: <ZBdH6.42916$U4.10064237@news1.rdc1.tn.home.com>
Assume you have a target word, e.g. "cat", and you want to extract that word
and a certain number of words before it. How is one to do this in a
non-literal manner with a regular expression which will support any number
of pre-words to be extracted?
Following does not work. It should replace target and previous two words, to
wit: word1 word2 Z
#code
$_ = "word1 word2 word3 word4 cat";
s: \b.+\b{2}?cat :Z:xg;
print $_;
#end code
------------------------------
Date: Mon, 30 Apr 2001 14:34:53 GMT
From: garry@ifr.zvolve.net (Garry Williams)
Subject: Re: How to: Create Regex which extracts N number of words before target word
Message-Id: <slrn9equ02.c2k.garry@zfw.zvolve.net>
On Mon, 30 Apr 2001 13:17:45 GMT, BarryK <notmyrealemail@fake.com>
wrote:
> Assume you have a target word, e.g. "cat", and you want to extract
> that word and a certain number of words before it. How is one to do
> this in a non-literal manner with a regular expression which will
> support any number of pre-words to be extracted?
>
> Following does not work. It should replace target and previous two
> words, to wit: word1 word2 Z
>
> #code
>
> $_ = "word1 word2 word3 word4 cat";
>
> s: \b.+\b{2}?cat :Z:xg;
The quantifier ({2}) is quantifying the atom `\b'. I don't think
that's what you meant. The `?' following the quantifier {2} makes no
sense, since the {2} is not allowed any latitude -- it forces exactly
two.
Here's one way to do what I think you want:
$ perl -wle '$_="word1 word2 word3 word4 cat";'
> -e 's/\b(?:\w+ +){2}cat/Z/; print'
word1 word2 Z
$
Obligatory mention: see perlre.
--
Garry Williams
------------------------------
Date: Mon, 30 Apr 2001 08:38:48 -0700
From: carlfox <carlfox@netdoor.com>
Subject: Html link in mysql data
Message-Id: <3AED8708.4C827090@netdoor.com>
Could anyone help me figure out how to make an html tag appear as a link
in mysql data? Mine just appear as the text, as follows:
<A HREF=photo.htm>Go to Photo</a>
I want to be able to click on the link to take me elsewhere from witin
the mysql data presentation.
Carl Fox
------------------------------
Date: Mon, 30 Apr 2001 07:26:01 -0600
From: "bowman" <bowman@montana.com>
Subject: Re: Jeopardy (was Re: First and last element in list loop)
Message-Id: <EHdH6.2496$st.18158@newsfeed.slurp.net>
"Eric Bohlman" <ebohlman@omsdev.com> wrote in message
news:9ciogi$83f$1@bob.news.rcn.net...
>
> Even better argument, though, for aggressively *trimming* the material you
> quote. It is *not* necessary for each entry in a thread to contain a
> quote of the entire thread, or even of the entire previous entry.
agreed. the worst abuse of any ng or maillist i'm on is the ActiveState
perl/Python lists --- very few people trim anything, and in most cases the
material is duplicated in text and html.
------------------------------
Date: Mon, 30 Apr 2001 09:47:41 -0400
From: "Jason C. Hill" <jhill@technoslave.net>
Subject: Need help with regexp and returned data.
Message-Id: <9cjqdo$rrc@spamz.news.aol.com>
Here is the code:
my @sardata = <$sock>;
foreach $lines (@sardata) {
if ($lines =~ /atch/ .. /Average/) {
print "$lines";
}
}
Basically, we've opened a Socket to a port, grabbed some type of ASCII Data
and put it all in an array "sardata"
The data basically looks like
hostname
atch
Average
freemem
Average
%usr
Average
Basically, I want to search through this data, and ONLY grab the information
from a unique id "atch" to the FIRST instance of Average after the unique id
"atch". With the thought in mind, that the next time through I'll want to
do it again from freemem to the next instance of Average after freemem.
The Perl Cookbook showed something similar to above, but I believe it used a
while loop. I'm pretty sure I'm close to solving it, but something is
eluding me. If someone out there could help clarify this for me, and give
me an example, I'd appreciate it.
Thanks,
-Jason
------------------------------
Date: Mon, 30 Apr 2001 10:15:12 -0400
From: "Jason C. Hill" <jhill@technoslave.net>
Subject: Re: Need help with regexp and returned data.
Message-Id: <9cjs1b$s58@spamz.news.aol.com>
Well it appears that doing a
for (@sardata)
instead of a foreach works...boggle that...
-J
------------------------------
Date: 30 Apr 2001 14:54:33 GMT
From: mjtg@cus.cam.ac.uk (M.J.T. Guy)
Subject: Re: Need help with regexp and returned data.
Message-Id: <9cjub9$8r0$1@pegasus.csx.cam.ac.uk>
Jason C. Hill <jhill@technoslave.net> wrote:
>Well it appears that doing a
>
>for (@sardata)
>
>instead of a foreach works...boggle that...
I don't believe that. I think your real problem is that you have
if ($lines =~ /atch/ .. /Average/) {
where you actually want something like
if ($lines =~ /atch/ .. $lines =~ /Average/) {
so that both your regexes are acting on $lines instead of $_.
And you might like to consider whether you want to anchor those regexes.
And whether they wouldn't be better replaced by 'eq' tests.
Mike Guy
------------------------------
Date: Mon, 30 Apr 2001 14:08:30 -0000
From: Greg Bacon <gbacon@cs.uah.edu>
Subject: New posters to comp.lang.perl.misc
Message-Id: <teqseu9dq2l757@corp.supernews.com>
Following is a summary of articles from new posters spanning a 7 day
period, beginning at 23 Apr 2001 15:08:42 GMT and ending at
30 Apr 2001 13:51:00 GMT.
Notes
=====
- A line in the body of a post is considered to be original if it
does *not* match the regular expression /^\s{0,3}(?:>|:|\S+>|\+\+)/.
- All text after the last cut line (/^-- $/) in the body is
considered to be the author's signature.
- The scanner prefers the Reply-To: header over the From: header
in determining the "real" email address and name.
- Original Content Rating (OCR) is the ratio of the original content
volume to the total body volume.
- Find the News-Scan distribution on the CPAN!
<URL:http://www.perl.com/CPAN/modules/by-module/News/>
- Please send all comments to Greg Bacon <gbacon@cs.uah.edu>.
- Copyright (c) 2001 Greg Bacon.
Verbatim copying and redistribution is permitted without royalty;
alteration is not permitted. Redistribution and/or use for any
commercial purpose is prohibited.
Totals
======
Posters: 144 (41.3% of all posters)
Articles: 273 (20.1% of all articles)
Volume generated: 450.1 kb (19.0% of total volume)
- headers: 228.2 kb (4,464 lines)
- bodies: 217.9 kb (7,455 lines)
- original: 139.0 kb (5,039 lines)
- signatures: 3.7 kb (101 lines)
Original Content Rating: 0.638
Averages
========
Posts per poster: 1.9
median: 1.0 post
mode: 1 post - 99 posters
s: 2.2 posts
Message size: 1688.4 bytes
- header: 856.0 bytes (16.4 lines)
- body: 817.5 bytes (27.3 lines)
- original: 521.5 bytes (18.5 lines)
- signature: 13.9 bytes (0.4 lines)
Top 10 Posters by Number of Posts
=================================
(kb) (kb) (kb) (kb)
Posts Volume ( hdr/ body/ orig) Address
----- -------------------------- -------
15 22.1 ( 15.0/ 7.1/ 2.6) "BarryK" <notmyrealemail@fake.com>
11 16.8 ( 8.1/ 8.7/ 3.1) Martin Djernaes <martin@djernaes.net>
10 18.5 ( 9.5/ 9.0/ 6.2) Milton Road <miltonroad@btinternet.com>
9 19.1 ( 7.8/ 11.3/ 11.3) ixlu@PCGuide.com
8 8.3 ( 5.5/ 2.0/ 1.4) Samuel Thomas <sthomas@ws5120.nc.fnc.fujitsu.com>
8 13.7 ( 7.6/ 6.2/ 1.7) "Super-Simon" <simon@super-simon.com>
8 20.2 ( 8.4/ 11.8/ 5.1) "Einhardschule Seligenstadt" <webmaster@einhardschule.de>
7 10.3 ( 5.4/ 4.9/ 2.5) "Wenzel, Joel [CAR:VS11:EXCH]" <coopvs14@americasm01.nt.com>
6 19.3 ( 8.3/ 11.1/ 7.5) Andrew Lee <andrew_lee@nospamearthlink.net>
6 6.9 ( 5.1/ 1.8/ 1.0) "Paul Kersey" <mk@ticklets.com>
These posters accounted for 6.5% of all articles.
Top 10 Posters by Volume
========================
(kb) (kb) (kb) (kb)
Volume ( hdr/ body/ orig) Posts Address
-------------------------- ----- -------
22.1 ( 15.0/ 7.1/ 2.6) 15 "BarryK" <notmyrealemail@fake.com>
20.2 ( 8.4/ 11.8/ 5.1) 8 "Einhardschule Seligenstadt" <webmaster@einhardschule.de>
19.3 ( 8.3/ 11.1/ 7.5) 6 Andrew Lee <andrew_lee@nospamearthlink.net>
19.1 ( 7.8/ 11.3/ 11.3) 9 ixlu@PCGuide.com
18.5 ( 9.5/ 9.0/ 6.2) 10 Milton Road <miltonroad@btinternet.com>
16.8 ( 8.1/ 8.7/ 3.1) 11 Martin Djernaes <martin@djernaes.net>
13.7 ( 7.6/ 6.2/ 1.7) 8 "Super-Simon" <simon@super-simon.com>
10.3 ( 5.4/ 4.9/ 2.5) 7 "Wenzel, Joel [CAR:VS11:EXCH]" <coopvs14@americasm01.nt.com>
8.3 ( 5.5/ 2.0/ 1.4) 8 Samuel Thomas <sthomas@ws5120.nc.fnc.fujitsu.com>
8.1 ( 1.8/ 6.3/ 3.3) 2 "Tuan Ngo" <tuan.ngo1@home.com>
These posters accounted for 6.6% of the total volume.
Top 10 Posters by OCR (minimum of three posts)
==============================================
(kb) (kb)
OCR orig / body Posts Address
----- -------------- ----- -------
1.000 ( 11.3 / 11.3) 9 ixlu@PCGuide.com
0.941 ( 4.2 / 4.5) 3 Matthew Black <black@csulb.edu>
0.847 ( 0.6 / 0.7) 3 BigMacAttack <none@nope.net>
0.815 ( 0.6 / 0.7) 3 "Dean Wakerley" <dean@housefloors.co.uk>
0.704 ( 2.0 / 2.8) 4 pat <tulask@hotmail.com>
0.684 ( 6.2 / 9.0) 10 Milton Road <miltonroad@btinternet.com>
0.678 ( 7.5 / 11.1) 6 Andrew Lee <andrew_lee@nospamearthlink.net>
0.673 ( 1.4 / 2.0) 8 Samuel Thomas <sthomas@ws5120.nc.fnc.fujitsu.com>
0.648 ( 2.0 / 3.0) 4 Billy Chambless <bchambless@nrlssc.navy.mil>
0.540 ( 1.1 / 2.0) 3 "Brian Richardson" <lamecow78@hotmail.com>
Bottom 10 Posters by OCR (minimum of three posts)
=================================================
(kb) (kb)
OCR orig / body Posts Address
----- -------------- ----- -------
0.524 ( 2.2 / 4.1) 4 "Jason Hurst" <jasonh@colubs.com>
0.514 ( 2.5 / 4.9) 7 "Wenzel, Joel [CAR:VS11:EXCH]" <coopvs14@americasm01.nt.com>
0.442 ( 1.1 / 2.4) 4 Ronald Fischer <ronald.fischer@deadspam.com>
0.434 ( 5.1 / 11.8) 8 "Einhardschule Seligenstadt" <webmaster@einhardschule.de>
0.367 ( 2.6 / 7.1) 15 "BarryK" <notmyrealemail@fake.com>
0.352 ( 3.1 / 8.7) 11 Martin Djernaes <martin@djernaes.net>
0.318 ( 0.5 / 1.7) 3 "Pally Kuo" <pally@axtronics.com.tw>
0.310 ( 0.6 / 1.8) 3 Boris Zentner <boris@m2b.de>
0.273 ( 1.7 / 6.2) 8 "Super-Simon" <simon@super-simon.com>
0.228 ( 0.5 / 2.1) 4 lckun <lckun@chollian.net>
21 posters (14%) had at least three posts.
Top 10 Targets for Crossposts
=============================
Articles Newsgroup
-------- ---------
51 alt.perl
47 comp.lang.perl
46 comp.lang.perl.modules
45 alt.perl.sockets
43 alt.comp.perlcgi.freelance
9 comp.sys.sgi.misc
9 comp.sys.sgi.admin
6 comp.lang.perl.moderated
5 de.comp.lang.perl.cgi
4 comp.perl.lang
Top 10 Crossposters
===================
Articles Address
-------- -------
29 "Super-Simon" <simon@super-simon.com>
9 "Dot Common Sense" <dot-common-sense@lineone.net>
9 "xcyber" <xcyber@yahoo.com>
6 "Brian Richardson" <lamecow78@hotmail.com>
4 Mike O'Connor <mjo@dojo.mi.org>
4 "Dirk Van de moortel" <dirkvandemoortel@ThankS-NO-SperM.hotmail.com>
4 "Aaron Gross" <amgross@*nospam*westernind.com>
4 "Remko Lems" <rle@keygene_dot_com>
4 "Michael Ströck" <michael@stroeck.com>
4 "John" <bodybuilder_98@hotmail.com>
------------------------------
Date: Mon, 30 Apr 2001 15:15:29 +0100
From: "cjam" <webdaddy@delete.operamail.com>
Subject: newbie question
Message-Id: <zqeH6.7467$wO6.1310116@news2-win.server.ntlworld.com>
Hi, this hopefully isn't too stupid of a question......
I have a guestbook script i got from elsewhere. On my website it works
perfectly in the given cgi-bin.
My question is:
I'm running Windows2k with IIS5.0 webserver and want to run my scripts on
http://localhost.
What do i need to do to make a cgi-bin??
I have set the paths correctly in the perl script to point to my test
cgi-bin (on the path of localhost)
and I've set the permissions on it to be ReadWriteExecute for both the
folder and in the IIS properties....
when i try to click on that script from a browser, it justs asks me whether
I want to save or open it. (in an editor)
...By the way, I do have Perl installed!
What else do i need to do??
thanks,
cjam
------------------------------
Date: Mon, 30 Apr 2001 07:20:19 -0600
From: "bowman" <bowman@montana.com>
Subject: Re: Perl Editors?
Message-Id: <iCdH6.2495$st.17850@newsfeed.slurp.net>
"Rob" <"relaxedrob@optushome.com.au"> wrote in message
news:tHbH6.51243$Xx3.291123@news1.eburwd1.vic.optushome.com.au...
>
> I am using ActivePerl for Windows and would really like to get my hands on
a
> decent Perl editor that would at the very least allow me to run a script,
> accept standard input and display standard output ok.
I've been playing with Komodo recently, and it looks quite promising.
Caveat: I am running a 1 gig box; didn't even bother to dl'd it for the 233
meg. Other than that, gVim is my all time, all purpose, tool.
------------------------------
Date: Mon, 30 Apr 2001 09:06:38 -0400
From: David Coppit <newspost@coppit.org>
Subject: Re: Point of using perlcc
Message-Id: <Pine.SUN.4.33.0104300903140.7515-100000@mamba.cs.Virginia.EDU>
On Sun, 29 Apr 2001, flash wrote:
> But doesn't the compiled program only work on the os it was compiled on?
>
> So therefor if perl was standard couldn't you assume that it would be there.
Except it's not standard on Windows, and most Windows users don't want
to be bothered to install it. Heck, lots of Unix users would rather
download a binary than deal with installing non-standard modules.
Also, you may require a version of Perl that isn't installed on the
system. (e.g. I recently found a bug in Perl 5.7.0 that kills my
program. :( )
> I agree that it is good for usin when you have 5+ modules
> (i use 6 seperat ones in a script(using require statment))
Especially when your user may have to install a non-standard module in
their own private library...
David
------------------------------
Date: 30 Apr 2001 09:35:37 -0400
From: Jonathan Feinberg <jdf@pobox.com>
Subject: Re: Question: WWW::Search - the second page
Message-Id: <3daq7bo6.fsf@pobox.com>
Michael <michael_of_neb@MailAndNews.com> writes:
> How do you make the search using these modules continue after the
> first page ?
The WWW::Search module is documented as supporting a
maximum_to_retrieve method. You will probably have to do some minor
detective work on AltaVista (or whichever engine you're using) to see
which values the search engine actually supports.
--
Jonathan Feinberg jdf@pobox.com Sunny Brooklyn, NY
http://pobox.com/~jdf
------------------------------
Date: Mon, 30 Apr 2001 08:15:48 -0400
From: tadmc@augustmail.com (Tad McClellan)
Subject: Re: reg exp
Message-Id: <slrn9eqlrk.fe1.tadmc@tadmc26.august.net>
Simon Flack <news@simonflack.com> wrote:
>> For single character translations you should look into the tr/// (y///)
>> operator. Not only is it faster than s///, it also has a modifier to do
>> exactly what you want.
>>
>> read about it in perlop.
>>
>> For what you want, tr/ /%/s should do the trick
^
^
>He doesn't want single character traslations -
That's fine, as the code above does not do single character traslations.
Did you try the code?
Did you read up on what the "s" at the end does?
>he wants s/\s+/%/g
^^
^^
He did not say he wanted to squeeze tabs, formfeeds, newlines and
carriage returns along with the spaces, only the space characters.
tr/ /%/s *is* s/ +/%/g, only it is boatloads faster.
------------------------------
#!/usr/bin/perl -w
use Benchmark;
timethese 5_000_000, {
control => q( my $str = 'foo bar baz';),
s => q( my $str = 'foo bar baz'; $str =~ s/ +/%/g),
ss => q( my $str = 'foo bar baz'; $str =~ s/\s+/%/g),
tr => q( my $str = 'foo bar baz'; $str =~ tr/ /%/s),
};
------------------------------
(partial) output:
Benchmark: timing 5000000 iterations of control, s, ss, tr...
control: 5 wallclock secs ( 4.57 usr + -0.01 sys = 4.56 CPU)
s: 40 wallclock secs (37.68 usr + 0.05 sys = 37.73 CPU)
ss: 33 wallclock secs (32.25 usr + 0.01 sys = 32.26 CPU)
tr: 14 wallclock secs (14.20 usr + 0.00 sys = 14.20 CPU)
>Assuming that he later wants to split the string into an array he could
>split on '%', but he could also avoid that step by just doing this:
>split /\s+/, $string;
You (again) mean / +/ instead.
--
Tad McClellan SGML consulting
tadmc@augustmail.com Perl programming
Fort Worth, Texas
------------------------------
Date: Mon, 30 Apr 2001 14:48:35 +0100
From: "Simon Flack" <news@simonflack.com>
Subject: Re: reg exp
Message-Id: <9cjqpg$ed7el$1@ID-83895.news.dfncis.de>
Thanks for pointing that out. Off to read more perlop!
Simon
------------------------------
Date: Mon, 30 Apr 2001 07:50:23 -0400
From: tadmc@augustmail.com (Tad McClellan)
Subject: Re: Removing Lines... how's this?
Message-Id: <slrn9eqkbv.fe1.tadmc@tadmc26.august.net>
BUCK NAKED1 <dennis100@webtv.net> wrote:
>There's probably at least 10 different ways to remove 3
>lines.
And to "get your work done" you need only discover 1 of the 10 ways.
If there is only "one true way" (1TW), then you must continue searching
until you find it before you can proceed.
>That may be good for some people, but perl would be less
>confusing to me if there was only one way to do something.
Would English be less confusing if there was only one way to
say something? :-)
Perl was specifically designed to allow more than one way to do something:
http://www.wall.org/~larry/natural.html
>The language
>would be smaller and perhaps run faster too.
But all the Perl programmers would be less productive, as they would
have to continue searching until they found the 1TW.
>Well, I doubt if perl will
>change,
Perl will change, but I doubt the TMTOWTDI aspect will.
>so I guess I'll have to. :-)
Perl often changes the way people think. Must be changing them for
the better, else it would not be as popular as it is.
--
Tad McClellan SGML consulting
tadmc@augustmail.com Perl programming
Fort Worth, Texas
------------------------------
Date: Mon, 30 Apr 2001 14:08:26 -0000
From: Greg Bacon <gbacon@cs.uah.edu>
Subject: Statistics for comp.lang.perl.misc
Message-Id: <teqseqhqequn53@corp.supernews.com>
Following is a summary of articles spanning a 7 day period,
beginning at 23 Apr 2001 15:08:42 GMT and ending at
30 Apr 2001 13:51:00 GMT.
Notes
=====
- A line in the body of a post is considered to be original if it
does *not* match the regular expression /^\s{0,3}(?:>|:|\S+>|\+\+)/.
- All text after the last cut line (/^-- $/) in the body is
considered to be the author's signature.
- The scanner prefers the Reply-To: header over the From: header
in determining the "real" email address and name.
- Original Content Rating (OCR) is the ratio of the original content
volume to the total body volume.
- Find the News-Scan distribution on the CPAN!
<URL:http://www.perl.com/CPAN/modules/by-module/News/>
- Please send all comments to Greg Bacon <gbacon@cs.uah.edu>.
- Copyright (c) 2001 Greg Bacon.
Verbatim copying and redistribution is permitted without royalty;
alteration is not permitted. Redistribution and/or use for any
commercial purpose is prohibited.
Excluded Posters
================
perlfaq-suggestions\@(?:.*\.)?perl\.com
faq\@(?:.*\.)?denver\.pm\.org
Totals
======
Posters: 349
Articles: 1358 (614 with cutlined signatures)
Threads: 268
Volume generated: 2365.6 kb
- headers: 1141.3 kb (21,667 lines)
- bodies: 1144.8 kb (38,049 lines)
- original: 699.4 kb (25,203 lines)
- signatures: 78.2 kb (1,936 lines)
Original Content Rating: 0.611
Averages
========
Posts per poster: 3.9
median: 1 post
mode: 1 post - 191 posters
s: 8.6 posts
Posts per thread: 5.1
median: 3.0 posts
mode: 2 posts - 60 threads
s: 6.3 posts
Message size: 1783.8 bytes
- header: 860.6 bytes (16.0 lines)
- body: 863.2 bytes (28.0 lines)
- original: 527.4 bytes (18.6 lines)
- signature: 59.0 bytes (1.4 lines)
Top 10 Posters by Number of Posts
=================================
(kb) (kb) (kb) (kb)
Posts Volume ( hdr/ body/ orig) Address
----- -------------------------- -------
97 160.4 ( 75.7/ 84.6/ 35.0) Anno Siegel <anno4000@lublin.zrz.tu-berlin.de>
58 83.2 ( 51.3/ 31.5/ 17.5) Bart Lateur <bart.lateur@skynet.be>
48 98.8 ( 45.7/ 46.6/ 44.8) abigail@foad.org
42 86.1 ( 33.5/ 49.3/ 30.3) nobull@mail.com
39 82.0 ( 43.1/ 33.5/ 21.1) tadmc@augustmail.com
39 56.8 ( 26.3/ 25.2/ 10.1) Jonathan Stowe <gellyfish@gellyfish.com>
35 75.4 ( 33.1/ 32.9/ 13.6) eins@durchnull.de
33 64.9 ( 33.7/ 30.3/ 19.9) Ren Maddox <ren@tivoli.com>
29 63.0 ( 17.7/ 41.5/ 24.2) Chris Stith <mischief@velma.motion.net>
27 43.0 ( 24.6/ 18.4/ 8.5) "Gregory Toomey" <gtoomey@usa.net>
These posters accounted for 32.9% of all articles.
Top 10 Posters by Volume
========================
(kb) (kb) (kb) (kb)
Volume ( hdr/ body/ orig) Posts Address
-------------------------- ----- -------
160.4 ( 75.7/ 84.6/ 35.0) 97 Anno Siegel <anno4000@lublin.zrz.tu-berlin.de>
98.8 ( 45.7/ 46.6/ 44.8) 48 abigail@foad.org
86.1 ( 33.5/ 49.3/ 30.3) 42 nobull@mail.com
83.2 ( 51.3/ 31.5/ 17.5) 58 Bart Lateur <bart.lateur@skynet.be>
82.0 ( 43.1/ 33.5/ 21.1) 39 tadmc@augustmail.com
75.4 ( 33.1/ 32.9/ 13.6) 35 eins@durchnull.de
64.9 ( 33.7/ 30.3/ 19.9) 33 Ren Maddox <ren@tivoli.com>
63.0 ( 17.7/ 41.5/ 24.2) 29 Chris Stith <mischief@velma.motion.net>
56.8 ( 26.3/ 25.2/ 10.1) 39 Jonathan Stowe <gellyfish@gellyfish.com>
54.5 ( 14.6/ 36.9/ 36.8) 20 "Scott R. Godin" <webmaster@webdragon.unmunge.net>
These posters accounted for 34.9% of the total volume.
Top 10 Posters by OCR (minimum of five posts)
==============================================
(kb) (kb)
OCR orig / body Posts Address
----- -------------- ----- -------
1.000 ( 11.3 / 11.3) 9 ixlu@PCGuide.com
1.000 ( 5.1 / 5.1) 10 Rafael Garcia-Suarez <rgarciasuarez@free.fr>
0.995 ( 36.8 / 36.9) 20 "Scott R. Godin" <webmaster@webdragon.unmunge.net>
0.961 ( 44.8 / 46.6) 48 abigail@foad.org
0.930 ( 18.3 / 19.7) 13 Greg Bacon <gbacon@cs.uah.edu>
0.899 ( 8.0 / 8.9) 8 "John Lin" <johnlin@chttl.com.tw>
0.848 ( 1.5 / 1.8) 6 "Stuart Moore" <stumo@bigfoot.com>
0.783 ( 4.4 / 5.6) 6 "Alan J. Flavell" <flavell@mail.cern.ch>
0.758 ( 10.9 / 14.4) 9 Joe Schaefer <joe+usenet@sunstarsys.com>
0.748 ( 10.4 / 13.9) 18 xris <xris@dont.send.spam>
Bottom 10 Posters by OCR (minimum of five posts)
=================================================
(kb) (kb)
OCR orig / body Posts Address
----- -------------- ----- -------
0.367 ( 2.6 / 7.1) 15 "BarryK" <notmyrealemail@fake.com>
0.365 ( 6.4 / 17.5) 22 Uri Guttman <uri@sysarch.com>
0.361 ( 2.0 / 5.6) 8 David Bouman <david.bouman@nl.xo.com>
0.352 ( 3.1 / 8.7) 11 Martin Djernaes <martin@djernaes.net>
0.323 ( 1.3 / 4.0) 8 Randal L. Schwartz <merlyn@stonehenge.com>
0.320 ( 1.3 / 4.1) 5 garry@zvolve.com
0.273 ( 1.7 / 6.2) 8 "Super-Simon" <simon@super-simon.com>
0.253 ( 3.9 / 15.6) 9 Paul the Nomad <taka@yarn.demon.co.uk>
0.251 ( 0.9 / 3.7) 6 Vinny Murphy <vmurphy@Cisco.Com>
0.243 ( 1.5 / 6.0) 6 "Todd Smith" <todd@designsouth.net>
58 posters (16%) had at least five posts.
Top 10 Threads by Number of Posts
=================================
Posts Subject
----- -------
57 Good editor for perl
43 match a range of number
33 Appending to files and flock.
32 Regular expression for zip code
28 First and last element in list loop
23 operators: != vs. ne, strange behaviour
20 Tcl is faster then perl.
19 re-sizing GIF images on the fly
18 Help for scrpit line..
17 Should Perl be first?
These threads accounted for 21.4% of all articles.
Top 10 Threads by Volume
========================
(kb) (kb) (kb) (kb)
Volume ( hdr/ body/ orig) Posts Subject
-------------------------- ----- -------
94.2 ( 49.9/ 41.7/ 18.5) 57 Good editor for perl
84.3 ( 31.0/ 51.0/ 29.2) 33 Appending to files and flock.
73.5 ( 38.4/ 31.8/ 14.9) 43 match a range of number
59.1 ( 27.4/ 28.5/ 15.6) 23 operators: != vs. ne, strange behaviour
54.2 ( 31.6/ 22.3/ 11.9) 32 Regular expression for zip code
50.7 ( 24.6/ 23.6/ 11.0) 28 First and last element in list loop
36.8 ( 7.8/ 28.2/ 22.7) 10 Compression (to .zip/.gz) using system/backticks
33.8 ( 14.9/ 17.9/ 12.9) 17 Strange string -> num conversion
30.6 ( 13.7/ 15.6/ 11.4) 17 Should Perl be first?
30.1 ( 13.4/ 16.1/ 10.2) 16 Please help
These threads accounted for 23.1% of the total volume.
Top 10 Threads by OCR (minimum of five posts)
==============================================
(kb) (kb)
OCR orig / body Posts Subject
----- -------------- ----- -------
0.930 ( 4.5/ 4.8) 7 weird 'use constant' behaviour. Suggestions?
0.909 ( 5.5/ 6.1) 5 Levels of perl programming
0.864 ( 8.9/ 10.3) 9 Must send lots of emails
0.810 ( 3.9/ 4.9) 6 Question on variable substitution
0.805 ( 22.7/ 28.2) 10 Compression (to .zip/.gz) using system/backticks
0.793 ( 1.4/ 1.8) 5 avoid having to hit the enter key
0.787 ( 5.6/ 7.1) 8 [Regex] Number of Matches
0.781 ( 1.8/ 2.3) 5 help needed with strings
0.770 ( 8.3/ 10.8) 8 Simple newbie performance question
0.751 ( 3.1/ 4.1) 6 expressions
Bottom 10 Threads by OCR (minimum of five posts)
=================================================
(kb) (kb)
OCR orig / body Posts Subject
----- -------------- ----- -------
0.466 ( 5.3 / 11.3) 20 Tcl is faster then perl.
0.466 ( 1.8 / 3.9) 8 s///g count
0.448 ( 1.9 / 4.3) 6 US$50 prize for hash failure from 'delete' inside an 'each' loop
0.443 ( 18.5 / 41.7) 57 Good editor for perl
0.427 ( 2.1 / 4.9) 5 use Filter::decrypt; How to encrypt source code first?
0.334 ( 3.1 / 9.4) 10 perl variables problem
0.329 ( 0.9 / 2.6) 5 5.6.0 vs. 5.6.1 (was: Re: Issue with 5.004 to 5.6 upgrade)
0.321 ( 1.8 / 5.5) 7 Newbie question: reading variables with CGI
0.275 ( 2.9 / 10.5) 18 Help for scrpit line..
0.223 ( 0.7 / 3.2) 6 Perl Fehler bei Scriptausführung
93 threads (34%) had at least five posts.
Top 10 Targets for Crossposts
=============================
Articles Newsgroup
-------- ---------
51 alt.perl
47 comp.lang.perl
46 comp.lang.perl.modules
45 alt.perl.sockets
43 alt.comp.perlcgi.freelance
9 comp.sys.sgi.misc
9 comp.sys.sgi.admin
6 comp.lang.perl.moderated
5 de.comp.lang.perl.cgi
4 comp.perl.lang
Top 10 Crossposters
===================
Articles Address
-------- -------
29 "Super-Simon" <simon@super-simon.com>
17 nobull@mail.com
12 "Mark" <moverho1@nycap.rr.com>
9 "xcyber" <xcyber@yahoo.com>
9 Al Dev <alavoor@yahoo.com>
9 "Dot Common Sense" <dot-common-sense@lineone.net>
8 morpheus@here.not.there
7 "smilepak" <smilepak@hotmail.com>
6 "Brian Richardson" <lamecow78@hotmail.com>
5 Chris Stith <mischief@velma.motion.net>
------------------------------
Date: 6 Apr 2001 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin)
Subject: Digest Administrivia (Last modified: 6 Apr 01)
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.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 V10 Issue 801
**************************************