[16374] in Perl-Users-Digest
Perl-Users Digest, Issue: 3786 Volume: 9
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Mon Jul 24 14:10:33 2000
Date: Mon, 24 Jul 2000 11:10:18 -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: <964462218-v9-i3786@ruby.oce.orst.edu>
Content-Type: text
Perl-Users Digest Mon, 24 Jul 2000 Volume: 9 Number: 3786
Today's topics:
New posters to comp.lang.perl.misc <gbacon@cs.uah.edu>
Re: password unix with crypt <bart.lateur@skynet.be>
Pattern Matching HTML <robertNOroSPAM@kronos.custard.org.invalid>
Re: Pattern Matching HTML aqutiv@my-deja.com
Re: Pattern Matching HTML <robertNOroSPAM@kronos.custard.org.invalid>
Re: Pattern Matching HTML <bart.lateur@skynet.be>
Re: Pattern Matching HTML <bart.lateur@skynet.be>
Re: Pattern Matching HTML (Abigail)
Re: perl v. tcl <boakley@vignette.com>
perly.y jdimov@cis.clarion.edu
Problem with URI::URL phil_alex@my-deja.com
Re: READING hashes eats memory!? <mjcarman@home.com>
Re: READING hashes eats memory!? <kenneth.c.barr.nospam@intel.com>
Re: Recursive subroutine output to recursive subroutine <myfirstname.mylastname@nokia.com>
Re: Recursive subroutine output to recursive subroutine <myfirstname.mylastname@nokia.com>
Re: replacing any character except for spaces... <bart.lateur@skynet.be>
Re: Saving space in a hash <russ_jones@rac.ray.com>
Re: Saving space in a hash <nospam@nospam.com>
Searching for errant modules <lorenzo.gordon@lshtm.ac.uk>
Re: Setting $/ from variable - accepting meta character <lr@hpl.hp.com>
Statistics for comp.lang.perl.misc <gbacon@cs.uah.edu>
YAPC::Europe Registration - NOW OPEN! (Leon Brocard)
Digest Administrivia (Last modified: 16 Sep 99) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Mon, 24 Jul 2000 14:49:08 GMT
From: Greg Bacon <gbacon@cs.uah.edu>
Subject: New posters to comp.lang.perl.misc
Message-Id: <snolr4pkjjt75@corp.supernews.com>
Following is a summary of articles from new posters spanning a 7 day
period, beginning at 17 Jul 2000 15:50:01 GMT and ending at
24 Jul 2000 14:18:38 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.
Totals
======
Posters: 411 (57.2% of all posters)
Articles: 718 (36.4% of all articles)
Volume generated: 1182.4 kb (36.2% of total volume)
- headers: 547.6 kb (10,876 lines)
- bodies: 625.5 kb (20,911 lines)
- original: 452.4 kb (15,650 lines)
- signatures: 8.6 kb (225 lines)
Original Content Rating: 0.723
Averages
========
Posts per poster: 1.7
median: 1 post
mode: 1 post - 289 posters
s: 2.7 posts
Message size: 1686.3 bytes
- header: 780.9 bytes (15.1 lines)
- body: 892.1 bytes (29.1 lines)
- original: 645.1 bytes (21.8 lines)
- signature: 12.3 bytes (0.3 lines)
Top 10 Posters by Number of Posts
=================================
(kb) (kb) (kb) (kb)
Posts Volume ( hdr/ body/ orig) Address
----- -------------------------- -------
38 70.0 ( 26.7/ 43.3/ 40.3) Abigail <abigail@delanet.com.bbs@openbazaar.net>
21 31.5 ( 14.5/ 16.3/ 14.8) abigail@foad.org
18 31.0 ( 14.3/ 16.6/ 8.1) aqutiv@my-deja.com
17 29.4 ( 12.3/ 17.2/ 8.4) jason <elephant@squirrelgroup.com.bbs@openbazaar.net>
9 17.3 ( 6.4/ 10.8/ 6.8) Larry Rosler <lr@hpl.hp.com.bbs@openbazaar.net>
9 12.1 ( 6.4/ 5.7/ 3.8) Jakob Schmidt <sumus@aut.dk.bbs@openbazaar.net>
7 12.3 ( 5.1/ 7.1/ 2.9) Mark W. Schumann <catfood@apk.net.bbs@openbazaar.net>
6 8.6 ( 4.2/ 4.3/ 2.5) Logan Shaw <logan@cs.utexas.edu.bbs@openbazaar.net>
6 7.4 ( 4.2/ 3.1/ 1.8) Cameron Kennedy <kenned57@NoSpam.edu>
6 14.3 ( 4.3/ 10.0/ 6.1) Craig Berry <cberry@cinenet.net.bbs@openbazaar.net>
These posters accounted for 6.9% of all articles.
Top 10 Posters by Volume
========================
(kb) (kb) (kb) (kb)
Volume ( hdr/ body/ orig) Posts Address
-------------------------- ----- -------
70.0 ( 26.7/ 43.3/ 40.3) 38 Abigail <abigail@delanet.com.bbs@openbazaar.net>
31.5 ( 14.5/ 16.3/ 14.8) 21 abigail@foad.org
31.0 ( 14.3/ 16.6/ 8.1) 18 aqutiv@my-deja.com
29.4 ( 12.3/ 17.2/ 8.4) 17 jason <elephant@squirrelgroup.com.bbs@openbazaar.net>
18.2 ( 3.3/ 14.9/ 14.5) 3 firstname.lastname@nokia.com
17.3 ( 6.4/ 10.8/ 6.8) 9 Larry Rosler <lr@hpl.hp.com.bbs@openbazaar.net>
14.5 ( 0.9/ 13.6/ 13.5) 1 Pedro Martinez Juliá <pmj@klamath.es>
14.3 ( 4.3/ 10.0/ 6.1) 6 Craig Berry <cberry@cinenet.net.bbs@openbazaar.net>
12.3 ( 5.1/ 7.1/ 2.9) 7 Mark W. Schumann <catfood@apk.net.bbs@openbazaar.net>
12.1 ( 6.4/ 5.7/ 3.8) 9 Jakob Schmidt <sumus@aut.dk.bbs@openbazaar.net>
These posters accounted for 7.7% of the total volume.
Top 10 Posters by OCR (minimum of three posts)
==============================================
(kb) (kb)
OCR orig / body Posts Address
----- -------------- ----- -------
1.000 ( 2.7 / 2.7) 5 jerry <honglan00NOhoSPAM@yahoo.com.invalid>
1.000 ( 0.8 / 0.8) 3 "han" <lihock@pc.jaring.my>
1.000 ( 1.4 / 1.4) 4 pepebordoy@my-deja.com
0.990 ( 1.9 / 1.9) 3 haggi@tappe.net
0.973 ( 14.5 / 14.9) 3 firstname.lastname@nokia.com
0.942 ( 0.7 / 0.8) 3 "suj_h" <suj_h@yahoo.com>
0.930 ( 40.3 / 43.3) 38 Abigail <abigail@delanet.com.bbs@openbazaar.net>
0.914 ( 7.4 / 8.1) 3 RichardWoodward@hotmail.com
0.912 ( 14.8 / 16.3) 21 abigail@foad.org
0.895 ( 2.7 / 3.0) 3 Jeff Davis <jdavis@genesiswd.com>
Bottom 10 Posters by OCR (minimum of three posts)
=================================================
(kb) (kb)
OCR orig / body Posts Address
----- -------------- ----- -------
0.441 ( 0.3 / 0.7) 3 Hessu <qvyht@iobox.fi>
0.421 ( 1.3 / 3.2) 3 "MrClyde" <mrclyde@bolomail.dyn.dhs.org>
0.420 ( 2.2 / 5.2) 5 "Stuart Moore" <stumo@bigfoot.com>
0.405 ( 2.9 / 7.1) 7 Mark W. Schumann <catfood@apk.net.bbs@openbazaar.net>
0.375 ( 0.8 / 2.0) 3 no spam <porthos@goplay_nospam.com>
0.370 ( 2.2 / 6.1) 6 "Colin Larcombe" <colin_larcombe@hotmail.com>
0.369 ( 1.4 / 3.9) 3 cpoole@muskegon.k12.mi.us
0.262 ( 0.7 / 2.5) 3 Prasanth A. Kumar <kumar1@home.com.bbs@openbazaar.net>
0.247 ( 1.1 / 4.6) 5 Sven <buggerm@de.ibm.com>
0.246 ( 0.9 / 3.7) 3 "Pekka Siiskonen" <remove.NoSpam.from.@e-mail.address>
51 posters (12%) had at least three posts.
Top 10 Targets for Crossposts
=============================
Articles Newsgroup
-------- ---------
52 comp.lang.perl.modules
42 alt.perl
17 comp.lang.perl
13 comp.infosystems.www.servers.unix
11 de.comp.lang.php
11 japan.www.server.apache
9 comp.lang.tcl
8 comp.lang.perl.moderated
7 alt.www.webmaster
6 alt.flame
Top 10 Crossposters
===================
Articles Address
-------- -------
6 vartekquest@my-deja.com
4 jazztone <jazztone@earthlink.net>
4 Matthew Pope <mpope@ematchcorp.com>
3 josh <josh@Jessey.uberlab>
3 Jan Schaumann <jschauma@netmeister.org>
3 "Andreas" <andreas@waikato.ac.nz>
3 cpoole@muskegon.k12.mi.us
3 no spam <porthos@goplay_nospam.com>
3 Harry of Harryworld <harryworld@home.com>
3 [ Dr. Jeff ] <anti@spamming.org>
------------------------------
Date: Mon, 24 Jul 2000 17:13:54 GMT
From: Bart Lateur <bart.lateur@skynet.be>
Subject: Re: password unix with crypt
Message-Id: <r6uons4vqpigg1kd34l89b08oa898vl4ld@4ax.com>
Villy Kruse wrote:
>It is actualy not strictly necessary to extract the first two
>characters to get the salt. Specifying the password directly
>as the salt paramter would do as well.
Not necessarily.
For example, on my "European" FreeBSD server (MD5 encryption, because of
USA ban on export of "dangerous" technology),
crypt("Hello, world!","aa")
returns
$1$aa$vCNvcZW/VEIq04KqtIeQn1
See the extra garbage at the front.
--
Bart.
------------------------------
Date: Mon, 24 Jul 2000 06:09:49 -0700
From: Robert <robertNOroSPAM@kronos.custard.org.invalid>
Subject: Pattern Matching HTML
Message-Id: <07d352d0.fb84941d@usw-ex0101-008.remarq.com>
Hello,
I want to add a pattern matching routine to one of my perl
scripts, but am a bit unsure as to how to go about adding it. I
want to search through a HTML file for the following HTML code:
<FONT SIZE=-2>Sunday, July 23, 2000 at 18:01:25</FONT>
<BR><A
HREF="http://www.home.com/cgi-bin/news.pl?action=display&story_id
=5">blah blah blah blah </A>
<BR>blah blah blah blah blah blah blah blah
<DIV ALIGN=right><A
HREF="http://www.home.com/cgi-bin/news.pl?action=display&story_id
=5">read more...</A></DIV>
Is it feasible to assign this code to a string variable such as
this:
$html = "<FONT SIZE=-2>Sunday, July 23, 2000 at
18:01:25</FONT>\n" .
"<BR><A
HREF="http://www.home.com/cgi-bin/news.pl?action=display&story_id
=5">blah blah blah blah </A>\n" .
"<BR>blah blah blah blah blah blah blah blah \n" .
"<DIV ALIGN=right><A
HREF="http://www.home.com/cgi-bin/news.pl?action=display&story_id
=5">read more...</A></DIV>\n";
and then do stuff with it like this:
while (<NEWS>) {
if (/$html/) {
print TMP2 "";
}
else { print TMP2 $_; }
I have tried this but it doesn't appear to work. Is there a
better way of matching a pattern like this?
Thanks for any help you can offer,
Rob.
-----------------------------------------------------------
Got questions? Get answers over the phone at Keen.com.
Up to 100 minutes free!
http://www.keen.com
------------------------------
Date: Mon, 24 Jul 2000 16:19:41 GMT
From: aqutiv@my-deja.com
Subject: Re: Pattern Matching HTML
Message-Id: <8lhqao$s7g$1@nnrp1.deja.com>
In article <07d352d0.fb84941d@usw-ex0101-008.remarq.com>,
Robert <robertNOroSPAM@kronos.custard.org.invalid> wrote:
> Hello,
>
> I want to add a pattern matching routine to one of my perl
> scripts, but am a bit unsure as to how to go about adding it. I
> want to search through a HTML file for the following HTML code:
>
> <FONT SIZE=-2>Sunday, July 23, 2000 at 18:01:25</FONT>
> <BR><A
> HREF="http://www.home.com/cgi-bin/news.pl?action=display&story_id
> =5">blah blah blah blah </A>
> <BR>blah blah blah blah blah blah blah blah
> <DIV ALIGN=right><A
> HREF="http://www.home.com/cgi-bin/news.pl?action=display&story_id
> =5">read more...</A></DIV>
>
> Is it feasible to assign this code to a string variable such as
> this:
>
> $html = "<FONT SIZE=-2>Sunday, July 23, 2000 at
> 18:01:25</FONT>\n" .
> "<BR><A
> HREF="http://www.home.com/cgi-bin/news.pl?action=display&story_id
> =5">blah blah blah blah </A>\n" .
> "<BR>blah blah blah blah blah blah blah blah \n" .
> "<DIV ALIGN=right><A
> HREF="http://www.home.com/cgi-bin/news.pl?action=display&story_id
> =5">read more...</A></DIV>\n";
>
> and then do stuff with it like this:
>
> while (<NEWS>) {
> if (/$html/) {
> print TMP2 "";
> }
> else { print TMP2 $_; }
>
> I have tried this but it doesn't appear to work. Is there a
> better way of matching a pattern like this?
>
> Thanks for any help you can offer,
>
> Rob.
>
You probably need to quote the match... also, I'm not sure if you meant
to that, cause by default it'll read line by line, In that case, I'm
almost sure it'll not work. Anyway, here's a much cleaner way to do
what you tried:
while (<NEWS>) {
print TMP2 unless /\Q$html\E/;
}
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
Date: Mon, 24 Jul 2000 09:53:29 -0700
From: Robert <robertNOroSPAM@kronos.custard.org.invalid>
Subject: Re: Pattern Matching HTML
Message-Id: <16c56ec0.35dcb03f@usw-ex0101-008.remarq.com>
Hi,
thanks for your help with that. Apologies for the lame formatting
- I'm using RemarQ to post messages, and it didn't like the long
lines.
Anyway, the reason for my original posting is that I want to find
a very specific segment of HTML in a certain file, and delete it.
That's why I had the print statement with the null ("") value.
Perhaps there is an easier way of finding it and deleting it. The
problem is that there are 4 lines of HTML to search for with
special characters such as quotes and question marks.
What do you think would be the best way of finding such a match?
I've been reading into pattern matching, but it only really
covers finding single words, or a couple of words, rather than
many lines of text.
Thanks,
Rob.
-----------------------------------------------------------
Got questions? Get answers over the phone at Keen.com.
Up to 100 minutes free!
http://www.keen.com
------------------------------
Date: Mon, 24 Jul 2000 17:32:22 GMT
From: Bart Lateur <bart.lateur@skynet.be>
Subject: Re: Pattern Matching HTML
Message-Id: <mcvons4asutku0rnqhnoh504e63qu5fp92@4ax.com>
Robert wrote:
> if (/$html/) {
I think you want
if (/\Q$html/) {
--
Bart.
------------------------------
Date: Mon, 24 Jul 2000 17:34:06 GMT
From: Bart Lateur <bart.lateur@skynet.be>
Subject: Re: Pattern Matching HTML
Message-Id: <4fvonsols9bbl74irs9phjtctgune4u08u@4ax.com>
Bart Lateur wrote:
>I think you want
>
> if (/\Q$html/) {
But note that it can only work if you've got enough lines in your $_.
Reading abnd testing line by line won't do, since your regex contains
(multiple) newlines.
--
Bart.
------------------------------
Date: 24 Jul 2000 13:45:08 EDT
From: abigail@foad.org (Abigail)
Subject: Re: Pattern Matching HTML
Message-Id: <slrn8np04u.vcg.abigail@alexandra.foad.org>
Robert (robertNOroSPAM@kronos.custard.org.invalid) wrote on MMDXIX
September MCMXCIII in <URL:news:07d352d0.fb84941d@usw-ex0101-008.remarq.com>:
!!
!! Is it feasible to assign this code to a string variable such as
!! this:
!!
!! $html = "<FONT SIZE=-2>Sunday, July 23, 2000 at
!! 18:01:25</FONT>\n" .
!! "<BR><A
!! HREF="http://www.home.com/cgi-bin/news.pl?action=display&story_id
!! =5">blah blah blah blah </A>\n" .
!! "<BR>blah blah blah blah blah blah blah blah \n" .
!! "<DIV ALIGN=right><A
!! HREF="http://www.home.com/cgi-bin/news.pl?action=display&story_id
!! =5">read more...</A></DIV>\n";
!!
!! and then do stuff with it like this:
!!
!! while (<NEWS>) {
!! if (/$html/) {
!! print TMP2 "";
!! }
!! else { print TMP2 $_; }
!!
!! I have tried this but it doesn't appear to work. Is there a
!! better way of matching a pattern like this?
Well, your $html contains regex metacharacter, so it's unlikely to work.
If you want fixed string matching, use index(), not a regex.
Furthermore, <NEWS> suggests you are line by line. $html contains several
newlines. Unlikely to ever match.
Abigail
--
New email address: abigail@foad.org
------------------------------
Date: Mon, 24 Jul 2000 10:46:51 -0500
From: "Bryan Oakley" <boakley@vignette.com>
Subject: Re: perl v. tcl
Message-Id: <8lho6e01gmi@news2.newsguy.com>
"J.M. Ivler" <ivler@basecamp1.netquest.net> wrote in message
news:0wMe5.34293$I7.697955@news-west.usenetserver.com...
> In comp.lang.tcl sjfromm@my-deja.com wrote:
> > What are the pros/cons of tcl vs. perl?
>
>
> 1) People have already given you enough advice
> 2) I'll explain my choice...
>
> I'm a VAX Macro hacker who became a VAX Fortran 4P and then Fortran 77
> hacker who loved DCL. I then started using lisp and found I loved that
> too. Then I was forced to learn Pascal and C and disliked both
> [there were others I disliked, like rpg and colbol (which I also
> taught at one point), but those are the majors). When I moved to *nix I
> learned shell, awk, etc and looked for a decent scripting language. I was
> offered Perl and Tcl. Of the two Perl is more C-like and Tcl is
> lisp-ish. Three guesses on what I chose. :-)
>
> Oh yes. I generally don't write TK but use the wen browser as my interface
> of choice. I like the way Tcl plays on the CGI end, so much that I even
> wrote a book about it. :-)
>
>
Wow. We have a *lot* in common. I used to *love* DCL, and did Fortran for a
number of years. I also get a kick out of programming in Lisp and dislike C.
When I moved to unix I did a lot of shell, awk and sed scripting before
learning perl.
Then I discovered Tcl. Programming became a lot more fun after that :-)
--
Bryan Oakley Vignette, Corp
boakley@vignette.com http://www.vignette.com
http://purl.oclc.org/net/oakley
------------------------------
Date: Mon, 24 Jul 2000 17:33:15 GMT
From: jdimov@cis.clarion.edu
Subject: perly.y
Message-Id: <8lhukr$vvc$1@nnrp1.deja.com>
So... How do I get this little beast to actually perform lexical
analysis on something and spit out parsed code?
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
Date: Mon, 24 Jul 2000 15:16:13 GMT
From: phil_alex@my-deja.com
Subject: Problem with URI::URL
Message-Id: <8lhmjn$pb6$1@nnrp1.deja.com>
Hi,
I'm trying to use the method host on an object URL and i get this
message:
Can't locate object method "host" via package "URI::_generic" at
/usr/lib/perl5/site_perl/5.005/URI/WithBase.pm line 48, <> chunk 1.
I'm using perl 5.005 on a Red Hat 6.2.
Thx in advance
Phil
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
Date: Mon, 24 Jul 2000 08:23:10 -0500
From: Michael Carman <mjcarman@home.com>
Subject: Re: READING hashes eats memory!?
Message-Id: <397C433E.1F907714@home.com>
Ken Barr wrote:
>
> But why does it increase on the =read=? Once the enormous table has
> been build, shouldn't memory usage stabilize?
I would expect so, but the snippet from your original post appears to
have three hashes, not one. I would expect your loop to look more like
this:
foreach my $src (keys %cell) {
foreach my $dst (keys %{$cell{$src}}) {
my $i = $cell{$src}{$dst}{packets};
}
}
Assuming that %cell is the big HoHoH you talked about. Does
%cell{$src}{$dest}{packet} exist *before* starting your loop? If not,
you'll autovivify a whole mess of stuff... And what are %src and %dst
for?
-mjc
------------------------------
Date: Mon, 24 Jul 2000 09:09:49 -0700
From: "Ken Barr" <kenneth.c.barr.nospam@intel.com>
Subject: Re: READING hashes eats memory!?
Message-Id: <8lhpne$pn2@news.or.intel.com>
"Michael Carman" <mjcarman@home.com> wrote in message
news:397C433E.1F907714@home.com...
> Ken Barr wrote:
> >
>
> > But why does it increase on the =read=? Once the enormous table has
> > been build, shouldn't memory usage stabilize?
>
> I would expect so, but the snippet from your original post appears to
> have three hashes, not one. I would expect your loop to look more like
> this:
>
> foreach my $src (keys %cell) {
> foreach my $dst (keys %{$cell{$src}}) {
> my $i = $cell{$src}{$dst}{packets};
> }
> }
>
> Assuming that %cell is the big HoHoH you talked about. Does
> %cell{$src}{$dest}{packet} exist *before* starting your loop? If not,
> you'll autovivify a whole mess of stuff... And what are %src and %dst
> for?
>
> -mjc
Each cell is indexed by a "src" and "dst" and stores "packets" and "length."
I do actually have two other hashes, %src and %dst, so the loops in my
original snippet were more or less correct. The order of the keys in %cell
is unimportant as long as I check each key that appears in %src.
The %cell HoHoH is created before I start to read it as are the %src and
%dst ones, but I think you are close to the answer... The way the memory
usage increases on each iteration makes it seem like the entire hash is
getting duplicated somewhere on each read? Any idea how to prevent that?
The "my" scoping didn't help :(
Thanks,
Ken
------------------------------
Date: Mon, 24 Jul 2000 11:25:10 -0500
From: Jack <myfirstname.mylastname@nokia.com>
Subject: Re: Recursive subroutine output to recursive subroutine problem
Message-Id: <E03D6504458F96F3.427633BC55DB6BDD.2294B990A7976B7D@lp.airnews.net>
On Fri, 21 Jul 2000 23:40:59 GMT, neil@brevity.org (Neil
Kandalgaonkar) wrote:
>On first glance I don't see why. You seem to be initializing all your
>local variables. I tried a recursive sub in a perl4 idiom and it worked
>fine for me. Although you do local($x,$y,$z) = ""; which works, but for
>the wrong reason. You probably want () instead of "" there.
I've noticed that perl4 has no problem with recursive it's just when a
sub routine, which is recursive, is called from another sub routine,
that is also recursive, every time the second sub routine is called it
keeps the values from the pervious call and keep adding on more.
>But like I said before your code, and problem, is just too complicated
>for quick analysis on a newsgroup. Maybe other people are willing to take
>up the challenge as is, but if you could show the behaviour in a *small*
>section of code it would be easier to help you.
Great idea on the smaller version. I was going to do that but decided
to put the whole thing out. I'll rework it as a smaller example and
post it again and see what I get this time.
------------------------------
Date: Mon, 24 Jul 2000 11:27:47 -0500
From: Jack <myfirstname.mylastname@nokia.com>
Subject: Re: Recursive subroutine output to recursive subroutine problem
Message-Id: <A9AE6049F947CC17.881086BE58925914.0D4D19458057A406@lp.airnews.net>
On Sat, 22 Jul 2000 15:39:56 -0400, tadmc@metronet.com (Tad McClellan)
wrote:
>On Fri, 21 Jul 2000 11:37:13 -0500, firstname.lastname@nokia.com <firstname.lastname@nokia.com> wrote:
>>On Fri, 21 Jul 2000 15:18:31 GMT, neil@brevity.org (Neil
>>Kandalgaonkar) wrote:
>>
>>>You have perl4. (Type perl -v at the command line.)
>
>>First I'd like to thank you for your help with this and yes you are
>>right we are using version 4. Now the fun part of getting them to
>>change it.
>
>
>Do they like to be cracked?
>
>If not, show them the CERT security advisories about Perl 4 (and
>some Perl 5s too!).
>
>
>If so, change providers or quit your job, or whatever it takes to
>disassociate yourself from them. They are simply too silly to survive.
Sometimes I wonder what they want and why. Although it sounds
appealing to leave, for now I'll have to wait. I think that for now
that they are so large that a lot of times the 'left hand' doesn't
know what the 'right hand' is doing.
BTW, I'm going to rework the code into a smaller version to simulate
the problem. Hopfully that will help.
------------------------------
Date: Mon, 24 Jul 2000 17:10:08 GMT
From: Bart Lateur <bart.lateur@skynet.be>
Subject: Re: replacing any character except for spaces...
Message-Id: <71uonsc7s4aqmctl0tuedcoa8ohdaisc7e@4ax.com>
Neil Lathwood wrote:
>$data = "1 2 3 4 5 6 7 8 9 0";
>
>I then want to replace all characters except the spaces with a hyperlink
>containing the replaced character I.e:
>
>print "$data"; would print <a href=1>1</a> <a href=2>2</a> ,etc.....
s!(\S+)!<a href=$1>$1</a>!g;
Note that this won't do the "proper thing" for a lot of possible
strings.
--
Bart.
------------------------------
Date: Mon, 24 Jul 2000 08:18:38 -0500
From: Russ Jones <russ_jones@rac.ray.com>
Subject: Re: Saving space in a hash
Message-Id: <397C422E.E34BA655@rac.ray.com>
The WebDragon wrote:
>
> In article <3978410c.43197167@news.newsguy.com>, kcivey@cpcug.org
> (Keith Calvert Ivey) wrote:
>
> | The WebDragon <nospam@nospam.com> wrote:
> | >Russ Jones <russ_jones@rac.ray.com> wrote:
> |
> | > | I'm building a hash that contains the same line of data, referenced
> | > | three different ways, like this:
> | > |
> | > | $snmp{$ip} = $snmp_info;
> | > | $snmp{$dns} = $snmp_info;
> | > | $snmp{$alias} = $snmp_info;
> | >how about a simple HoL ?
> | >
> | > $snmp{$ip} = [ $dns, $alias, $snmp_info ];
> |
> | Presumably the idea is to be able to access the data in
> | $snmp_info by IP address, DNS name, or alias, whichever you
> | happen to have.
Right.
> The real question here is how he plans to
> access and reference the data in question, and he hasn't responded to
> that yet...
This is the first I've seen of any replies, but I think our news
server might have been hosed up last week after the big message
duplication. Anyway...
When I'm accessing the snmp info, I'll have either IP, dns name or
alias for the server in question. "Alias" is actually just the first
"word" of the dns name, so I might be able to just save IP and alias,
and if I get a dns name in with dots in it, split off the first
"word." That would save me one third of the space.
--
Russ Jones - HP OpenView IT/Operatons support
Raytheon Aircraft Company, Wichita KS
russ_jones@rac.ray.com 316-676-0747
Quae narravi, nullo modo negabo. - Catullus
------------------------------
Date: 24 Jul 2000 17:08:37 GMT
From: The WebDragon <nospam@nospam.com>
Subject: Re: Saving space in a hash
Message-Id: <8lht6l$jqo$0@216.155.32.41>
In article <397C422E.E34BA655@rac.ray.com>, Russ Jones
<russ_jones@rac.ray.com> wrote:
| > | >how about a simple HoL ?
| > | >
| > | > $snmp{$ip} = [ $dns, $alias, $snmp_info ];
| > |
| > | Presumably the idea is to be able to access the data in
| > | $snmp_info by IP address, DNS name, or alias, whichever you
| > | happen to have.
|
| Right.
|
| > The real question here is how he plans to
| > access and reference the data in question, and he hasn't responded to
| > that yet...
|
| This is the first I've seen of any replies, but I think our news
| server might have been hosed up last week after the big message
| duplication. Anyway...
|
| When I'm accessing the snmp info, I'll have either IP, dns name or
| alias for the server in question. "Alias" is actually just the first
| "word" of the dns name, so I might be able to just save IP and alias,
| and if I get a dns name in with dots in it, split off the first
| "word." That would save me one third of the space.
in this case, you may want to consider passing $snmp{$ip}, $snmp{$dns},
and $snmp{$alias} a *reference* to the localized (via 'my') \$snmp_info
as it passes through the assignment loops so that all three of those
values contain the same reference and there's only one copy of
$snmp_info per lump instead of three.
This, unless I'm mistaken about how perl handles such things (a
possiblity -- I'm still new to this and thus hope to be corrected by
those more knowledgable if so), should translate into some memory
savings.
--
send mail to mactech (at) webdragon (dot) net instead of the above address.
this is to prevent spamming. e-mail reply-to's have been altered
to prevent scan software from extracting my address for the purpose
of spamming me, which I hate with a passion bordering on obsession.
------------------------------
Date: Mon, 24 Jul 2000 16:05:26 GMT
From: Lorenzo Gordon <lorenzo.gordon@lshtm.ac.uk>
Subject: Searching for errant modules
Message-Id: <8lhpg2$rmh$1@nnrp1.deja.com>
've written an MS Access 97 database (on an NT machine), which I am
trying to access from a Unix Solaris machine.
I have searched many of the WebSites (including the CPAN ones) and
discovered information about the modules I need in relation to this
issue (P1RPC, etc).
I can downlad the source file for all the modules needed (as.gz files).
But I do not have a Win32 version of make, to compile them into modules.
I have looked hard, and cannot find any compiled modules for these
scripts.
I was hoping someone could tell me where I might find compiled modules
for Win32 of:
PlRPC
Net::Daemon
DBI::ProxyServer
DBD::Proxy
Obviously, I have tried the PPM method, but it cannot find them.
As I say, I can download the source code, but without the Win32 version
of make, I cannot do anything with this code.
Your help is greatly appreciated,
Lorenzo.
--
Lorenzo Gordon
Software Applications Developer
London School Of Hygiene & Tropical Medicine
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
Date: Mon, 24 Jul 2000 07:55:41 -0700
From: Larry Rosler <lr@hpl.hp.com>
Subject: Re: Setting $/ from variable - accepting meta characters
Message-Id: <MPG.13e5f8c227941be598abe1@nntp.hpl.hp.com>
In article <8lh6le$dil$1@nnrp1.deja.com>, aqutiv@my-deja.com says...
...
> I think that could do the job:
> my $sep = '\n13';
> $sep =~ s/\\(c|x.|0.)?./qq("$&")/eeg;
> $/ = $sep;
> print "[$/]\n";
>
> \cn, \xnn, and \0nn are escape
> sequence that conclude more the one following chars.
What about \0n and \0nnn ?
--
(Just Another Larry) Rosler
Hewlett-Packard Laboratories
http://www.hpl.hp.com/personal/Larry_Rosler/
lr@hpl.hp.com
------------------------------
Date: Mon, 24 Jul 2000 14:49:01 GMT
From: Greg Bacon <gbacon@cs.uah.edu>
Subject: Statistics for comp.lang.perl.misc
Message-Id: <snolqt4ujjt67@corp.supernews.com>
Following is a summary of articles spanning a 7 day period,
beginning at 17 Jul 2000 15:50:01 GMT and ending at
24 Jul 2000 14:18:38 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: 718
Articles: 1974 (604 with cutlined signatures)
Threads: 510
Volume generated: 3268.0 kb
- headers: 1554.0 kb (30,709 lines)
- bodies: 1642.5 kb (56,091 lines)
- original: 1076.0 kb (39,272 lines)
- signatures: 69.6 kb (1,709 lines)
Original Content Rating: 0.655
Averages
========
Posts per poster: 2.7
median: 1.0 post
mode: 1 post - 430 posters
s: 5.4 posts
Posts per thread: 3.9
median: 3.0 posts
mode: 1 post - 122 threads
s: 4.2 posts
Message size: 1695.2 bytes
- header: 806.1 bytes (15.6 lines)
- body: 852.0 bytes (28.4 lines)
- original: 558.1 bytes (19.9 lines)
- signature: 36.1 bytes (0.9 lines)
Top 10 Posters by Number of Posts
=================================
(kb) (kb) (kb) (kb)
Posts Volume ( hdr/ body/ orig) Address
----- -------------------------- -------
52 84.6 ( 45.0/ 39.6/ 17.2) Drew Simonis <care227@attglobal.net>
51 71.7 ( 44.6/ 26.7/ 16.9) Bart Lateur <bart.lateur@skynet.be>
45 89.3 ( 33.7/ 47.4/ 43.4) abigail@delanet.com
42 70.1 ( 37.2/ 29.6/ 13.7) Jonathan Stowe <gellyfish@gellyfish.com>
38 70.0 ( 26.7/ 43.3/ 40.3) Abigail <abigail@delanet.com.bbs@openbazaar.net>
35 64.6 ( 30.5/ 32.7/ 14.8) jason <elephant@squirrelgroup.com>
34 47.3 ( 24.7/ 18.6/ 10.8) Keith Calvert Ivey <kcivey@cpcug.org>
26 60.4 ( 23.9/ 32.8/ 22.5) "Godzilla!" <godzilla@stomp.stomp.tokyo>
21 31.5 ( 14.5/ 16.3/ 14.8) abigail@foad.org
20 29.4 ( 15.1/ 12.7/ 7.8) nobull@mail.com
These posters accounted for 18.4% of all articles.
Top 10 Posters by Volume
========================
(kb) (kb) (kb) (kb)
Volume ( hdr/ body/ orig) Posts Address
-------------------------- ----- -------
89.3 ( 33.7/ 47.4/ 43.4) 45 abigail@delanet.com
84.6 ( 45.0/ 39.6/ 17.2) 52 Drew Simonis <care227@attglobal.net>
71.7 ( 44.6/ 26.7/ 16.9) 51 Bart Lateur <bart.lateur@skynet.be>
70.1 ( 37.2/ 29.6/ 13.7) 42 Jonathan Stowe <gellyfish@gellyfish.com>
70.0 ( 26.7/ 43.3/ 40.3) 38 Abigail <abigail@delanet.com.bbs@openbazaar.net>
64.6 ( 30.5/ 32.7/ 14.8) 35 jason <elephant@squirrelgroup.com>
60.4 ( 23.9/ 32.8/ 22.5) 26 "Godzilla!" <godzilla@stomp.stomp.tokyo>
47.3 ( 24.7/ 18.6/ 10.8) 34 Keith Calvert Ivey <kcivey@cpcug.org>
36.4 ( 14.9/ 16.3/ 15.9) 19 The WebDragon <nospam@nospam.com>
32.9 ( 19.3/ 13.6/ 9.2) 19 "Cal Henderson" <cal@iamcal.com>
These posters accounted for 19.2% of the total volume.
Top 10 Posters by OCR (minimum of five posts)
==============================================
(kb) (kb)
OCR orig / body Posts Address
----- -------------- ----- -------
1.000 ( 1.9 / 1.9) 6 Taurean <jaurangNOjaSPAM@crosswinds.net.invalid>
1.000 ( 1.6 / 1.6) 5 "James Goodwill" <james@goodwill.globalnet.co.uk>
1.000 ( 2.7 / 2.7) 5 jerry <honglan00NOhoSPAM@yahoo.com.invalid>
1.000 ( 1.3 / 1.3) 5 "Raphael Pirker" <raphaelp@nr1webresource.com>
0.974 ( 15.9 / 16.3) 19 The WebDragon <nospam@nospam.com>
0.930 ( 40.3 / 43.3) 38 Abigail <abigail@delanet.com.bbs@openbazaar.net>
0.917 ( 43.4 / 47.4) 45 abigail@delanet.com
0.912 ( 14.8 / 16.3) 21 abigail@foad.org
0.797 ( 9.4 / 11.8) 9 "Josiah Bryan" <jdb@wcoil.com>
0.794 ( 8.6 / 10.9) 7 Kiralynne Schilitubi <callgirl@la.znet.com>
Bottom 10 Posters by OCR (minimum of five posts)
=================================================
(kb) (kb)
OCR orig / body Posts Address
----- -------------- ----- -------
0.393 ( 1.7 / 4.2) 7 "mike solomon" <mike.solomon@eps.ltd.uk>
0.382 ( 3.8 / 9.9) 9 Mark W. Schumann <catfood@apk.net>
0.381 ( 1.6 / 4.2) 8 Jim Mauldin <mauldin@netstorm.net>
0.373 ( 3.6 / 9.7) 19 Tony Curtis <tony_curtis32@yahoo.com>
0.372 ( 1.3 / 3.6) 6 H C <carvdawg@patriot.net>
0.370 ( 2.2 / 6.1) 6 "Colin Larcombe" <colin_larcombe@hotmail.com>
0.327 ( 1.3 / 4.0) 8 Tom Briles <sariq@texas.net>
0.292 ( 2.0 / 6.9) 7 Pavel Hlavnicka <pavel@gingerall.cz>
0.258 ( 1.4 / 5.3) 5 schnurmann@my-deja.com
0.247 ( 1.1 / 4.6) 5 Sven <buggerm@de.ibm.com>
85 posters (11%) had at least five posts.
Top 10 Threads by Number of Posts
=================================
Posts Subject
----- -------
31 Suggestion for syntax change
27 NEW: AI::NeuralNetwork - idea, comments
24 Matts Script Archive - A critique
24 how to convert "1.2.3.10" to "01020310"?
18 Yet another string manipulation question -
18 Read a file into a hash ?
16 String and Hash question...rather urgent
16 ATTENTION PERL MEATHEADS
15 context confusion
15 Check string for a certain format
These threads accounted for 10.3% of all articles.
Top 10 Threads by Volume
========================
(kb) (kb) (kb) (kb)
Volume ( hdr/ body/ orig) Posts Subject
-------------------------- ----- -------
72.1 ( 18.6/ 51.4/ 40.0) 24 how to convert "1.2.3.10" to "01020310"?
61.0 ( 23.9/ 36.1/ 27.9) 27 NEW: AI::NeuralNetwork - idea, comments
52.6 ( 27.7/ 24.3/ 15.3) 31 Suggestion for syntax change
39.4 ( 20.0/ 18.2/ 10.0) 24 Matts Script Archive - A critique
37.8 ( 14.9/ 22.4/ 10.1) 18 Yet another string manipulation question -
35.6 ( 18.1/ 15.9/ 9.0) 16 ATTENTION PERL MEATHEADS
28.6 ( 13.5/ 14.6/ 10.4) 18 Read a file into a hash ?
27.8 ( 8.9/ 17.8/ 12.2) 12 Unflattening a multi-dimensional array
26.4 ( 11.8/ 14.2/ 8.7) 16 String and Hash question...rather urgent
25.9 ( 7.4/ 18.2/ 16.7) 8 Recursive subroutine output to recursive subroutine problem
These threads accounted for 12.5% of the total volume.
Top 10 Threads by OCR (minimum of five posts)
==============================================
(kb) (kb)
OCR orig / body Posts Subject
----- -------------- ----- -------
1.000 ( 3.2/ 3.2) 8 Unable to append
0.915 ( 16.7/ 18.2) 8 Recursive subroutine output to recursive subroutine problem
0.915 ( 1.6/ 1.7) 5 Perl RTE ?
0.861 ( 5.8/ 6.7) 5 I need some advice
0.858 ( 1.9/ 2.2) 5 HELP - POST to URL and capture results
0.806 ( 8.5/ 10.5) 7 Shortcut for non-defined variables
0.790 ( 7.1/ 8.9) 7 How to detect when an output file is removed
0.784 ( 3.0/ 3.9) 5 humbly parsing Perl
0.783 ( 4.6/ 5.8) 6 Why won't "use strict;" work?
0.782 ( 3.8/ 4.9) 5 Extra Path Information in CGI
Bottom 10 Threads by OCR (minimum of five posts)
=================================================
(kb) (kb)
OCR orig / body Posts Subject
----- -------------- ----- -------
0.435 ( 4.5 / 10.3) 9 Attatchments from client
0.431 ( 2.3 / 5.4) 6 Sign Up Script
0.426 ( 2.1 / 5.0) 6 Swapping items in an array of associative arrays
0.421 ( 1.7 / 4.0) 5 Need Help on Perl CGI...
0.412 ( 3.2 / 7.8) 6 IO:Socket and Timeout => "5" ?
0.405 ( 0.6 / 1.5) 5 Sorting multidimensional arrays
0.402 ( 3.7 / 9.1) 6 File handling problems!!
0.391 ( 3.2 / 8.3) 10 Writing to a file error
0.362 ( 3.6 / 9.8) 13 Problem with reading values out of an ascii file
0.325 ( 1.3 / 4.0) 7 escaping HTML [was: limits on GET]
140 threads (27%) had at least five posts.
Top 10 Targets for Crossposts
=============================
Articles Newsgroup
-------- ---------
52 comp.lang.perl.modules
42 alt.perl
17 comp.lang.perl
13 comp.infosystems.www.servers.unix
11 de.comp.lang.php
11 japan.www.server.apache
9 comp.lang.tcl
8 comp.lang.perl.moderated
7 alt.www.webmaster
6 alt.flame
Top 10 Crossposters
===================
Articles Address
-------- -------
9 "Josiah Bryan" <jdb@wcoil.com>
7 brian d foy <brian@smithrenaud.com>
6 vartekquest@my-deja.com
6 Tom <chaptera@hotmail.com>
5 Steffen Beyer <sb@engelschall.com>
5 Cameron Laird <claird@starbase.neosoft.com>
4 Matthew Pope <mpope@ematchcorp.com>
4 "Eric Selin" <eric.selin@pp.inet.fi>
4 Joe Smith <inwap@best.com>
4 jazztone <jazztone@earthlink.net>
------------------------------
Date: Mon, 24 Jul 2000 12:35:04 GMT
From: acme@ns0.astray.com (Leon Brocard)
Subject: YAPC::Europe Registration - NOW OPEN!
Message-Id: <slrn8noe6q.pne.acme@ns0.astray.com>
YAPC::Europe - Registration
-----------------------------------
Registration for YAPC::Europe is now open at;
http://registration.yapc.org
YAPC::Europe is a grassroots, inexpensive Perl conference modelled
on yapc (Yet Another Perl Conference). It will be held in London, UK
from the 22nd to the 24th September 2000.
Details of the conference can be found at;
http://yapc.org/Europe/
Any questions about the conference should be directed to:
yapc-europe@lists.dircon.co.uk
Cheers! Leon
--
Leon Brocard.............................http://www.astray.com/
yapc::Europe - September 22-24 London - http://yapc.org/Europe/
... Error 404: .signature generator ran out of tuits
------------------------------
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 3786
**************************************