[9929] in Perl-Users-Digest
Perl-Users Digest, Issue: 3522 Volume: 8
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Mon Aug 24 11:02:06 1998
Date: Mon, 24 Aug 98 08:00:24 -0700
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, 24 Aug 1998 Volume: 8 Number: 3522
Today's topics:
Re: ActivePerl 5.005: Dynamically Generated @INC? <sid@swn.sni.be>
Re: Array element var in a "foreach" loop? or an exhanc <jdporter@min.net>
Re: CHEAP WEBDOMAINS!!! AS LOW AS $10 A MONTH! <crimzin@epix.net>
Re: COBOL and Perl <charles@hankel.mersinet.co.uk>
Re: COBOL and Perl <jdporter@min.net>
COBOL Historical Stuff <matt@pcr7.pcr.com>
Re: COBOL Historical Stuff <charles@hankel.mersinet.co.uk>
Re: Code Style (Was: How to sort this associative array <jdporter@min.net>
Re: Code Style (Was: How to sort this associative array <jdporter@min.net>
Re: Compile perl scripts into an executable? <cmcurtin@interhack.net>
Re: directory chmod <dan@fearsome.net>
Re: directory chmod <Tony.Curtis+usenet@vcpc.univie.ac.at>
Re: directory chmod <merlyn@stonehenge.com>
Re: Help with IRIX 6.5 + perl5.005_02 (w/ GCC 2.8.1) (Greg Bacon)
Re: locking files on win32 (Hugo Benne)
New posters to comp.lang.perl.misc <gbacon@cs.uah.edu>
Re: Outputting to MS Excel file format <jwhite@accesshub.net>
Pattern match for filename extensions <rcook@stnc.com>
Re: Pattern match for filename extensions <aspinelli@ismes.it>
Re: Pattern match for filename extensions (Larry Rosler)
Re: Pattern match for filename extensions (Andrew M. Langmead)
Special: Digest Administrivia (Last modified: 12 Mar 98 (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Mon, 24 Aug 1998 14:35:52 +0200
From: "Siegfried Delwiche" <sid@swn.sni.be>
Subject: Re: ActivePerl 5.005: Dynamically Generated @INC?
Message-Id: <6rrmjq$sov$1@news.mch.sbs.de>
dave@mag-sol.com wrote in message <6qp631$lj8$1@nnrp1.dejanews.com>...
>Under ActivePerl 5.005, it seems that the value of @INC is dynamically
>generated. It seems to use the directory that the executable is in to
>determine what @INC should contain. Moving perl into differnt directories
and
>running 'perl -V' gives *different* results.
Ok, why not. But it does not work. Look at the following:
In a DOS box, I enter
C:\>perl
print @INC;
and I get (splitted for better reading)
C:\Perl\5.00502\lib/MSWin32-x86-object
C:\Perl\5.00502\lib
C:\Perl\site\5.00502\lib/MSWin32-x86-object
C:\Perl\site\5.00502\lib
C:\Perl\site\lib
Great!
Now, my webserver is executing perl using this command line:
C:\Perl\54A85~1.005\bin\MSWIN3~1\Perl.exe
If I enter
C:\Perl\54A85~1.005\bin\MSWIN3~1\Perl.exe
print @INC;
I get
C:\Perl\54A85~1.005\bin\MSWIN3~1\lib
C:\Perl\54A85~1.005\bin\MSWIN3~1\site\5.00502\lib
C:\Perl\54A85~1.005\bin\MSWIN3~1\site\lib
This is totally wrong! Perl can not find anything with this @INC.
Does somebody have a workaround or a fix for this.
Is it already reported to ActiveState as a bug?
Siegfried
Please mail me answers to sid@swn.sni.be
------------------------------
Date: Mon, 24 Aug 1998 10:40:40 -0400
From: John Porter <jdporter@min.net>
Subject: Re: Array element var in a "foreach" loop? or an exhanced grep ?
Message-Id: <35E17B68.3FEA@min.net>
Mark-Jason Dominus wrote:
>
> In article <35D8551B.3701@min.net>, John Porter <jdporter@min.net> wrote:
> > tie @a, ...
> > for ( @a ) { ...
> > $i = tied(@a)->index;
> > }
>
> How would such a method work? The way you show it, it doesn't have an
> argmuent, so it must depend on some internal state. But there's
> nothing int the code you showed that could leave the object in the
> appropriate internal state.
You're right. Silly me.
Maybe, if you add an argument, it can do a lookup of the argument
into the list, internally -- assisted, perhaps, by a hash...
> I think you'd have to use something like:
> while (($_) = $mylist->each) {
> $i = $mylist->index;
> ...
Not bad!
--
John Porter
------------------------------
Date: Mon, 24 Aug 1998 09:09:21 -0400
From: "Krimzin" <crimzin@epix.net>
Subject: Re: CHEAP WEBDOMAINS!!! AS LOW AS $10 A MONTH!
Message-Id: <6rrool$s0o$1@news1.epix.net>
Tigurius wrote in message <35e144ce.39032240@news.cal.shaw.wave.ca>...
>cheapest domains you will ever find in Canada OR the US!!! as low as
>$10 for the basic service or $20 a month for advanced users!! whats
>the difference? basic only gets www.yourname.com and 50mb of webspace
>and 1 email!!!
>advanced gives you:
>unlimited diskspace
>unlimited Data Transfer
>dedicated IP
>5 Email/FTP Accounts
>unlimited Email Aliases
>Full CGI Access (for both basic and advanced)
>Form Mail
>Banner Rotation
>Search Engine
>Graphics Counter
>Free 4 All Links
>WWW Board
>Password Protection
>Shopping Cart
>Whois Lookup
>Logs
>InterNIC Registration
>Daily Backups (for basic and advanced)
>
>email Tigurius@hotmail.com for more information!!!! (please do not
>send any hate mail or anything like that but iam sorry for any
>inconvience i have caused)
>
As low as 10 bucks a month eh? So why aren't you using it? Or is your
domain name hotmail, and you got that for 10 bucks a month? I got a domain
for 5 dollars a month with 750 mb of space, 10 email addresses, and a bunch
of other goodies, I called it www.yourfullofit.com, check it out!
------------------------------
Date: Mon, 24 Aug 1998 13:58:13 +0100
From: Charles F Hankel <charles@hankel.mersinet.co.uk>
Subject: Re: COBOL and Perl
Message-Id: <35E16365.CF280FEC@hankel.mersinet.co.uk>
huntersean@hotmail.com wrote:
>
> In article <6rldhj$na5@lotho.delphi.com>,
> paulr@bix.com (paulr) wrote:
>
> > On the other paw,
> > I sure wouldn't use COBOL for a text scanning or SGML
> > application. <grin>
>
> Neither would I. I wouldn't use COBOL for anything else, either. Neither do
> the company I work for, nor any of the major banks here in London AFAIK.
I think you should reconsider that last statement. A large number of
the major banks use COBOL extensively in their systems, in my direct
experience.
> > If you have started into C, then go ahead into PERL.
> > You will find COBOL is a very different world than either of
> > those two languages, but a very rewarding one to learn.
> > In fact, learning ANY programming language is a rewarding
> > experience.
>
> Amen to that sentiment. Perhaps if you tried to learn something about perl
> before posting you would not post such utter nonsense to the usenet.
I have comparatively little experience of Perl but it seems to me that
Perl relies extensively on additional libraries to gain any level of
effectiveness, rather than just the pure language itself. It is also
interpretive, which is not necessarily a desirable thing in a production
environment.
True, you may think that it's jolly good but it really doesn't match
COBOL in some areas. I work on mainframe systems (you know, the ones
that do a lot of boring work) and in this environment, COBOL is probably
the leading language as such. We use utility software such as Selcopy
and Easytrieve for the more mundane tasks such as data extraction and
reporting.
It would seem to me, so far, that Perl does little more than Selcopy can
do and, as such, I'm not particularly impressed. One reason for lack of
impression is that Selcopy is simply an easy-to-use tool and yet Perl is
touted as a language.
So what makes Perl a language and Selcopy a utility? I would guess that
it's the environments and the different ways that we view things. Or
could it be that Perl is promoted as a language, while Selcopy is sold
as a "multiple information retrieval" utility? As far as I can tell,
though, there is little difference between the two in functional terms
other than the documentation. My Selcopy manual has 242 concise pages
and is easy to use; my Perl 5 book has 938 verbose pages, and finding
useful things can take a while when wading through the dross.
You are wrong to slag off COBOL. It is neither better nor worse than
Perl, and it is an argument that you will never win; the contextual
arguments will see to that.
--
Charles F Hankel Wirral UK
------------------------------
Ready, Willing and (avail)Able
------------------------------
Date: Mon, 24 Aug 1998 09:33:04 -0400
From: John Porter <jdporter@min.net>
Subject: Re: COBOL and Perl
Message-Id: <35E16B90.690C@min.net>
Charles F Hankel wrote:
>
> > On Mon, 17 Aug 1998 00:31:04, abigail@fnx.com (Abigail) wrote:
> >
> > > That is why Perl is Perl, and nowhere near close to COBOL. That's also
> > > why COBOL isn't suitable for modern programming.
>
> First of all you have to believe that "modern" is best...
I think by "modern programming" he meant programming for contemporary
problems, in contemporary contexts. There is no value judgement here.
> ...then you have to believe that you cannot possibly write a modern
> application in COBOL...
Do you have to believe that? He only claimed that COBOL was not
suitable, not that it was completely unusable.
> ...and finally you need to believe that the sort of work that COBOL does
> can be performed in that same environments more effectively and more
> efficiently with Perl.
That is the essence of the claim.
Of course, one may "believe" it based on real information,
rather than merely religiously as you imply.
--
John Porter
------------------------------
Date: 24 Aug 1998 12:55:15 GMT
From: "Matt Heusser" <matt@pcr7.pcr.com>
Subject: COBOL Historical Stuff
Message-Id: <01bdcf5e$5e1127e0$47eb1bcc@XSTA71.pcr.com>
>>Admiral Grace Hopper.
>Indeed she was
>(BTW, she retired as rear admiral).
Yes, and in informal communication the "rear"
designator of "rear admiral" may be dropped.
regards,
Matt H.
(PS - Net News counts as informal.)
------------------------------
Date: Mon, 24 Aug 1998 15:11:04 +0100
From: Charles F Hankel <charles@hankel.mersinet.co.uk>
Subject: Re: COBOL Historical Stuff
Message-Id: <35E17478.E80BD0FC@hankel.mersinet.co.uk>
Matt Heusser wrote:
>
> >>Admiral Grace Hopper.
> >Indeed she was
> >(BTW, she retired as rear admiral).
>
> Yes, and in informal communication the "rear"
> designator of "rear admiral" may be dropped.
Informally, she was probably "Grace".
--
Charles F Hankel Wirral UK
------------------------------
Ready, Willing and (avail)Able
------------------------------
Date: Mon, 24 Aug 1998 10:44:24 -0400
From: John Porter <jdporter@min.net>
Subject: Re: Code Style (Was: How to sort this associative array?)
Message-Id: <35E17C48.5FFF@min.net>
Ronald J Kimball wrote:
>
> Both code samples, yours and John's,
> had two open parentheses and only one close parenthesis. Not
> intentionally, of course. :-)
Yeah, but as you'll notice (if you care to go back and check), my
original post had no such paren imbalance. Somehow, as he was
playing with it, Zenin introduced a spurious paren. Then I quoted
him without checking.
--
John Porter
------------------------------
Date: Mon, 24 Aug 1998 10:48:12 -0400
From: John Porter <jdporter@min.net>
Subject: Re: Code Style (Was: How to sort this associative array?)
Message-Id: <35E17D2C.7FC7@min.net>
(Jari Aalto+mail.perl) wrote:
>
> We use "modern" line-up style:
>
> for (
> ..code
> )
> {
> ## Insert nifty code here
> }
>[...]
> In our style, the start/end delimiters can be leveled just
> above the function, like:
>
> use var qw
> (
> $VAR
> %HASH
> @LIST
> );
I like this style, but I enforce it more rigorously.
That is, I make no exception for for/while clauses.
This is better:
for
(
..code
)
{
## Insert nifty code here
}
--
John Porter
------------------------------
Date: 24 Aug 1998 10:45:42 -0400
From: Matt Curtin <cmcurtin@interhack.net>
To: harry@dublin.net (Harry McGreggor)
Subject: Re: Compile perl scripts into an executable?
Message-Id: <86iujie8vd.fsf@scooter.cis.ohio-state.edu>
harry@dublin.net (Harry McGreggor) writes:
> I have a few perl scripts I have written which I don't want people
> to "rip" off.
Then publish your source code.
Perl itself is published in source form. Do you think your programs
are more useful and more likely to be ripped off than Perl itself?
--
Matt Curtin cmcurtin@interhack.net http://www.interhack.net/people/cmcurtin/
------------------------------
Date: Mon, 24 Aug 1998 13:08:42 +0100
From: "Daniel Adams" <dan@fearsome.net>
Subject: Re: directory chmod
Message-Id: <903960525.13621.0.nnrp-04.c2deb1c5@news.demon.co.uk>
Still no luck!
chmod 0777, "/foo/$bar" or die "Can't chmod /foo/$bar: $!";
doesn't seem to work any better than
chmod 0777, '/foo/$bar' or die "Can't chmod /foo/$bar: $!";
I'm pretty certain now that the problem is with getting the script to
interpret the $bar variable, but nothing seems to work. Surely someone in
this ng has used chmod on a directory path which contains a variable and can
thus help out??? Please? ;-)
Dan Adams
dan@fearsome.net
Randy Kobes wrote in message ...
>Daniel Adams <dan@fearsome.net> wrote:
[snip]
>>Anyway, the path is converted through url-unencoding and
>>format-checking/pattern-matching etc etc to '$bar' which has the value
>>'a/b/c' so my actual chmod line reads:
>>chmod 0777, '/foo/$bar';
>>
>>I am starting to think that the script is trying to interpret this
literally
>>and chmod a non-existent directory called $bar rather than $bar's value of
>>'/a/b/c'.
[snip]
> You've found the problem - variables within ' ' aren't
>interpreted. Try using " ", as in
> chmod 0777, "/foo/$bar"
> or die "Can't chmod /foo/$bar: $!";
>That should work ....
------------------------------
Date: 24 Aug 1998 14:15:45 +0200
From: Tony Curtis <Tony.Curtis+usenet@vcpc.univie.ac.at>
Subject: Re: directory chmod
Message-Id: <7xk93y8tji.fsf@salome.vcpc.univie.ac.at>
Re: directory chmod, Daniel <dan@fearsome.net> said:
Daniel> Still no luck! chmod 0777, "/foo/$bar" or die
Daniel> "Can't chmod /foo/$bar: $!"; doesn't seem to work
This will work. Or at least, by that I mean: "$bar will be
interpolated".
you've got the "die" in there so what error message(s) do
you get?
try writing a small sample program which demonstrates the
problem. post it, along with its actual output & actions,
and your intended output & actions. Capturing the terminal
session activity (or equivalent, e.g. with "script" on a
UNIX platform) would be very helpful too.
hth
tony
------------------------------
Date: Mon, 24 Aug 1998 14:52:17 GMT
From: Randal Schwartz <merlyn@stonehenge.com>
Subject: Re: directory chmod
Message-Id: <8clnoetotq.fsf@gadget.cscaper.com>
>>>>> "Daniel" == Daniel Adams <dan@fearsome.net> writes:
Daniel> Still no luck!
Daniel> chmod 0777, "/foo/$bar" or die "Can't chmod /foo/$bar: $!";
Daniel> doesn't seem to work any better than
Daniel> chmod 0777, '/foo/$bar' or die "Can't chmod /foo/$bar: $!";
I'm pretty sure that anyone that has ever answered a question
for someone else more than a dozen times has now learned to dread
the phrase "doesn't work".
On the IRC #perl channel, we've pretty much outlawed the phrase.
Instead, the nice little "purl" bot wakes up and utters something
like the following:
We don't permit "doesn't work" here.
Please tell us:
(1) what you wanted to do
(2) what you typed
(3) what you expected
(4) what *actually* happened
We won't proceed until you finish that.
In other words, your statement above has insufficient content to help
us determine a response. What *did* it do, and how was that different
than what you had intended? To me, the first line looks perfectly
fine. It'll change some directory (or file :) named "/foo/$bar" (with
$bar replaced by its value) to mode 0777. If it didn't, you should
see an error message that says why it broke. Please tell us what the
error message is, and we MIGHT be able to help.
print "Just another Perl hacker,"
--
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: 24 Aug 1998 14:11:47 GMT
From: gbacon@cs.uah.edu (Greg Bacon)
Subject: Re: Help with IRIX 6.5 + perl5.005_02 (w/ GCC 2.8.1)
Message-Id: <6rrsb3$hag$4@info.uah.edu>
In article <x6iujj47kn.fsf@bts.com>,
Phil Eschallier <phil@bts.com> writes:
: I'm trying to compile that latest stable perl5 under IRIX. The
: environment is:
:
: - IRIX 6.5
: - GCC 2.8.1
: - PERL5.005_02
[snip]
: ./miniperl -w -Ilib -MExporter -e 0 || gmake minitest
: ./miniperl configpm tmp
I've noticed the same problems with gcc 2.8.1 on IRIX 6.2. I tried
various levels of optimization (including no optimization), but wasn't
able to make it work. My solution was to abandon gcc 2.8.1 on IRIX. :-)
Greg
--
The first truth is that liberty is not safe if the people tolerate the growth
of private power to the point where it becomes stronger than that of their
democratic state itself. That, in its essence, is Fascism.
-- Franklin D. Roosevelt
------------------------------
Date: Mon, 24 Aug 1998 14:32:19 GMT
From: h.benne@library.uu.nl (Hugo Benne)
Subject: Re: locking files on win32
Message-Id: <6rrtje$j3u$1@news2.xs4all.nl>
Hello,
I found out there are two ways for locking on Win32:
- use File::lock
- use the construction in the next perl code:
It's a bit tricky but it works!
Regards,
Hugo
sub kill_url {
$bron = ();
@bronnen = ();
@nieuwe_bronnen = ();
$datafile = '/website/cgi-bin/links.dat';
$lockfile = '/website/cgi-bin/lockfile.lck';
$backupfile = '/website/cgi-bin/links.bak';
open(FILE, "<$datafile") or die "can't open $datafile: $!";
@bronnen = <FILE>;
close(FILE);
open (BACKUP, ">$backupfile") or die "can't open $backupfile: $!";
print BACKUP @bronnen;
close (BACKUP);
while ($#bronnen >= 0) { # read @bronnen into @nieuwe_bronnen
$bron = shift @bronnen;
if ($bron =~ / $URL /i) { # except the URL to delete
$gevonden = 1;
} else {
push @nieuwe_bronnen, $bron;
}
}
# open lockfile
while (-f "$lockfile") { select ( undef , undef , undef , 0.1 ); }
open (LOCKFILE , ">$lockfile");
# open datafile again and overwrite it with @nieuwe_bronnen
open (FILE, ">$datafile" ) or die "can't open $datafile: $!";
print FILE (@nieuwe_bronnen); # store new data into file
close (FILE); # close file...
close (LOCKFILE); # close lockfile
unlink ("$lockfile");
if ($gevonden == 1) {
print STDOUT ("<BR><BR><H3>De Internetbron:<BR><BR><li>$TITEL_BRON
($URL)</li><BR><BR>",
"is nu uit het bronnenbestand verwijderd !<BR><BR><BR>");
} else {
print STDOUT ("<BR><BR><H3>De Internetbron:<BR><BR><li>$TITEL_BRON
($URL)</li><BR><BR>",
"is niet gevonden !<BR><BR><BR>");
}
}
--------------------------------------------------
Universiteit Utrecht, Faculteit Rechtsgeleerdheid
Juridische Bibliotheek, Afdeling ICT
http://www.library.law.uu.nl/
e-mail: h.benne@library.uu.nl
Postadres: Ganzenmarkt 32, 3512 GE Utrecht
Bezoekadres: Hoogt 13
Telefoon (030) 2537206, Telefax (030) 2538409
--------------------------------------------------
------------------------------
Date: 24 Aug 1998 14:14:20 GMT
From: Greg Bacon <gbacon@cs.uah.edu>
Subject: New posters to comp.lang.perl.misc
Message-Id: <6rrsfs$hag$6@info.uah.edu>
Following is a summary of articles from new posters spanning a 7 day
period, beginning at 17 Aug 1998 13:32:18 GMT and ending at
24 Aug 1998 06:58:17 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" e-mail 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) 1998 Greg Bacon. All Rights Reserved.
Verbatim copying and redistribution is permitted without royalty;
alteration is not permitted. Redistribution and/or use for any
commercial purpose is prohibited.
Totals
======
Posters: 327 (58.4% of all posters)
Articles: 488 (31.9% of all articles)
Volume generated: 833.8 kb (31.9% of total volume)
- headers: 337.7 kb (6,834 lines)
- bodies: 454.2 kb (14,192 lines)
- original: 321.2 kb (10,740 lines)
- signatures: 41.3 kb (1,217 lines)
Original Content Rating: 0.707
Averages
========
Posts per poster: 1.5
median: 1 post
mode: 1 post - 250 posters
s: 1.5 posts
Message size: 1749.5 bytes
- header: 708.6 bytes (14.0 lines)
- body: 953.1 bytes (29.1 lines)
- original: 674.1 bytes (22.0 lines)
- signature: 86.8 bytes (2.5 lines)
Top 10 Posters by Number of Posts
=================================
(kb) (kb) (kb) (kb)
Posts Volume ( hdr/ body/ orig) Address
----- -------------------------- -------
11 25.4 ( 9.6/ 15.8/ 11.5) Grant Griffin <grant.griffin@nospam.com>
11 27.0 ( 12.0/ 14.2/ 10.3) prog@hankel.mersinet.co.uk
10 10.8 ( 6.8/ 4.1/ 3.0) harry@dublin.net (Harry McGreggor)
10 25.4 ( 8.9/ 16.5/ 11.2) "Daniel Adams" <dan@fearsome.net>
10 18.7 ( 8.3/ 10.3/ 4.5) david.hawker@removethis.cableol.co.uk
8 8.7 ( 5.7/ 3.0/ 2.9) Ketan Patel <ketanp@NOSPAMxwebdesign.com>
8 12.8 ( 6.8/ 6.0/ 2.5) david.hawker@cableol.co.uk
6 6.2 ( 3.6/ 2.6/ 1.2) 8\(F&@ <versace@gianni.com>
6 17.1 ( 4.3/ 12.8/ 8.6) Dav Amann <dove67@netscape.net>
5 5.6 ( 3.3/ 2.3/ 1.6) "Mosl Roland" <founder@pege.org>
These posters accounted for 5.5% of all articles.
Top 10 Posters by Volume
========================
(kb) (kb) (kb) (kb)
Volume ( hdr/ body/ orig) Posts Address
-------------------------- ----- -------
34.2 ( 0.8/ 0.4/ 0.4) 1 Yves BAILLY <yves@medianet-usa.com>
28.0 ( 0.7/ 27.3/ 2.7) 1 joemiller@my-dejanews.com
27.0 ( 12.0/ 14.2/ 10.3) 11 prog@hankel.mersinet.co.uk
25.4 ( 8.9/ 16.5/ 11.2) 10 "Daniel Adams" <dan@fearsome.net>
25.4 ( 9.6/ 15.8/ 11.5) 11 Grant Griffin <grant.griffin@nospam.com>
18.7 ( 8.3/ 10.3/ 4.5) 10 david.hawker@removethis.cableol.co.uk
17.1 ( 4.3/ 12.8/ 8.6) 6 Dav Amann <dove67@netscape.net>
12.8 ( 6.8/ 6.0/ 2.5) 8 david.hawker@cableol.co.uk
10.8 ( 6.8/ 4.1/ 3.0) 10 harry@dublin.net (Harry McGreggor)
10.1 ( 0.7/ 9.4/ 8.7) 1 Chuck Phillips <chuckp@SiTera.com>
These posters accounted for 8.0% of the total volume.
Top 10 Posters by OCR (minimum of three posts)
==============================================
(kb) (kb)
OCR orig / body Posts Address
----- -------------- ----- -------
1.000 ( 4.4 / 4.4) 4 "Mr. mister" <leegala@nospam.ican.net>
1.000 ( 3.1 / 3.1) 3 sucheta@nmtec.com
1.000 ( 1.3 / 1.3) 4 stevenba@carr.org (Steven Barbash)
0.970 ( 4.2 / 4.3) 3 Rich Sy <Richmont.Sy@exchange.sms.siemens.com>
0.968 ( 2.9 / 3.0) 8 Ketan Patel <ketanp@NOSPAMxwebdesign.com>
0.949 ( 4.0 / 4.2) 4 "Michael A. King" <kingm@vmicro.com>
0.817 ( 2.0 / 2.4) 3 Brian Tiemann <briant@packeteer.com>
0.800 ( 3.1 / 3.9) 3 NOjcjSPAM@mail.med.upenn.edu (Mr. Mirthful)
0.743 ( 3.0 / 4.1) 10 harry@dublin.net (Harry McGreggor)
0.730 ( 11.5 / 15.8) 11 Grant Griffin <grant.griffin@nospam.com>
Bottom 10 Posters by OCR (minimum of three posts)
=================================================
(kb) (kb)
OCR orig / body Posts Address
----- -------------- ----- -------
0.675 ( 8.6 / 12.8) 6 Dav Amann <dove67@netscape.net>
0.557 ( 2.2 / 3.9) 3 Allan Chandler <nobody@nowhere.com>
0.527 ( 1.1 / 2.0) 3 spam@whoville.com (Grinch)
0.477 ( 1.0 / 2.1) 3 Mooneer Salem <mooneer@earthlink.net>
0.467 ( 1.2 / 2.6) 6 8\(F&@ <versace@gianni.com>
0.434 ( 4.5 / 10.3) 10 david.hawker@removethis.cableol.co.uk
0.433 ( 1.9 / 4.3) 4 dzuy@my-dejanews.com
0.415 ( 2.5 / 6.0) 8 david.hawker@cableol.co.uk
0.343 ( 1.1 / 3.1) 3 bill@sky-comm.net (Bill Mezian)
0.305 ( 0.6 / 2.1) 3 Ken McNamara <conmara@tcon.net>
24 posters (7%) had at least three posts.
Top 10 Crossposters
===================
Articles Address
-------- -------
11 prog@hankel.mersinet.co.uk
6 ez074520@dilbert.ucdavis.edu (Tomoyuki Tanaka)
4 Christopher Hulsey <chulsey@azuredesigns.com>
3 girls@littlegirls.com
3 fc3a501@AMRISC01.math.uni-hamburg.de (Hauke Reddmann)
3 keshlam@alum.mit.edu
3 keithmarlow8098@my-dejanews.com
3 NOjcjSPAM@mail.med.upenn.edu (Mr. Mirthful)
2 dzuy@my-dejanews.com
2 "zzz.kapoor@mailcity.com 7" <zzz.kapoor@mailcity.com>
------------------------------
Date: Mon, 24 Aug 1998 06:29:16 -0400
From: jonathan white <jwhite@accesshub.net>
Subject: Re: Outputting to MS Excel file format
Message-Id: <35E1407C.35BB0A0F@accesshub.net>
David Amann wrote:
>
> What I usually do is send a 'Content-type:application/excel\n\n' line and
> then send a bunch of tab separated text.
David,
Thanx for your reply. There are two problems with using a tab, comma, or
any kind of delimited file. One is that there is no formating. Second
and more importatnt is sending numerics as text strings. If I create
output to a file, newclients.csv
"New Clients Report - 24 Aug 1998"
"Name","Account #"
"Bill Smith", "083"
"Jill Jones","112"
When Excel reads it in it turns the character strings "083" and "112"
into numeric data types and in the case of "083" drops the leading zero.
jonathan
------------------------------
Date: Mon, 24 Aug 1998 12:01:30 +0100
From: "Ryan Cook" <rcook@stnc.com>
Subject: Pattern match for filename extensions
Message-Id: <346B48D4AE18D11181FB00609762664D600DF4@atlantis.stnc.co.uk>
I am trying to work out a pattern match expression to recognise a range of
filename extensions given filenames that are passed into the variable
$File::Find::name from a
find(\&wanted, $directory);
function call. The pattern match will reside inside the
"wanted{ }" subroutine and needs to be able to simuultaneously match a range
of filename extensions stored in an array such as:
@ftypes = (".txt", ".exe", ".doc", ".pl", ".bat");
so that I can go something like:
if (matched) {
doSomethingUseful;
blaBlaBla;
}
else {
doSomethingElse;
blaBlaBla;
}
If you know what pattern matching expression would achieve the end result
I'm looking for then please reply to this message or Email me at
rcook@stnc.com .
Thanks,
RYAN
------------------------------
Date: Mon, 24 Aug 1998 14:47:48 +0200
From: Andrea Spinelli <aspinelli@ismes.it>
To: Ryan Cook <rcook@stnc.com>
Subject: Re: Pattern match for filename extensions
Message-Id: <35E160F4.B64844EE@ismes.it>
Ryan Cook wrote:
> I am trying to work out a pattern match expression to recognise a range of
> filename extensions
[...]
# suppose you array is
@ftypes = (".txt", ".exe", ".doc", ".pl", ".bat");
print "ftypes=@ftypes\n";
# now replace the '.' with '\.', since '.' is special
# for regular expressions
@otherftypes = map( {s/\./\\./; $_} @ftypes );
print "otherftypes=@otherftypes\n";
# join the types using the regular expression '|' operator
$pattern = join( '|', @otherftypes );
print "pattern=$pattern\n";
# since you are interested in File::Find,
# you should use something like
sub wanted
{
if( $_ =~ $pattern ){
# do what you like
}
}
> Thanks,
> RYAN
I suspect you do not know much about regular expressions; I suggest you to read
the
perlre manpage.
Cheers
Andrea
------------------------------
Date: Mon, 24 Aug 1998 07:06:43 -0700
From: lr@hpl.hp.com (Larry Rosler)
Subject: Re: Pattern match for filename extensions
Message-Id: <MPG.104b133aa24b95549897e6@nntp.hpl.hp.com>
[Posted to comp.lang.perl.misc and copy mailed.]
In article <35E160F4.B64844EE@ismes.it> on Mon, 24 Aug 1998 14:47:48
+0200, Andrea Spinelli <aspinelli@ismes.it> says...
> Ryan Cook wrote:
> > I am trying to work out a pattern match expression to recognise a range of
> > filename extensions
...
> sub wanted
> {
> if( $_ =~ $pattern ){
> # do what you like
> }
> }
The code you show to create the regex in $pattern is good, but your use
of it is not, stylistically or in terms of efficiency.
1. Explicit matching against $_ is redundant and grating on the eye.
2. Using an unadorned string as a regex is jarring and (most important)
robs you of the opportunity to...
3. Recognize that $pattern is in effect a constructed constant, so the
regex should not be recompiled every time the subroutine is invoked.
sub wanted
{
if( /$pattern/o ){
# do what you like
}
}
> I suspect you do not know much about regular expressions; I suggest
> you to read the perlre manpage.
You seem to know much about regular expressions, but there is much
more...
Now, having said all that, I question whether a regex is the right
approach at all for this problem. The poster wants to know if 'a' is
*in* the set 'b' (of file-name extensions). This phraseology should
invoke Tom Christiansen's mantra -- use a hash.
--
(Yet Another Larry) Rosler
Hewlett-Packard Laboratories
http://www.hpl.hp.com/personal/Larry_Rosler/
lr@hpl.hp.com
------------------------------
Date: Mon, 24 Aug 1998 14:13:04 GMT
From: aml@world.std.com (Andrew M. Langmead)
Subject: Re: Pattern match for filename extensions
Message-Id: <Ey765s.9Lv@world.std.com>
"Ryan Cook" <rcook@stnc.com> writes:
> The pattern match will reside inside the
>"wanted{ }" subroutine and needs to be able to simuultaneously match a range
>of filename extensions stored in an array such as:
> @ftypes = (".txt", ".exe", ".doc", ".pl", ".bat");
The first thing that I would suggest to you is to think of what a
"file extention" is, and how the features of the regular expression
language would fit into testing that definition. Since a "file
extention" is the last part of the filename, and since the "$" regular
expression metacharacter matches the end of a string,they seem like a
good match. Next realize that the "." in your extention list is a
special character in the regular expression language, and it needs to
be protected somehow. (Maybe you should use either a backslash before
the period to disable its special meaning, or use the "\Q" and "\E"
constructs around the extension.
The next thing to consider is how to match many regular expressions at
once, luckily there is an entry in the FAQ that covers that.
<URL:http://www.perl.com/CPAN-local/doc/manual/html/pod/perlfaq6.html
#How_do_I_efficiently_match_many_>
Also, if you are using perl 5.005, there are the new precompiled re
features in the qr// quoting construct that may be able to be used to
take the place of the bm_build construct in the FAQ.
--
Andrew Langmead
------------------------------
Date: 12 Jul 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 Mar 98)
Message-Id: <null>
Administrivia:
Special notice: in a few days, the new group comp.lang.perl.moderated
should be formed. I would rather not support two different groups, and I
know of no other plans to create a digested moderated group. This leaves
me with two options: 1) keep on with this group 2) change to the
moderated one.
If you have opinions on this, send them to
perl-users-request@ruby.oce.orst.edu.
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 3522
**************************************