[11650] in Perl-Users-Digest
Perl-Users Digest, Issue: 5250 Volume: 8
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Mon Mar 29 10:03:48 1999
Date: Mon, 29 Mar 99 07:01:33 -0800
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Perl-Users Digest Mon, 29 Mar 1999 Volume: 8 Number: 5250
Today's topics:
Statistics for comp.lang.perl.misc <gbacon@cs.uah.edu>
Re: Very large float arrays and size problem <jdf@pobox.com>
Re: Where to start with Perl (Randal L. Schwartz)
Re: Why am I stuck? (Sam Holden)
Re: Why am I stuck? (Sam Holden)
Re: Why do we like Perl? gordonmr@cba.ufl.edu
Re: why doesn't this work? <scott@rappahannock-web.com>
Re: Writing isn't working, and the mode is set, Help! (Tad McClellan)
Special: Digest Administrivia (Last modified: 12 Dec 98 (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: 29 Mar 1999 14:37:59 GMT
From: Greg Bacon <gbacon@cs.uah.edu>
Subject: Statistics for comp.lang.perl.misc
Message-Id: <7do387$fqc$1@info2.uah.edu>
Following is a summary of articles spanning a 7 day period,
beginning at 22 Mar 1999 14:34:59 GMT and ending at
29 Mar 1999 07:54:13 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) 1999 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: 516
Articles: 1338 (495 with cutlined signatures)
Threads: 454
Volume generated: 2292.6 kb
- headers: 966.8 kb (20,088 lines)
- bodies: 1249.5 kb (41,082 lines)
- original: 842.8 kb (29,910 lines)
- signatures: 75.0 kb (1,773 lines)
Original Content Rating: 0.675
Averages
========
Posts per poster: 2.6
median: 1.0 post
mode: 1 post - 342 posters
s: 5.6 posts
Posts per thread: 2.9
median: 2.0 posts
mode: 1 post - 137 threads
s: 10.4 posts
Message size: 1754.6 bytes
- header: 739.9 bytes (15.0 lines)
- body: 956.3 bytes (30.7 lines)
- original: 645.0 bytes (22.4 lines)
- signature: 57.4 bytes (1.3 lines)
Top 10 Posters by Number of Posts
=================================
(kb) (kb) (kb) (kb)
Posts Volume ( hdr/ body/ orig) Address
----- -------------------------- -------
58 123.5 ( 47.2/ 69.5/ 31.5) "David L. Cassell" <cassell@mail.cor.epa.gov>
52 86.9 ( 32.6/ 48.9/ 30.5) lr@hpl.hp.com (Larry Rosler)
47 80.7 ( 26.5/ 54.1/ 35.6) tadmc@metronet.com (Tad McClellan)
42 65.9 ( 30.6/ 28.3/ 15.2) Jonathan Stowe <gellyfish@gellyfish.com>
33 52.4 ( 23.8/ 21.1/ 10.6) rjk@linguist.dartmouth.edu (Ronald J Kimball)
33 48.0 ( 24.5/ 21.9/ 13.7) jglascoe@giss.nasa.gov
26 35.7 ( 21.3/ 14.4/ 8.3) bart.lateur@skynet.be (Bart Lateur)
25 55.8 ( 20.6/ 32.0/ 14.8) sholden@cs.usyd.edu.au
25 32.8 ( 18.8/ 13.9/ 8.4) Philip Newton <Philip.Newton@datenrevision.de>
23 35.4 ( 17.7/ 14.1/ 13.8) abigail@fnx.com
These posters accounted for 27.2% of all articles.
Top 10 Posters by Volume
========================
(kb) (kb) (kb) (kb)
Volume ( hdr/ body/ orig) Posts Address
-------------------------- ----- -------
123.5 ( 47.2/ 69.5/ 31.5) 58 "David L. Cassell" <cassell@mail.cor.epa.gov>
86.9 ( 32.6/ 48.9/ 30.5) 52 lr@hpl.hp.com (Larry Rosler)
80.7 ( 26.5/ 54.1/ 35.6) 47 tadmc@metronet.com (Tad McClellan)
65.9 ( 30.6/ 28.3/ 15.2) 42 Jonathan Stowe <gellyfish@gellyfish.com>
55.8 ( 20.6/ 32.0/ 14.8) 25 sholden@cs.usyd.edu.au
52.4 ( 23.8/ 21.1/ 10.6) 33 rjk@linguist.dartmouth.edu (Ronald J Kimball)
48.0 ( 24.5/ 21.9/ 13.7) 33 jglascoe@giss.nasa.gov
35.7 ( 21.3/ 14.4/ 8.3) 26 bart.lateur@skynet.be (Bart Lateur)
35.4 ( 17.7/ 14.1/ 13.8) 23 abigail@fnx.com
33.3 ( 18.2/ 13.1/ 7.2) 20 comdog@computerdog.com (brian d foy)
These posters accounted for 26.9% of the total volume.
Top 10 Posters by OCR (minimum of five posts)
==============================================
(kb) (kb)
OCR orig / body Posts Address
----- -------------- ----- -------
0.975 ( 13.8 / 14.1) 23 abigail@fnx.com
0.941 ( 10.7 / 11.4) 5 tchrist@mox.perl.com (Tom Christiansen)
0.913 ( 2.6 / 2.9) 5 fl_aggie@thepentagon.com
0.883 ( 18.2 / 20.6) 13 Greg Bacon <gbacon@cs.uah.edu>
0.861 ( 5.0 / 5.8) 5 Scratchie <upsetter@ziplink.net>
0.820 ( 7.8 / 9.5) 7 John Callender <jbc@shell2.la.best.com>
0.790 ( 5.3 / 6.7) 5 jt45@tir.com (Murphy)
0.773 ( 6.5 / 8.4) 9 "tavi" <tavi@earthling.net>
0.769 ( 1.3 / 1.6) 5 James Tolley <jamesht@idt.net>
0.722 ( 6.7 / 9.3) 14 moseley@best.com (Bill Moseley)
Bottom 10 Posters by OCR (minimum of five posts)
=================================================
(kb) (kb)
OCR orig / body Posts Address
----- -------------- ----- -------
0.460 ( 3.9 / 8.4) 13 sowmaster@juicepigs.com (Bob Trieger)
0.455 ( 1.9 / 4.2) 5 Eric The Read <eric.schwartz@acm.org>
0.454 ( 31.5 / 69.5) 58 "David L. Cassell" <cassell@mail.cor.epa.gov>
0.454 ( 2.3 / 5.0) 8 Tony Curtis <Tony.Curtis@vcpc.univie.ac.at>
0.433 ( 1.6 / 3.6) 6 mjtg@cus.cam.ac.uk (M.J.T. Guy)
0.418 ( 2.4 / 5.7) 5 "Vincent P. Mautone" <vince@oxxfordinfo.com>
0.412 ( 2.3 / 5.6) 8 mag@imchat.com (Mark P.)
0.395 ( 4.4 / 11.0) 8 =?iso-8859-1?Q?J=FCrgen?= Ibelgaufts <ibelgaufts@gfc-net.de>
0.393 ( 2.1 / 5.4) 7 Frank de Bot <debot@xs4all.nl>
0.312 ( 1.3 / 4.1) 5 "Jason Simms" <ffchopin@worldnet.att.net>
52 posters (10%) had at least five posts.
Top 10 Threads by Number of Posts
=================================
Posts Subject
----- -------
19 << string definer
18 Values of 'true' and 'false'?
18 Date/Time calculation: % through current month?
16 New Bee Alert
13 Odd/Even
13 Split with + , but no %2B
12 RE to match one line of Larry's quote
11 array question
11 removing ASCII chars < 32
10 regular expression
These threads accounted for 10.5% of all articles.
Top 10 Threads by Volume
========================
(kb) (kb) (kb) (kb)
Volume ( hdr/ body/ orig) Posts Subject
-------------------------- ----- -------
36.0 ( 15.6/ 18.0/ 10.6) 18 Date/Time calculation: % through current month?
35.9 ( 5.9/ 29.8/ 15.1) 8 Writing isn't working, and the mode is set, Help!
33.4 ( 10.1/ 22.7/ 12.0) 12 RE to match one line of Larry's quote
30.8 ( 13.5/ 16.0/ 9.2) 19 << string definer
28.1 ( 14.0/ 13.2/ 7.8) 18 Values of 'true' and 'false'?
22.4 ( 5.5/ 16.5/ 7.4) 7 dumping db header row before display
22.0 ( 11.9/ 9.4/ 5.5) 16 New Bee Alert
21.3 ( 9.7/ 10.8/ 6.3) 13 Odd/Even
18.8 ( 6.5/ 12.1/ 7.8) 9 don't understand ||= operator
18.7 ( 11.1/ 6.1/ 2.9) 13 Split with + , but no %2B
These threads accounted for 11.7% of the total volume.
Top 10 Threads by OCR (minimum of five posts)
==============================================
(kb) (kb)
OCR orig / body Posts Subject
----- -------------- ----- -------
0.787 ( 1.3/ 1.7) 5 'use' or 'include' ?
0.760 ( 2.0/ 2.6) 5 Checking Directories contents..
0.751 ( 3.1/ 4.2) 5 need help getting started!
0.731 ( 2.3/ 3.2) 5 Date function question
0.729 ( 1.6/ 2.1) 6 internal server error
0.719 ( 3.2/ 4.4) 7 Need username in Perl script
0.710 ( 5.1/ 7.2) 8 Why don't wildcards expand on cmd line- win32 v5.005_02
0.710 ( 3.4/ 4.7) 5 How to interpolate subroutines in here-documents?
0.699 ( 2.9/ 4.1) 5 Win32 file size limitations?
0.697 ( 2.7/ 3.9) 6 Newbie ques., clearing an array
Bottom 10 Threads by OCR (minimum of five posts)
=================================================
(kb) (kb)
OCR orig / body Posts Subject
----- -------------- ----- -------
0.480 ( 1.2 / 2.6) 5 Webspace?
0.476 ( 2.9 / 6.1) 13 Split with + , but no %2B
0.471 ( 0.7 / 1.5) 5 dividing with perl
0.470 ( 3.2 / 6.9) 8 Sys independent "Tue, 20 Aug 1996 14:25:27 GMT" ?
0.451 ( 3.3 / 7.4) 5 Want to learn Perl
0.450 ( 7.4 / 16.5) 7 dumping db header row before display
0.448 ( 3.4 / 7.6) 5 MS Access and Perl -- help!
0.414 ( 2.8 / 6.8) 6 remote user password
0.409 ( 1.9 / 4.5) 5 return codes in Win32 Perl
0.324 ( 0.9 / 2.7) 5 Encryption Problem
76 threads (16%) had at least five posts.
Top 10 Targets for Crossposts
=============================
Articles Newsgroup
-------- ---------
50 comp.lang.perl.modules
21 alt.perl
14 comp.lang.perl
8 de.comp.lang.perl
5 comp.databases.ms-access
5 perl.porters-gw
4 comp.lang.perl.moderated
4 comp.mail.sendmail
4 alt.perl.sockets
2 comp.infosystems.www.authoring.site-design
Top 10 Crossposters
===================
Articles Address
-------- -------
12 jennifer@usenix.org (Jennifer Radtke)
7 Kevin Smith <kevin.smith@ntexpert.demon.co.uk>
5 Jonathan Stowe <gellyfish@btinternet.com>
5 "Peter Sergeant" <petes@hempseed.com>
5 lr@hpl.hp.com (Larry Rosler)
4 Jay Flaherty <fty@utk.edu>
4 "Christian" <cb2001@hotmail.com>
4 linberg@literacy.upenn.edu (Steve Linberg)
4 "Michael Villeneuve" <mickv@home.com>
3 "$p$p&L%J" <IA'r&n3%>
------------------------------
Date: 29 Mar 1999 09:26:22 -0500
From: Jonathan Feinberg <jdf@pobox.com>
To: cangelis@hpc.ntua.gr
Subject: Re: Very large float arrays and size problem
Message-Id: <m3k8w0nzht.fsf@joshua.panix.com>
Costis Angelis <loulou@ltt.ntua.gr> writes:
> It seems like perl requires something of the order of 40 or 50 bytes
> to store just one number.
You're right to an order of magnitude. Check out sv.h in the perl
source. A scalar uses a bare minimum of eight bytes (one U32 for the
ref count, one for flags), plus a pointer to the actual data (that's
another four bytes on my box), and then allocates further space
depending on the data. Numbers are stored as doubles (unless you ask
otherwise with a pragma), so there's 8 more bytes for you off the bat,
for a total of twenty. I couldn't quite follow the perl source for
the workings of arrays, but one could imagine additional overhead per
item.
Corrections and clarifications from Ilya, Chip et al. gratefully
accepted.
--
Jonathan Feinberg jdf@pobox.com Sunny Brooklyn, NY
http://pobox.com/~jdf
------------------------------
Date: 29 Mar 1999 04:12:34 -0800
From: merlyn@stonehenge.com (Randal L. Schwartz)
Subject: Re: Where to start with Perl
Message-Id: <m1pv5sqytp.fsf@halfdome.holdit.com>
>>>>> "Tad" == Tad McClellan <tadmc@metronet.com> writes:
Tad> Thanks for explaning that to us Bob.
Anytime, Ted.
"Excellent!" "No, Bo-gus!" :)
--
Name: Randal L. Schwartz / Stonehenge Consulting Services (503)777-0095
Keywords: Perl training, UNIX[tm] consulting, video production, skiing, flying
Email: <merlyn@stonehenge.com> Snail: (Call) PGP-Key: (finger merlyn@teleport.com)
Web: <A HREF="http://www.stonehenge.com/merlyn/">My Home Page!</A>
Quote: "I'm telling you, if I could have five lines in my .sig, I would!" -- me
------------------------------
Date: 29 Mar 1999 10:49:43 GMT
From: sholden@pgrad.cs.usyd.edu.au (Sam Holden)
Subject: Re: Why am I stuck?
Message-Id: <slrn7fumm7.pd6.sholden@pgrad.cs.usyd.edu.au>
On Mon, 29 Mar 1999 10:48:41 +0200, Ophir Marko <ophir@saifun.com> wrote:
>#! /local/perl/bin/perl -w
^^^^^^
Did you really have that -w in your script.
If you did you would have got a warning that told you the solution.
You didn't just add it for the news post as opposed to using it in
your code did you? You didn't ignor the warning generated did you?
>$file = <ARGV>;
>open(FILE, "$file");
You should always check the return value of your open calls. Also there
is no need to quote the variable.
>@lines = <FILE>;
>split @lines;
>$i=0;
>open(FILE2, ">file");
>while ($lines[$i] = "abc"){
^^^^^
That is an assignment, it's value is always "abc" which is true,
thus an infinite loop.
I think you meant ==.
What you want however is cmp since you are comparing strings not numbers.
>
>For some reason, the script continues in an infinite loop. I think it's
>the ++i$ ?
I think it's because you condition is always true.
A foreach loop would be a better solution anyway.
--
Sam
compiling kernels is what I do most, so they do tend to stick to the
cache ;) --Linus Torvalds
------------------------------
Date: 29 Mar 1999 11:00:35 GMT
From: sholden@pgrad.cs.usyd.edu.au (Sam Holden)
Subject: Re: Why am I stuck?
Message-Id: <slrn7funaj.pd6.sholden@pgrad.cs.usyd.edu.au>
On 29 Mar 1999 10:49:43 GMT, Sam Holden <sholden@pgrad.cs.usyd.edu.au> wrote:
>What you want however is cmp since you are comparing strings not numbers.
That coffee didn't do the trick.... what you want is eq.
Or I guess !(..cmp..) - see I can argue that I was correct in some
bizarre parallel universe...
--
Sam
Remember that the P in Perl stands for Practical. The P in Python
doesn't seem to stand for anything.
--Randal Schwartz in <8cemsabtef.fsf@gadget.cscaper.com>
------------------------------
Date: Mon, 29 Mar 1999 13:47:10 GMT
From: gordonmr@cba.ufl.edu
Subject: Re: Why do we like Perl?
Message-Id: <36ff836e.412285@news.ufl.edu>
Three reasons:
1. It's good for data cleaning chores, and most alternatives are not.
2. It's usable without excessive baggage for ad hoc quick and dirty
tasks which is all that most data cleaning requires (in contrast to
production quality programs).
3. When I run into trouble using it, I generally can get very quick
help via this newsgroup (in contrast to commerical software where
support is limited, at best, to features and is not available with
respect to putting together an application).
------------------------------
Date: Mon, 29 Mar 1999 09:27:58 -0500
From: Scott Prince <scott@rappahannock-web.com>
Subject: Re: why doesn't this work?
Message-Id: <36FF87A6.522375D9@rappahannock-web.com>
Aaron Walker wrote:
> I have a cgi script that deletes a line from a file based no whether or
> not the line was found with a RE.
> When I use a form for the interface to the script, it tries to call the
> script, but sits there until it times out.
> If I try to run the script from the shell, I get nothing; it just sits
> there.
>
> Here's the script:
>
> open(FILE, "/home/httpd/cgi-bin/catalog.dat");
> @data = <FILE>;
> close(FILE);
Why dump this into an array when
while (<FILE>) { ...
would do much better. (you may have as many files open as you need)
> open(TEMP, ">/home/httpd/cgi-bin/catalog.dat");
> foreach $i (@data)
> {
> while($i !~ /$del/i)
'if' would make more sense here.
--
Scott
------------------------------
Date: Sun, 28 Mar 1999 19:18:36 -0500
From: tadmc@metronet.com (Tad McClellan)
Subject: Re: Writing isn't working, and the mode is set, Help!
Message-Id: <ssgmd7.oj5.ln@magna.metronet.com>
William Flanagan (wflanagan@msn.com) wrote:
: The printing problem was related to the incorrect
: naming of a file handle. (OUTFILE, OUTPUT).
That would have been pointed out to you in milliseconds if
you had asked for such things to be pointed out.
Always, yes *always*, use the -w switch to enable warnings...
--
Tad McClellan SGML Consulting
tadmc@metronet.com Perl programming
Fort Worth, Texas
------------------------------
Date: 12 Dec 98 21:33:47 GMT (Last modified)
From: Perl-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin)
Subject: Special: Digest Administrivia (Last modified: 12 Dec 98)
Message-Id: <null>
Administrivia:
Well, after 6 months, here's the answer to the quiz: what do we do about
comp.lang.perl.moderated. Answer: nothing.
]From: Russ Allbery <rra@stanford.edu>
]Date: 21 Sep 1998 19:53:43 -0700
]Subject: comp.lang.perl.moderated available via e-mail
]
]It is possible to subscribe to comp.lang.perl.moderated as a mailing list.
]To do so, send mail to majordomo@eyrie.org with "subscribe clpm" in the
]body. Majordomo will then send you instructions on how to confirm your
]subscription. This is provided as a general service for those people who
]cannot receive the newsgroup for whatever reason or who just prefer to
]receive messages via e-mail.
The Perl-Users Digest is a retransmission of the USENET newsgroup
comp.lang.perl.misc. For subscription or unsubscription requests, send
the single line:
subscribe perl-users
or:
unsubscribe perl-users
to almanac@ruby.oce.orst.edu.
To submit articles to comp.lang.perl.misc (and this Digest), send your
article to perl-users@ruby.oce.orst.edu.
To submit articles to comp.lang.perl.announce, send your article to
clpa@perl.com.
To request back copies (available for a week or so), send your request
to almanac@ruby.oce.orst.edu with the command "send perl-users x.y",
where x is the volume number and y is the issue number.
The Meta-FAQ, an article containing information about the FAQ, is
available by requesting "send perl-users meta-faq". The real FAQ, as it
appeared last in the newsgroup, can be retrieved with the request "send
perl-users FAQ". Due to their sizes, neither the Meta-FAQ nor the FAQ
are included in the digest.
The "mini-FAQ", which is an updated version of the Meta-FAQ, is
available by requesting "send perl-users mini-faq". It appears twice
weekly in the group, but is not distributed in the digest.
For other requests pertaining to the digest, send mail to
perl-users-request@ruby.oce.orst.edu. Do not waste your time or mine
sending perl questions to the -request address, I don't have time to
answer them even if I did know the answer.
------------------------------
End of Perl-Users Digest V8 Issue 5250
**************************************