[17079] in Perl-Users-Digest
Perl-Users Digest, Issue: 4491 Volume: 9
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Mon Oct 2 11:12:30 2000
Date: Mon, 2 Oct 2000 08:10:15 -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: <970499415-v9-i4491@ruby.oce.orst.edu>
Content-Type: text
Perl-Users Digest Mon, 2 Oct 2000 Volume: 9 Number: 4491
Today's topics:
Statistics for comp.lang.perl.misc <gbacon@cs.uah.edu>
Still no answer! No one can reply this? i0519@my-deja.com
Re: Strange behaviour with @{...} <mauldin@netstorm.net>
Re: UPgrade to 5.6.0 and mod_perl_problems <randy@theoryx5.uwinnipeg.ca>
using PGP on a linux server via perl <jim@inatos.com>
What's wrong with this regex? <i.m.t.swartjes@wmw.utwente.nl>
Re: What's wrong with this regex? <dsimonis@fiderus.com>
Re: What's wrong with this regex? <cg@schlund.de>
Re: What's wrong with this regex? (Andrew Johnson)
Digest Administrivia (Last modified: 16 Sep 99) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Mon, 02 Oct 2000 14:38:10 -0000
From: Greg Bacon <gbacon@cs.uah.edu>
Subject: Statistics for comp.lang.perl.misc
Message-Id: <sth7eibjgubj8d@corp.supernews.com>
Following is a summary of articles spanning a 7 day period,
beginning at 25 Sep 2000 15:49:39 GMT and ending at
02 Oct 2000 23:41:07 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) 2000 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
Totals
======
Posters: 456
Articles: 1595 (722 with cutlined signatures)
Threads: 379
Volume generated: 2902.9 kb
- headers: 1292.7 kb (25,474 lines)
- bodies: 1503.2 kb (49,307 lines)
- original: 932.4 kb (33,344 lines)
- signatures: 105.5 kb (3,041 lines)
Original Content Rating: 0.620
Averages
========
Posts per poster: 3.5
median: 1.0 post
mode: 1 post - 239 posters
s: 7.0 posts
Posts per thread: 4.2
median: 3 posts
mode: 1 post - 87 threads
s: 5.0 posts
Message size: 1863.7 bytes
- header: 829.9 bytes (16.0 lines)
- body: 965.0 bytes (30.9 lines)
- original: 598.6 bytes (20.9 lines)
- signature: 67.7 bytes (1.9 lines)
Top 10 Posters by Number of Posts
=================================
(kb) (kb) (kb) (kb)
Posts Volume ( hdr/ body/ orig) Address
----- -------------------------- -------
54 105.8 ( 41.1/ 54.9/ 49.7) abigail@foad.org
52 133.1 ( 46.1/ 72.5/ 51.1) "Godzilla!" <godzilla@stomp.stomp.tokyo>
43 73.3 ( 28.2/ 40.2/ 23.1) Larry Rosler <lr@hpl.hp.com>
39 53.0 ( 23.9/ 24.9/ 12.4) Craig Berry <cberry@cinenet.net>
35 65.3 ( 28.5/ 35.8/ 17.5) Ren Maddox <ren.maddox@tivoli.com>
33 89.6 ( 29.2/ 54.0/ 34.2) mgjv@tradingpost.com.au
33 62.5 ( 26.4/ 36.0/ 20.2) amonotod <amonotod@netscape.net>
33 62.5 ( 26.8/ 35.6/ 24.7) Logan Shaw <logan@cs.utexas.edu>
30 60.5 ( 28.8/ 22.7/ 8.8) Uri Guttman <uri@sysarch.com>
28 38.5 ( 25.5/ 12.7/ 8.3) Bart Lateur <bart.lateur@skynet.be>
These posters accounted for 23.8% of all articles.
Top 10 Posters by Volume
========================
(kb) (kb) (kb) (kb)
Volume ( hdr/ body/ orig) Posts Address
-------------------------- ----- -------
133.1 ( 46.1/ 72.5/ 51.1) 52 "Godzilla!" <godzilla@stomp.stomp.tokyo>
105.8 ( 41.1/ 54.9/ 49.7) 54 abigail@foad.org
89.6 ( 29.2/ 54.0/ 34.2) 33 mgjv@tradingpost.com.au
73.3 ( 28.2/ 40.2/ 23.1) 43 Larry Rosler <lr@hpl.hp.com>
65.3 ( 28.5/ 35.8/ 17.5) 35 Ren Maddox <ren.maddox@tivoli.com>
62.5 ( 26.8/ 35.6/ 24.7) 33 Logan Shaw <logan@cs.utexas.edu>
62.5 ( 26.4/ 36.0/ 20.2) 33 amonotod <amonotod@netscape.net>
60.5 ( 28.8/ 22.7/ 8.8) 30 Uri Guttman <uri@sysarch.com>
53.0 ( 23.9/ 24.9/ 12.4) 39 Craig Berry <cberry@cinenet.net>
47.2 ( 19.1/ 23.0/ 17.3) 18 japhy@pobox.com
These posters accounted for 25.9% of the total volume.
Top 10 Posters by OCR (minimum of five posts)
==============================================
(kb) (kb)
OCR orig / body Posts Address
----- -------------- ----- -------
1.000 ( 9.6 / 9.6) 19 David Steuber <nospam@david-steuber.com>
0.905 ( 49.7 / 54.9) 54 abigail@foad.org
0.816 ( 14.8 / 18.2) 18 "Alan J. Flavell" <flavell@mail.cern.ch>
0.814 ( 2.8 / 3.4) 6 Tim Richardson <ter@my-deja.com>
0.775 ( 4.1 / 5.2) 6 "Glyndwr" <glynFOOdwr@FSCKdeleteEmeD.co.uk>
0.774 ( 9.3 / 12.0) 13 Mark-Jason Dominus <mjd@plover.com>
0.755 ( 17.3 / 23.0) 18 japhy@pobox.com
0.752 ( 8.3 / 11.0) 6 garry@america.net
0.742 ( 16.1 / 21.7) 5 James Weisberg <chadbour@wwa.com>
0.737 ( 2.7 / 3.7) 6 Russ Jones <russ_jones@rac.ray.com>
Bottom 10 Posters by OCR (minimum of five posts)
=================================================
(kb) (kb)
OCR orig / body Posts Address
----- -------------- ----- -------
0.388 ( 8.4 / 21.6) 24 jason <elephant@squirrelgroup.com>
0.388 ( 2.8 / 7.2) 14 "Nicolas MONNET" <nico@monnet.to>
0.384 ( 1.5 / 3.8) 9 Drew Simonis <dsimonis@fiderus.com>
0.349 ( 1.8 / 5.3) 9 Jonathan Stowe <gellyfish@gellyfish.com>
0.334 ( 1.3 / 3.8) 5 "qwerty" <vioon@hotmil.com>
0.313 ( 1.2 / 4.0) 5 "Randy Harris" <harrisr@bignet.net>
0.271 ( 5.5 / 20.3) 22 Anders Lund <anders@wall.alweb.dk>
0.238 ( 1.4 / 5.8) 8 Michael Budash <mbudash@sonic.net>
0.181 ( 1.2 / 6.5) 6 Sid Malhotra <sxm124@po.cwru.edu>
0.157 ( 0.8 / 5.1) 5 crowj@aol.com
67 posters (14%) had at least five posts.
Top 10 Threads by Number of Posts
=================================
Posts Subject
----- -------
55 How to get length of scalar?
34 Candidate for the top ten perl mistakes list
31 determine where visitors are "living"
23 Salary Range for Perl Programmers
23 foreach two elements at a time?
20 finding the structure of a hash
20 File upload testing if it's there
18 benefits of arrays over hashes(associative arrays) and vice versa
18 ASAP: How $SCALAR = $LIST
16 Newbie can't handle the "true"th... explanation desired
These threads accounted for 16.2% of all articles.
Top 10 Threads by Volume
========================
(kb) (kb) (kb) (kb)
Volume ( hdr/ body/ orig) Posts Subject
-------------------------- ----- -------
103.7 ( 48.4/ 49.6/ 30.7) 55 How to get length of scalar?
60.4 ( 26.6/ 30.7/ 18.5) 31 determine where visitors are "living"
53.4 ( 32.3/ 18.8/ 12.4) 34 Candidate for the top ten perl mistakes list
50.4 ( 12.4/ 37.5/ 26.2) 15 Questions about space-saving techniques
44.5 ( 18.1/ 23.6/ 12.6) 20 File upload testing if it's there
44.2 ( 18.0/ 24.8/ 15.7) 20 finding the structure of a hash
42.4 ( 20.9/ 18.7/ 13.2) 23 foreach two elements at a time?
38.3 ( 18.9/ 17.2/ 10.1) 23 Salary Range for Perl Programmers
37.6 ( 12.7/ 20.9/ 13.6) 13 splitting lines with a regex
32.6 ( 15.2/ 16.6/ 11.7) 18 benefits of arrays over hashes(associative arrays) and vice versa
These threads accounted for 17.5% of the total volume.
Top 10 Threads by OCR (minimum of five posts)
==============================================
(kb) (kb)
OCR orig / body Posts Subject
----- -------------- ----- -------
0.883 ( 6.1/ 7.0) 6 floating point numbers on C vs. Perl
0.863 ( 12.5/ 14.5) 6 Help with Unix processes. (Urgent!)
0.813 ( 9.6/ 11.8) 10 [IGNORE - OFF TOPIC] Re: Controlling line length read by <>
0.799 ( 7.4/ 9.2) 11 interpreter optimizations
0.765 ( 2.9/ 3.8) 5 What is %{$_}
0.752 ( 1.7/ 2.3) 5 Perl & SQL Server
0.742 ( 2.9/ 3.9) 6 help with a d/l script for pdf files.
0.736 ( 0.8/ 1.1) 5 West Chester, PA 19380 Perl Users Group?
0.731 ( 7.8/ 10.7) 6 why it's called a "hash" (and a whole lot more)
0.723 ( 2.0/ 2.8) 5 DBI and MS-Access
Bottom 10 Threads by OCR (minimum of five posts)
=================================================
(kb) (kb)
OCR orig / body Posts Subject
----- -------------- ----- -------
0.438 ( 1.7 / 4.0) 5 Perl Programmer needed for a quick gig
0.437 ( 1.6 / 3.6) 5 newbie: href and perl
0.428 ( 3.1 / 7.3) 6 Perl & CGI.pm - Textfield passing variable doesnt work
0.427 ( 2.5 / 5.9) 6 newbie question
0.419 ( 1.4 / 3.3) 5 need help with LWP/https/proxy
0.409 ( 1.8 / 4.5) 7 sendmail
0.399 ( 2.4 / 6.1) 6 cgi that grabs html into @ from another cgi page
0.393 ( 1.7 / 4.3) 6 cgi behind proxy server
0.368 ( 2.6 / 7.0) 5 Uncaught exception question
0.340 ( 5.3 / 15.7) 18 ASAP: How $SCALAR = $LIST
107 threads (28%) had at least five posts.
Top 10 Targets for Crossposts
=============================
Articles Newsgroup
-------- ---------
97 alt.perl
40 comp.lang.perl
34 comp.lang.perl.modules
12 alt.comp.perlcgi.freelance
5 alt.html
5 alt.comp.lang.superlang
5 comp.lang.javascript
3 comp.lang.perl.moderated
3 alt.www.webmaster
2 han.comp.lang.perl
Top 10 Crossposters
===================
Articles Address
-------- -------
12 "Mark Carruth" <mcarruth@talk21.com>
9 amonotod <amonotod@netscape.net>
9 mgjv@tradingpost.com.au
9 "vladimir y. plotnikov" <vlad@sas.nsk.su>
8 nobull@mail.com
5 Avi Mintz <Avi.Mintz@nsc.com>
5 "Daniel Longest" <dajr4@vt.edu>
5 "Alan J. Flavell" <flavell@mail.cern.ch>
5 "Nick Emblow, President IT Not Just Bears" <emblow@ozlinx.com.au>
5 Craig Berry <cberry@cinenet.net>
------------------------------
Date: Mon, 02 Oct 2000 13:18:06 GMT
From: i0519@my-deja.com
Subject: Still no answer! No one can reply this?
Message-Id: <8ra1u8$hf8$1@nnrp1.deja.com>
We are waiting for your help!
In article <8r2fla$1p3$1@nnrp1.deja.com>,
i0519@my-deja.com wrote:
> I use
> $text =~ s/%([\dA-Fa-f][\dA-Fa-f])/pack("C",($1))/eg
> to extract the text input by a multiline text.
> But, it can't
> 1. Handle some symbol char,like "=", "|"
> 2. Handle unicode char, like Japanese or Chinese.
>
> Could anybody give me some advice please?
>
> Sent via Deja.com http://www.deja.com/
> Before you buy.
>
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
Date: Mon, 02 Oct 2000 13:27:36 GMT
From: Jim Mauldin <mauldin@netstorm.net>
Subject: Re: Strange behaviour with @{...}
Message-Id: <39D88D07.1C5B5A53@netstorm.net>
Volker Moell wrote:
>
> Hi, all!
>
> I found a strange behaviour concerning the @{...} operator.
> (Don't ask about the sense of this small programm. :)
>
> Call the following program:
>
> #!/usr/bin/perl -w
> use strict;
>
> my $a = undef;
> print $a;
> foreach (@{$a}) { }
> print $a;
>
> The output (both 5.6.x and 5.0.x) will be:
>
> -------------------------(snipp)------------------------
> Use of uninitialized value in print at ./test.pl line 5.
> ARRAY(0x80eedb0)
This behavior is expected, not strange. The construct @{$a} (which
could be stated as @$a in this context) is not an operator. It is an
anonymous array whose referenece is contained in $a. Merely using @{$a}
in a statement causes the reference to spring into existence, even if
the array is empty (Perl tries to be helpful).
BTW, the line
my $a = undef;
is redundant because after the declaration
my $a;
$a exists but is undefined. Also, I believe that
undef $a;
would be the preferred syntax if you wanted to undefine a previously
defined variable.
-- Jim
------------------------------
Date: 2 Oct 2000 13:15:38 GMT
From: Randy Kobes <randy@theoryx5.uwinnipeg.ca>
Subject: Re: UPgrade to 5.6.0 and mod_perl_problems
Message-Id: <8ra1pq$s3q$1@canopus.cc.umanitoba.ca>
In comp.lang.perl.misc, Konstantinos Agouros <elwood@news.agouros.de> wrote:
> I just upgraded to 5.6.0 build a new mod_perl, did a make install (
> of just the mod_perl not the httpd) and tried a few scripts I have
> running. Must went fine, but one script fails (I get an errormessage
> in the browser) and error_log of apache tells me:
> /export/elwood/httpd/bin/httpd: can't resolve symbol 'newCONSTSUB'
> Somebody has an idea what this might be?
> Apache is 1.3.12 and mod_perl is 1.24.
Generally when you build and install mod_perl you also should
install the corresponding apache httpd, as discussed in the
relevant INSTALL file you're following. Does the problem
persist if you also install the apache httpd you built mod_perl with?
best regards,
randy kobes
------------------------------
Date: Mon, 2 Oct 2000 16:03:46 +0100
From: "Jim Wright" <jim@inatos.com>
Subject: using PGP on a linux server via perl
Message-Id: <7s1C5.429$_B5.5215@NewsReader>
Hi there,
I have a problem to overcome that is really starting to get painful. At
its most basic level all I want to do is sign a piece of text by using
'pgps', from a perl script. The problem may be specific to PGP but I
suspect a unix/linux guru without pgp experience will spot the solution.
Before I jump in with the script, heres the pgps command line (modified of
course not to give away my PGP pass phrase!)
pgps -u me@mydomain.net -taf -z mypassphrase preSign.txt
where preSign.txt is the text file I want to sign. Note I happen to need the
original text wrapped in the signature - it returns, when run from shell
(to STDOUT) something like:
Hash: SHA1
blah blah blah!!
Version: PGPfreeware 5.0i for non-commercial use
Charset: noconv
iQA/AwUBOdigQOQC9AESrfIAEQJfdACg3RrMaddBobjq5dIlgNNjW4zrDckAoNno
N1rTcwG2RL62CDmojDWhxyuV
=DrIo
-----END PGP SIGNATURE-----
Thats all well and good - so I put that command into a perl script, thus
open(PH, "pgps -u me@mydomain.net -taf -z mypassphrase preSign.txt|");
while(read(PH, $buffer, 4096) != EOF){
$a .=$buffer;
}
close(PH);
print $a;
run it from the command line (ie not a CGI) and it returns
Version: PGPfreeware 5.0i for non-commercial use
MessageID: q72JvFHEaotPnvx5S1EzSL2qzD7zajVB
owEBVQCq/4kAPwMFADnYoYHkAvQBEq3yABECfIsAoKvb8oW5cecV6opRwcgZWI99
3DlhAKDX3L2lQzfxDN12xViX3HV7LgXhaKwRYgtwcmVTaWduLnR4dDQAAAA=
=3E5n
-----END PGP MESSAGE-----
so what's the problem? well of course it hasn't wrapped the original message
in the signature like before. Ok, a couple of things, yes if somebody knows
how to manually wrap it in there (so that mail clients can verify the
signature) that would solve the problem, but, I would really like to know
what there's a different result!!
Essentially I am getting two different behaviours from pgps, the one from
the perl script is similar to ommiting the 't' option when running from the
command line.
I've read man pgps, man pgp-integration twenty times. Any insight into this
problem would be greatly appreciated.
Jim
PS I reckon this is something to do with the enviroment that perl runs in,
but my unix knowledge isnt that well developed yet.
------------------------------
Date: Mon, 2 Oct 2000 16:30:05 +0200
From: "Ivo Swartjes" <i.m.t.swartjes@wmw.utwente.nl>
Subject: What's wrong with this regex?
Message-Id: <8ra65h$m19$1@dinkel.civ.utwente.nl>
Hi guys,
I'm trying to strip a filename from a path+filename, and am trying to do it
like this ($filename is the path+filename):
$filename =~ /\\(.+?)$/;
I then try to put the part between ( ) in a new variable:
$lastpart = $1;
But it won't work, it matches the whole $filename, or so it seems.
What am I doing wrong?
Thanks in advance,
Ivo
------------------------------
Date: Mon, 02 Oct 2000 10:43:46 -0400
From: Drew Simonis <dsimonis@fiderus.com>
Subject: Re: What's wrong with this regex?
Message-Id: <39D89F22.1719F5AE@fiderus.com>
Ivo Swartjes wrote:
>
> Hi guys,
>
> I'm trying to strip a filename from a path+filename, and am trying to do it
> like this ($filename is the path+filename):
>
> $filename =~ /\\(.+?)$/;
>
Well, this matches a leading backslash followed 1 or more optional
chars. Why did you include the ? in the regex anyway? This:
$filename =~ /\\.+\\(.+)/;
works for me. Assuming your path is delimited by backslashes.
------------------------------
Date: Mon, 02 Oct 2000 16:56:08 +0200
From: Carsten Gaebler <cg@schlund.de>
Subject: Re: What's wrong with this regex?
Message-Id: <39D8A208.DDBEE4EE@schlund.de>
Drew Simonis wrote:
>
> Ivo Swartjes wrote:
> > I'm trying to strip a filename from a path+filename, and am trying to do it
> > like this ($filename is the path+filename):
> >
> > $filename =~ /\\(.+?)$/;
> >
>
> Well, this matches a leading backslash followed 1 or more optional
> chars. Why did you include the ? in the regex anyway? This:
>
> $filename =~ /\\.+\\(.+)/;
>
> works for me. Assuming your path is delimited by backslashes.
It won't work if there are no backslashes at all. This one's more
general:
$filename =~ /([^\\]*)$/;
Matches any trailing non-backslashes.
cg.
------------------------------
Date: Mon, 02 Oct 2000 14:57:19 GMT
From: andrew-johnson@home.com (Andrew Johnson)
Subject: Re: What's wrong with this regex?
Message-Id: <jn1C5.5003$6O5.368840@news1.rdc1.mb.home.com>
In article <8ra65h$m19$1@dinkel.civ.utwente.nl>,
Ivo Swartjes <i.m.t.swartjes@wmw.utwente.nl> wrote:
> Hi guys,
>
> I'm trying to strip a filename from a path+filename, and am trying to do it
> like this ($filename is the path+filename):
>
> $filename =~ /\\(.+?)$/;
>
> I then try to put the part between ( ) in a new variable:
>
> $lastpart = $1;
>
> But it won't work, it matches the whole $filename, or so it seems.
Well, nothing about that regex restricts it from matching from
the first backslash to the end of the string. Perhaps you meant:
$filename =~ /\\([^\\]+)$/;
Or, perhaps you want to look into using the File::Basename module
for a more portable method of accomplishing your goals.
regards,
andrew
--
Andrew L. Johnson http://members.home.net/perl-epwp/
A closed mouth gathers no foot.
------------------------------
Date: 16 Sep 99 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin)
Subject: Digest Administrivia (Last modified: 16 Sep 99)
Message-Id: <null>
Administrivia:
The Perl-Users Digest is a retransmission of the USENET newsgroup
comp.lang.perl.misc. For subscription or unsubscription requests, send
the single line:
subscribe perl-users
or:
unsubscribe perl-users
to almanac@ruby.oce.orst.edu.
| NOTE: The mail to news gateway, and thus the ability to submit articles
| through this service to the newsgroup, has been removed. I do not have
| time to individually vet each article to make sure that someone isn't
| abusing the service, and I no longer have any desire to waste my time
| dealing with the campus admins when some fool complains to them about an
| article that has come through the gateway instead of complaining
| to the source.
To submit articles to comp.lang.perl.announce, send your article to
clpa@perl.com.
To request back copies (available for a week or so), send your request
to almanac@ruby.oce.orst.edu with the command "send perl-users x.y",
where x is the volume number and y is the issue number.
For other requests pertaining to the digest, send mail to
perl-users-request@ruby.oce.orst.edu. Do not waste your time or mine
sending perl questions to the -request address, I don't have time to
answer them even if I did know the answer.
------------------------------
End of Perl-Users Digest V9 Issue 4491
**************************************