[18400] in Perl-Users-Digest
Perl-Users Digest, Issue: 568 Volume: 10
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Mon Mar 26 11:05:37 2001
Date: Mon, 26 Mar 2001 08:05:18 -0800 (PST)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Message-Id: <985622716-v10-i568@ruby.oce.orst.edu>
Content-Type: text
Perl-Users Digest Mon, 26 Mar 2001 Volume: 10 Number: 568
Today's topics:
Re: 'perl guy' wanted. <ITguy@advalvas.NOSPAM.be>
Re: 'perl guy' wanted. <bart.lateur@skynet.be>
Re: fetch back STDERR outputs (Mark Jason Dominus)
Re: FOREACH little victory, I take a beating [solved] <bigrich318@yahoo.com>
Re: FOREACH little victory, I take a beating <david@freemm.org>
Re: grep(EXPR,LIST) behaves strangely (Tad McClellan)
Re: grep(EXPR,LIST) behaves strangely <bart.lateur@skynet.be>
Re: How adding Hours & Days to current date? (Tom Briles)
keeping variations on a script up to date <bart.lateur@skynet.be>
New posters to comp.lang.perl.misc <gbacon@cs.uah.edu>
Newbie <nospam@email.com>
Re: Newbie <hillr@ugs.com>
Sort messes up? <jonni@ifm.liu.se>
Statistics for comp.lang.perl.misc <gbacon@cs.uah.edu>
Re: Sub String (Mark Jason Dominus)
Re: Sub string <peb@bms.umist.ac.uk>
Re: Sub string <peb@bms.umist.ac.uk>
Digest Administrivia (Last modified: 16 Sep 99) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Mon, 26 Mar 2001 17:48:26 +0200
From: IT guy <ITguy@advalvas.NOSPAM.be>
To: Jim Fitzsimmons <jfitzsimmons1@home.com>
Subject: Re: 'perl guy' wanted.
Message-Id: <3ABF64CA.6235@advalvas.NOSPAM.be>
Jim Fitzsimmons wrote:
>
> Help! my perl guy is sick (for the next few months apparently) , just as
> I've finally tracked down a bug.
>
> Any kind soul willing to bail me out?
> I've got a perl script using DBI that sends comments from a text field form
> to a mysql database.
> Works great, unless there is an apostrophe in the comments field where the
> posting gets lost in space because mysql complains about the apostrophe.
>
> I think I need to use quote something or other from the perl DBI, but I have
> no idea where/how to implement it in the script.
>
> Not looking for a free ride. will pay for your time.
>
> Please contact me at jim@ramseeker.com if interested.
> --
> Jim Fitzsimmons, President - ramseeker.
> memory price tracking for the Mac. 2000+ prices listed
> http://www.ramseeker.com | jim@ramseeker.com
You're looking for a Perl guy...
Hmmm...
Here is a free suggestion from an IT guy.
Perl sees the apostrophe as the end of the string, unless it is
preceeded by a backslash. Therefore, you should process the comments
field before feeding it to mysql.
You can use one of the following lines:
$comment=~ s/\'//g ; # weed out all the ' characters
$comment=~ s/\'/\\\'/g ; # put a backslash in front of the ' characters
Kind regards, Jan.
------------------------------
Date: Mon, 26 Mar 2001 15:56:12 GMT
From: Bart Lateur <bart.lateur@skynet.be>
Subject: Re: 'perl guy' wanted.
Message-Id: <qjpubtgpheknqhd6v93a2jnmf8un0vupb0@4ax.com>
Jim Fitzsimmons wrote:
>I've got a perl script using DBI that sends comments from a text field form
>to a mysql database.
>Works great, unless there is an apostrophe in the comments field where the
>posting gets lost in space because mysql complains about the apostrophe.
>
>I think I need to use quote something or other from the perl DBI, but I have
>no idea where/how to implement it in the script.
Look up the "quote" method in the DBI docs
$quoted = $dbh->$quote($string);
or use placeholders, where you don't need to quote anything yourself.
--
Bart.
------------------------------
Date: Mon, 26 Mar 2001 14:46:36 GMT
From: mjd@plover.com (Mark Jason Dominus)
Subject: Re: fetch back STDERR outputs
Message-Id: <3abf564b.44f9$359@news.op.net>
Keywords: candlestick, funny, slow, teratology
In article <99mr3c$rmq@netnews.hinet.net>,
John Lin <johnlin@chttl.com.tw> wrote:
>open TOUCH,"+>zero-length.file" or die $!;
># ... and implicitly close
The right way to get rid of the 'only once' warning in that case is to
put in the 'close'.
It boggles me that your response in this situation is "Oh well, I have
to put in this 'local' thing that I don't understand, but at least I
managed to save a line of code!"
--
@P=split//,".URRUU\c8R";@d=split//,"\nrekcah xinU / lreP rehtona tsuJ";sub p{
@p{"r$p","u$p"}=(P,P);pipe"r$p","u$p";++$p;($q*=2)+=$f=!fork;map{$P=$P[$f^ord
($p{$_})&6];$p{$_}=/ ^$P/ix?$P:close$_}keys%p}p;p;p;p;p;map{$p{$_}=~/^[P.]/&&
close$_}%p;wait until$?;map{/^r/&&<$_>}%p;$_=$d[$q];sleep rand(2)if/\S/;print
------------------------------
Date: Mon, 26 Mar 2001 08:55:42 -0600
From: "Rich" <bigrich318@yahoo.com>
Subject: Re: FOREACH little victory, I take a beating [solved]
Message-Id: <tbulrk651oirf7@corp.supernews.com>
"Nancy" <pigpen@easynews.com> wrote in message
news:5jHv6.3106$am2.572412@news.easynews.com...
> Thanks Rich! You solved the problem. I needed the values changed outside
> the loop. Your explanation made my problem clear. Setting the values
> outside the loop, then changing them within the loop gives me what I
need.
> Sorry for the incomplete posting. I'm never sure how much code to post.
> The sub that this snippet resides in is 329 lines. I've seen complaints
> about posting too much code before.
<snip>
> Thanks Again!!
I'm glad I was able to help.
As far as posting code, post as much as needed to include all relevant
code. If it is a large amount, then you may want to create a text file
containing the code, place it online, and link to it from your post.
Rich
------------------------------
Date: Mon, 26 Mar 2001 14:26:49 GMT
From: "David M. Lloyd" <david@freemm.org>
Subject: Re: FOREACH little victory, I take a beating
Message-Id: <Pine.LNX.4.21.0103260821290.7762-100000@homebody.freemm.org>
On Mon, 26 Mar 2001, Nancy wrote:
> I have the following foreach statement that I can't beat into
> submission. It reads @orders just fine and prints each line of the
> output properly, but I also need to look at each line, and set a
> corresponding variable. The best I can come up with only seems to be
> reading the last line of @orders to set the variables, but otherwise
> processes each line properly. BTW, there will never be more than 4
> lines in @orders. What basic concept am I failing to grasp here?
The problem is, you are absolutely setting each variable every time
through the loop.
Try initializing $msg_cov, $msg_ins, and $msg_fin to one outside
the loop, and getting rid of the 'else' clauses.
> my ($i)=0;
> foreach $line (@orders) {
> ($qty, $item, $desc, $price, $ship, $taxit, $ship_boxes, $page_title,
> $plex, $originals) = split (/$delimit/, $line);
>
> if ($item eq 'Cover Charges') {$msg_cov = 0; } else { $msg_cov =
> 1; }
> if ($item eq 'Inserts') {$msg_ins = 0; } else { $msg_ins = 1; }
> if ($item eq 'Finishing') {$msg_fin = 0; } else { $msg_fin =
> ; }
> ++$i;
> print " A lot of the data in a pretty format. \n";
> }
>
> TIA!
> nan-
>
>
>
- D
<david@freemm.org>
------------------------------
Date: Mon, 26 Mar 2001 08:09:15 -0500
From: tadmc@augustmail.com (Tad McClellan)
Subject: Re: grep(EXPR,LIST) behaves strangely
Message-Id: <slrn9bufrr.7gi.tadmc@tadmc26.august.net>
Ronald Fischer <ronald.fischer.gp@icn.siemens.de> wrote:
>Who can help me with this? I have
>
>@ids=(3,5,6);
>
>When I write
>
>$count = grep { $_ == 5 } @ids;
>
>I get, as expected, $count==1. But if I write the statement as
>
>$count = grep('$_ == 5',@ids);
^ ^
^ ^
That is a string, not Perl code. Since it is not one of the two
"false" strings ( '' or '0') it is always "true", so _all_ list
elements are selected by grep().
>I get $count==3
Lose the quotes.
--
Tad McClellan SGML consulting
tadmc@augustmail.com Perl programming
Fort Worth, Texas
------------------------------
Date: Mon, 26 Mar 2001 14:16:19 GMT
From: Bart Lateur <bart.lateur@skynet.be>
Subject: Re: grep(EXPR,LIST) behaves strangely
Message-Id: <jojubtsdene6hcg68qs7flm74r2f66r9a9@4ax.com>
Ronald Fischer wrote:
>But if I write the statement as
>
>$count = grep('$_ == 5',@ids);
>
>I get $count==3
You're testing the uninterpolated string '$_ == 5', which is always
true. So every item in @ids is accepted.
You want
$count = grep $_ == 5, @ids;
--
Bart.
------------------------------
Date: Mon, 26 Mar 2001 15:59:01 GMT
From: sariq@texas.net (Tom Briles)
Subject: Re: How adding Hours & Days to current date?
Message-Id: <3abf6820.427071586@news.texas.net>
On 24 Mar 2001 02:35:54 -0600, logan@cs.utexas.edu (Logan Shaw) wrote:
>In article <ojTu6.2659$t9.228777@news.soneraplaza.nl>,
>MAC <macv@multiweb.nl> wrote:
>> Cano someone help me with this :
>>
>>I need a sub routine that adds xx number of days or xx number of hour to a
>>already existing valid date like the current time and date.
>
>You're in luck, because someone has already written one and made
>if available for free for you to download:
>
> http://search.cpan.org/search?mode=module&query=Date%3A%3ACalc
>
>I don't believe that module handles daylight savings time, though.
Of course it does. RTFM.
- Tom
------------------------------
Date: Mon, 26 Mar 2001 15:27:54 GMT
From: Bart Lateur <bart.lateur@skynet.be>
Subject: keeping variations on a script up to date
Message-Id: <ginubtcefbj9f96gtahl7ckdlerlkfqeem@4ax.com>
Say I have a script, that is in pretty developed state. I want to make
copies of that script on other sites, with some minor changes: a
different data directory, a different lib directroy, a few minor changes
in the data, such as server name or email address.
Next step: using diff, I get a list of all the changes.
But now, when I make modifications to the original script, additions or
bug fixes, I'd like to be able to simply patch this modified script with
the diff file, and generate an updated version of the variant script.
What's the easiest way to achieve this?
p.s. Stuffing all the modifiable data in a config file doesn't really
help, as I'd still need to modify the path to the config file.
--
Bart.
------------------------------
Date: Mon, 26 Mar 2001 15:34:06 -0000
From: Greg Bacon <gbacon@cs.uah.edu>
Subject: New posters to comp.lang.perl.misc
Message-Id: <tbuobem515bma9@corp.supernews.com>
Following is a summary of articles from new posters spanning a 7 day
period, beginning at 19 Mar 2001 15:28:55 GMT and ending at
26 Mar 2001 14:16:19 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: 150 (40.4% of all posters)
Articles: 255 (24.0% of all articles)
Volume generated: 480.1 kb (25.2% of total volume)
- headers: 211.1 kb (4,097 lines)
- bodies: 260.9 kb (8,461 lines)
- original: 174.2 kb (5,898 lines)
- signatures: 7.8 kb (176 lines)
Original Content Rating: 0.668
Averages
========
Posts per poster: 1.7
median: 1.0 post
mode: 1 post - 93 posters
s: 1.7 posts
Message size: 1927.8 bytes
- header: 847.6 bytes (16.1 lines)
- body: 1047.8 bytes (33.2 lines)
- original: 699.6 bytes (23.1 lines)
- signature: 31.4 bytes (0.7 lines)
Top 10 Posters by Number of Posts
=================================
(kb) (kb) (kb) (kb)
Posts Volume ( hdr/ body/ orig) Address
----- -------------------------- -------
14 48.8 ( 14.2/ 32.9/ 16.0) Benjamin Goldberg <goldbb2@earthlink.net>
8 17.0 ( 7.3/ 9.8/ 6.9) ---Pete--- <bogus@erol.com>
7 13.9 ( 6.0/ 7.2/ 4.4) Ilmari Karonen <usenet11404@itz.pp.sci.fi>
5 7.2 ( 4.7/ 2.5/ 1.4) Rand Simberg <simberg@interglobal.org>
5 14.4 ( 5.5/ 8.9/ 4.4) "Tim Tabor" <tltabor@earthlink.net>
5 10.9 ( 3.9/ 6.2/ 6.2) "Scott R. Godin" <webmaster@webdragon.unmunge.net>
4 5.3 ( 1.9/ 3.4/ 2.4) Cosmic Cruizer <c_cruizer@my-deja.com_nospam>
3 4.5 ( 2.3/ 2.2/ 1.2) CSW <abc@def.ghi>
3 5.5 ( 2.5/ 2.9/ 1.9) Katia Hayati <hayati@math.uiuc.edu>
3 6.6 ( 2.1/ 4.5/ 3.2) "Peter Turcan" <peter.turcan@minerva-is.sk>
These posters accounted for 5.4% of all articles.
Top 10 Posters by Volume
========================
(kb) (kb) (kb) (kb)
Volume ( hdr/ body/ orig) Posts Address
-------------------------- ----- -------
48.8 ( 14.2/ 32.9/ 16.0) 14 Benjamin Goldberg <goldbb2@earthlink.net>
17.0 ( 7.3/ 9.8/ 6.9) 8 ---Pete--- <bogus@erol.com>
14.4 ( 5.5/ 8.9/ 4.4) 5 "Tim Tabor" <tltabor@earthlink.net>
13.9 ( 6.0/ 7.2/ 4.4) 7 Ilmari Karonen <usenet11404@itz.pp.sci.fi>
10.9 ( 3.9/ 6.2/ 6.2) 5 "Scott R. Godin" <webmaster@webdragon.unmunge.net>
10.7 ( 1.6/ 9.1/ 8.5) 2 bitbucket@jenovaproject.org
9.1 ( 1.6/ 7.5/ 1.8) 2 david_no_spam_@carter.net
8.2 ( 2.8/ 5.4/ 4.4) 3 "david carter" <david_no_spam@carter.net>
7.2 ( 4.7/ 2.5/ 1.4) 5 Rand Simberg <simberg@interglobal.org>
6.9 ( 2.8/ 3.8/ 2.6) 3 Ilmari Karonen <usenet11400@itz.pp.sci.fi>
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 ( 6.2 / 6.2) 5 "Scott R. Godin" <webmaster@webdragon.unmunge.net>
1.000 ( 1.1 / 1.1) 3 "Jason" <jason.baker@stdbev.com>
0.826 ( 1.2 / 1.4) 3 "Makhno" <imak@imakhno.freeserve.co.uk>
0.814 ( 4.4 / 5.4) 3 "david carter" <david_no_spam@carter.net>
0.779 ( 2.3 / 3.0) 3 Richard Kennaway <jrk@sys.uea.ac.uk>
0.778 ( 1.6 / 2.0) 3 Todd H. <comphelp@toddh.net>
0.719 ( 3.2 / 4.5) 3 "Peter Turcan" <peter.turcan@minerva-is.sk>
0.710 ( 6.9 / 9.8) 8 ---Pete--- <bogus@erol.com>
0.689 ( 2.4 / 3.4) 4 Cosmic Cruizer <c_cruizer@my-deja.com_nospam>
0.685 ( 2.6 / 3.8) 3 Ilmari Karonen <usenet11400@itz.pp.sci.fi>
Bottom 10 Posters by OCR (minimum of three posts)
=================================================
(kb) (kb)
OCR orig / body Posts Address
----- -------------- ----- -------
0.610 ( 4.4 / 7.2) 7 Ilmari Karonen <usenet11404@itz.pp.sci.fi>
0.590 ( 1.0 / 1.6) 3 Ilmari Karonen <usenet11402@itz.pp.sci.fi>
0.568 ( 1.4 / 2.5) 5 Rand Simberg <simberg@interglobal.org>
0.532 ( 1.2 / 2.2) 3 CSW <abc@def.ghi>
0.493 ( 4.4 / 8.9) 5 "Tim Tabor" <tltabor@earthlink.net>
0.490 ( 0.6 / 1.3) 3 "Itexas" <cernava@itexas.net>
0.486 ( 16.0 / 32.9) 14 Benjamin Goldberg <goldbb2@earthlink.net>
0.481 ( 1.9 / 4.0) 3 "Zac Hester" <zhester@enetis.net>
0.429 ( 0.7 / 1.7) 3 John Joseph Trammell <trammell@bayazid.hypersloth.invalid>
0.334 ( 0.7 / 2.0) 3 "Alan Fleming" <alan@scotlpuk.com>
21 posters (14%) had at least three posts.
Top 10 Targets for Crossposts
=============================
Articles Newsgroup
-------- ---------
16 comp.os.linux.misc
16 comp.unix.shell
14 comp.lang.perl.modules
11 comp.programming
11 comp.mail.misc
10 comp.lang.perl.moderated
9 alt.html
8 alt.html.dhtml
8 comp.lang.javascript
8 alt.html.server-side
Top 10 Crossposters
===================
Articles Address
-------- -------
9 "Jane Longhurst" <jane@enteng.co.uk>
6 "Tyler Durden" <cbunn@udel.edu>
6 "Francois Richard" <richard@science.uottawa.ca>
6 "Steve Martin" <steve10@videotron.ca>
6 CSW <abc@def.ghi>
6 "Long" <yhaili@21cn.com>
6 "Ukolov Ilya" <ilya@is.sochi.ru>
6 "crg" <craig.gould@*REMOVE.THIS*bt.com>
6 Brian Asselin <brianasselin@spiderbite.org>
5 "ronen amity" <amity@mainsoft.com>
------------------------------
Date: Mon, 26 Mar 2001 09:48:52 -0500
From: "Y" <nospam@email.com>
Subject: Newbie
Message-Id: <3abf56c6@bluesky.reedtech.com>
I am trying to delete a line from an array and it isn't working:
open (FILE, "$file") || die $!;
%data = <FILE>;
delete %data {"$address1 $address2"};
What am I doing wrong?
thanks
------------------------------
Date: Mon, 26 Mar 2001 06:54:23 -0800
From: Ron Hill <hillr@ugs.com>
Subject: Re: Newbie
Message-Id: <3ABF581F.2589196D@ugs.com>
Y wrote:
>
> I am trying to delete a line from an array and it isn't working:
>
> open (FILE, "$file") || die $!;
> %data = <FILE>;
> delete %data {"$address1 $address2"};
>
> What am I doing wrong?
> thanks
open(FH, "+< $file") or die "Opening: $!";
@ARRAY = <FH>;
# change ARRAY here
seek(FH,0,0) or die "Seeking: $!";
print FH @ARRAY or die "Printing: $!";
truncate(FH,tell(FH)) or die "Truncating: $!";
close(FH) or die "Closing: $!";
------------------------------
Date: Mon, 26 Mar 2001 17:35:15 +0200
From: "Jonas Nilsson" <jonni@ifm.liu.se>
Subject: Sort messes up?
Message-Id: <99nnfs$j49$1@newsy.ifm.liu.se>
Check this please:
#use strict;
sub get_keys {
my %merge_keys=%{shift(@_)};
for (@_) {
%merge_keys=(%merge_keys,%{$_});
}
return keys %merge_keys;
}
my %a=(1,2,3,4,5,6);
my %b=(11,13,14,15,16,17);
$,=" ";
print get_keys(\%a,\%b);
print "\n";
print sort get_keys(\%a,\%b);
__OUTPUT__
14 1 16 3 11 5
HASH(0x1be27b8) HASH(0x1be2824)
If I use strict I get errormessage:
Can't use an undefined value as a HASH reference at E:\Slask\foo06.pl line
3.
14 1 16 3 11 5
What is wrong??? get_keys is in list context both times, and still it
behaves differently. Please advice.
I can see that sort might use get_keys as a sub to sort the hashrefs, but
why? Doesn't the syntax func($var) bind func rather tightly to ($var) ?
/jN
--
_______________________________
Jonas Nilsson
------------------------------
Date: Mon, 26 Mar 2001 15:34:00 -0000
From: Greg Bacon <gbacon@cs.uah.edu>
Subject: Statistics for comp.lang.perl.misc
Message-Id: <tbuob848lmapa5@corp.supernews.com>
Following is a summary of articles spanning a 7 day period,
beginning at 19 Mar 2001 15:28:55 GMT and ending at
26 Mar 2001 14:16:19 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: 371
Articles: 1062 (450 with cutlined signatures)
Threads: 307
Volume generated: 1904.0 kb
- headers: 871.2 kb (17,146 lines)
- bodies: 970.5 kb (32,419 lines)
- original: 611.2 kb (22,191 lines)
- signatures: 61.2 kb (1,377 lines)
Original Content Rating: 0.630
Averages
========
Posts per poster: 2.9
median: 2 posts
mode: 1 post - 185 posters
s: 4.3 posts
Posts per thread: 3.5
median: 3 posts
mode: 1 post - 85 threads
s: 4.0 posts
Message size: 1835.8 bytes
- header: 840.1 bytes (16.1 lines)
- body: 935.7 bytes (30.5 lines)
- original: 589.3 bytes (20.9 lines)
- signature: 59.1 bytes (1.3 lines)
Top 10 Posters by Number of Posts
=================================
(kb) (kb) (kb) (kb)
Posts Volume ( hdr/ body/ orig) Address
----- -------------------------- -------
39 55.9 ( 35.1/ 20.5/ 10.9) Bart Lateur <bart.lateur@skynet.be>
31 72.0 ( 30.2/ 37.0/ 36.1) abigail@foad.org
29 53.9 ( 24.3/ 21.0/ 8.9) Uri Guttman <uri@sysarch.com>
23 34.6 ( 17.9/ 15.0/ 8.6) nobull@mail.com
22 34.4 ( 15.0/ 13.2/ 6.6) Randal L. Schwartz <merlyn@stonehenge.com>
18 29.6 ( 15.6/ 13.4/ 4.1) "John W. Krahn" <krahnj@acm.org>
17 25.0 ( 13.1/ 10.9/ 4.9) Rafael Garcia-Suarez <rgarciasuarez@free.fr>
16 29.8 ( 12.4/ 13.6/ 9.3) Damian James <damian@qimr.edu.au>
14 21.8 ( 10.5/ 8.3/ 4.2) news@tinita.de
14 48.8 ( 14.2/ 32.9/ 16.0) Benjamin Goldberg <goldbb2@earthlink.net>
These posters accounted for 21.0% of all articles.
Top 10 Posters by Volume
========================
(kb) (kb) (kb) (kb)
Volume ( hdr/ body/ orig) Posts Address
-------------------------- ----- -------
72.0 ( 30.2/ 37.0/ 36.1) 31 abigail@foad.org
55.9 ( 35.1/ 20.5/ 10.9) 39 Bart Lateur <bart.lateur@skynet.be>
53.9 ( 24.3/ 21.0/ 8.9) 29 Uri Guttman <uri@sysarch.com>
48.8 ( 14.2/ 32.9/ 16.0) 14 Benjamin Goldberg <goldbb2@earthlink.net>
34.6 ( 17.9/ 15.0/ 8.6) 23 nobull@mail.com
34.4 ( 15.0/ 13.2/ 6.6) 22 Randal L. Schwartz <merlyn@stonehenge.com>
33.8 ( 12.6/ 18.6/ 11.4) 14 Joe Schaefer <joe+usenet@sunstarsys.com>
29.8 ( 12.4/ 13.6/ 9.3) 16 Damian James <damian@qimr.edu.au>
29.6 ( 15.6/ 13.4/ 4.1) 18 "John W. Krahn" <krahnj@acm.org>
25.4 ( 10.3/ 15.1/ 10.0) 12 "Wyzelli" <wyzelli@yahoo.com>
These posters accounted for 22.0% of the total volume.
Top 10 Posters by OCR (minimum of five posts)
==============================================
(kb) (kb)
OCR orig / body Posts Address
----- -------------- ----- -------
1.000 ( 6.2 / 6.2) 5 "Scott R. Godin" <webmaster@webdragon.unmunge.net>
0.975 ( 36.1 / 37.0) 31 abigail@foad.org
0.945 ( 18.7 / 19.8) 6 Greg Bacon <gbacon@cs.uah.edu>
0.922 ( 1.5 / 1.6) 6 Kim C <kimmfc@mydeja.com>
0.837 ( 6.4 / 7.7) 11 BUCK NAKED1 <dennis100@webtv.net>
0.780 ( 2.1 / 2.7) 5 Jim Kroger <minorseventhSPAMBLOCK@earthlink.net>
0.722 ( 8.0 / 11.1) 7 "Rich" <bigrich318@yahoo.com>
0.710 ( 6.9 / 9.8) 8 ---Pete--- <bogus@erol.com>
0.707 ( 6.7 / 9.5) 8 Logan Shaw <logan@cs.utexas.edu>
0.697 ( 3.8 / 5.5) 11 "John Lin" <johnlin@chttl.com.tw>
Bottom 10 Posters by OCR (minimum of five posts)
=================================================
(kb) (kb)
OCR orig / body Posts Address
----- -------------- ----- -------
0.455 ( 1.0 / 2.3) 5 Lou Moran <lmoran@wtsg.com>
0.448 ( 4.9 / 10.9) 17 Rafael Garcia-Suarez <rgarciasuarez@free.fr>
0.424 ( 8.9 / 21.0) 29 Uri Guttman <uri@sysarch.com>
0.415 ( 3.0 / 7.1) 9 Mona Wuerz <wuerz@yahoo.com>
0.412 ( 4.3 / 10.5) 13 "Thomas Theakanath" <thomastk@prodigy.net>
0.383 ( 1.6 / 4.2) 8 ubl@schaffhausen.de
0.365 ( 2.1 / 5.7) 7 Dave Cross <dave@dave.org.uk>
0.336 ( 1.0 / 2.9) 5 brian d foy <comdog@panix.com>
0.307 ( 4.1 / 13.4) 18 "John W. Krahn" <krahnj@acm.org>
0.227 ( 2.0 / 8.9) 5 Mark Grimshaw <m.grimshaw@salford.ac.uk>
49 posters (13%) had at least five posts.
Top 10 Threads by Number of Posts
=================================
Posts Subject
----- -------
21 every 15 seconds
21 Script for mail forwarding?
17 Hmmm... Which PERL Book Is Best Suited For This???
16 Print "tar" Success or Failure
15 Weird(?) magic word for sh to invoke perl under Linux
14 Perl 5.6 - Spinning cursor routine?
13 substitution for /^[\w\.]\w*/
13 using closures (road to OO)
13 array vs. array question
11 Script mysteriously erases file it's supposed to append to
These threads accounted for 14.5% of all articles.
Top 10 Threads by Volume
========================
(kb) (kb) (kb) (kb)
Volume ( hdr/ body/ orig) Posts Subject
-------------------------- ----- -------
39.5 ( 17.3/ 20.2/ 12.8) 21 every 15 seconds
37.2 ( 14.4/ 22.2/ 14.0) 17 Hmmm... Which PERL Book Is Best Suited For This???
36.6 ( 17.5/ 15.8/ 9.9) 21 Script for mail forwarding?
34.6 ( 15.5/ 18.0/ 13.0) 15 Weird(?) magic word for sh to invoke perl under Linux
32.2 ( 8.8/ 23.1/ 13.3) 11 Still can't die with Tar
32.2 ( 13.7/ 18.1/ 9.1) 16 Print "tar" Success or Failure
31.2 ( 12.1/ 17.9/ 9.9) 13 substitution for /^[\w\.]\w*/
29.4 ( 9.9/ 18.8/ 9.1) 10 HTTP Client Question
26.2 ( 10.1/ 14.7/ 9.2) 11 Script mysteriously erases file it's supposed to append to
25.3 ( 11.0/ 12.9/ 7.3) 13 using closures (road to OO)
These threads accounted for 17.0% of the total volume.
Top 10 Threads by OCR (minimum of five posts)
==============================================
(kb) (kb)
OCR orig / body Posts Subject
----- -------------- ----- -------
0.877 ( 8.9/ 10.2) 7 Statistics
0.808 ( 4.7/ 5.9) 6 time calculation
0.761 ( 3.5/ 4.6) 6 CGI redirect implementation
0.760 ( 3.4/ 4.5) 6 use Net::SMTP
0.754 ( 1.2/ 1.5) 5 how to swap 2 fields in a file
0.749 ( 3.6/ 4.8) 6 Read from file into hash
0.746 ( 2.9/ 3.9) 6 diag question
0.743 ( 4.5/ 6.0) 9 Regex question
0.724 ( 13.0/ 18.0) 15 Weird(?) magic word for sh to invoke perl under Linux
0.721 ( 2.4/ 3.4) 7 How adding Hours & Days to current date?
Bottom 10 Threads by OCR (minimum of five posts)
=================================================
(kb) (kb)
OCR orig / body Posts Subject
----- -------------- ----- -------
0.472 ( 3.1 / 6.6) 7 Can perl handle 'fields' like awk can?
0.466 ( 4.0 / 8.5) 10 Use of uninitialized value in string???
0.465 ( 2.4 / 5.1) 9 Why do "Learning Perl" Books Do This? A Subroutine Question.
0.440 ( 2.4 / 5.3) 7 the space
0.434 ( 2.6 / 5.9) 9 Good Perl Code Syntax Highlighting Editor for Linux??
0.431 ( 2.2 / 5.1) 8 find two, replace one
0.416 ( 2.2 / 5.3) 5 Running another perl script from a script?
0.369 ( 1.7 / 4.5) 5 usernames & passwords - how to ???
0.294 ( 1.5 / 5.1) 7 Hash question
0.272 ( 2.4 / 8.7) 7 persistent cookie working with Netscape4.7x, not IE5x?
70 threads (22%) had at least five posts.
Top 10 Targets for Crossposts
=============================
Articles Newsgroup
-------- ---------
16 comp.os.linux.misc
16 comp.unix.shell
14 comp.lang.perl.modules
11 comp.programming
11 comp.mail.misc
10 comp.lang.perl.moderated
9 alt.html
8 alt.html.dhtml
8 comp.lang.javascript
8 alt.html.server-side
Top 10 Crossposters
===================
Articles Address
-------- -------
10 abigail@foad.org
9 "Jane Longhurst" <jane@enteng.co.uk>
8 news@tinita.de
6 CSW <abc@def.ghi>
6 "Ukolov Ilya" <ilya@is.sochi.ru>
6 "Steve Martin" <steve10@videotron.ca>
6 "crg" <craig.gould@*REMOVE.THIS*bt.com>
6 Brian Asselin <brianasselin@spiderbite.org>
6 "Francois Richard" <richard@science.uottawa.ca>
6 * Tong * <sun_tong_001@yahoo.com>
------------------------------
Date: Mon, 26 Mar 2001 14:53:07 GMT
From: mjd@plover.com (Mark Jason Dominus)
Subject: Re: Sub String
Message-Id: <3abf57d1.4514$275@news.op.net>
Keywords: campaign, dementia, miscellany, trauma
In article <3ABF43F3.A615BFD4@nospam.hotmail.com>,
Carl Lindsay <carllindsay1978@nospam.hotmail.com> wrote:
>i.e. checkbox2(-flags)
>
>I need to be able to have access to the -flags so the string in the
>brackets I have tried:
($part_in_parentheses) =
($string =~ /\( (.*) \)/x );
# Now $part_in_parentheses has the value '-flags'
Do not tamper with any of the parentheses here. They are all important.
In the pattern, \( means to look for a '(' character.
Then (.*) means to look for something matching .* and then to 'capture' it.
The \( means to look for a ')' character.
The 'captured' data is assigned to the variable on the left, which is
$part_in_parentheses.
> $name[$i]=~ s/(\w+)/<$1>/;
> $name[$i]=~ s/\(/ /;
> $name[$i]=~ s/\)/ /;
>
>which works
I don't see how it could. The '-' in 'flags' will not match the \w+.
--
@P=split//,".URRUU\c8R";@d=split//,"\nrekcah xinU / lreP rehtona tsuJ";sub p{
@p{"r$p","u$p"}=(P,P);pipe"r$p","u$p";++$p;($q*=2)+=$f=!fork;map{$P=$P[$f^ord
($p{$_})&6];$p{$_}=/ ^$P/ix?$P:close$_}keys%p}p;p;p;p;p;map{$p{$_}=~/^[P.]/&&
close$_}%p;wait until$?;map{/^r/&&<$_>}%p;$_=$d[$q];sleep rand(2)if/\S/;print
------------------------------
Date: Mon, 26 Mar 2001 16:06:08 +0100
From: Paul Boardman <peb@bms.umist.ac.uk>
Subject: Re: Sub string
Message-Id: <3ABF5AE0.CDE6472F@bms.umist.ac.uk>
Carl Lindsay wrote:
>
> hi,
>
> I was hopping that someone could help me I want to extract a string from
>
> another string is there a way to do this in perl
>
> i.e. checkbox2(-flags)
>
> I need to be able to have access to the -flags so the string in the
> brackets I have tried:
>
> $name[$i]=~ s/(\w+)/<$1>/;
> $name[$i]=~ s/\(/ /;
> $name[$i]=~ s/\)/ /;
>
> which works put does not allow me to compare the result to another
> string, even though both strings are the same there must be an easy
> solution to this. I could use substr() but then how do I count the
> chars in the brackets?
how about using something like :-
($key, $value) = $_ =~ /(\S+)\((\S+)\)/;
this will assign $key = "checkbox2" and $value = "-flags"
HTH
Paul
------------------------------
Date: Mon, 26 Mar 2001 16:07:23 +0100
From: Paul Boardman <peb@bms.umist.ac.uk>
Subject: Re: Sub string
Message-Id: <3ABF5B2B.DF4E6F46@bms.umist.ac.uk>
> how about using something like :-
>
> ($key, $value) = $_ =~ /(\S+)\((\S+)\)/;
>
> this will assign $key = "checkbox2" and $value = "-flags"
oops. Meant to use the shorter version :-
($key, $value) = /(\S+)\((\S+)\)/;
Paul
------------------------------
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 V10 Issue 568
**************************************