[12205] in Perl-Users-Digest
Perl-Users Digest, Issue: 5805 Volume: 8
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Thu May 27 15:07:19 1999
Date: Thu, 27 May 99 12:00:29 -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 Thu, 27 May 1999 Volume: 8 Number: 5805
Today's topics:
Re: $var =~ s/string/pattern/i does not work... lpacania@my-deja.com
Re: .htaccess file <anonymous@web.remarq.com>
[Announce] Jacksonville Perl Mongers! <bill@fccj.org>
Re: check pop3 with perl? (Jared Evans)
Re: date conversion and comparison routines <hasant@trabas.co.id>
Debug works-standard DOESN'T kgentes@gentek.net
Re: Debug works-standard DOESN'T kgentes@gentek.net
Re: FAQ 4.16: Does Perl have a year 2000 problem? Is Pe <bill@fccj.org>
Re: FREE SCRIPTS <dgris@moiraine.dimensional.com>
ggh and Netscape's history.dat file <denicola@space.mit.edu>
Re: ggh and Netscape's history.dat file <tchrist@mox.perl.com>
Re: Hash question (Larry Rosler)
Re: Help, I'll pay money for solution!!! <chrisb@assi.com>
Re: how can i produce graphical invoices using perl? (Dave Cross)
Ineed major help creating a CGI script with PERL <info@lucem.com>
is there a perl sdk? sbeaulieu@my-deja.com
Re: is there a perl sdk? (Dave Cross)
NT Search script <cwittry@uswest.com>
Re: Obtaining file version info <bill@fccj.org>
Perl and FUD [was: Safe.pm necessary for secure CGI?] <gregm@well.com>
Re: Perl compiler...If or when <*@qz.to>
Posting Form Data to External CGI URL ken_p777@my-deja.com
Premature end of script headers? <deeto@yahoo.com>
Re: Premature end of script headers? (Dave Cross)
Re: Problem with a program to translate character (Larry Rosler)
Q: binary perl/tk pkg for aix4 (Dirk Ruediger)
Re: removings " "s from strings <jwarner@tivoli.com>
Splicing and the current position in and foreach loop <B.A.McCauley@bham.ac.uk>
Re: system command to string (DATE) <bill@fccj.org>
Thanks this has already been answered lpacania@my-deja.com
Uploaded ModUtils and Apology <hasant@trabas.co.id>
use strict and autovivifcation (Andrew Allen)
Re: What's wrong with this hit counter? (Randal L. Schwartz)
Re: Writing a Form Validation Script <bhaskart@my-deja.com>
Re: Writing a Form Validation Script <bill@fccj.org>
Re: Writing a Form Validation Script <*@qz.to>
Re: Writing a Form Validation Script (Dave Cross)
Re: Writing a Form Validation Script <emschwar@rmi.net>
Special: Digest Administrivia (Last modified: 12 Dec 98 (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Thu, 27 May 1999 18:18:48 GMT
From: lpacania@my-deja.com
Subject: Re: $var =~ s/string/pattern/i does not work...
Message-Id: <7ik2a5$26c$1@nnrp1.deja.com>
Larry I used your code and Greg's code with success! Thanks,
I am worried though about the ARRAY declared in your code. I have
something like 3,000 rules. Is there a better way to do this?
Thanks, Lener
In article <MPG.11b4a34ff26a8110989af1@nntp.hpl.hp.com>,
lr@hpl.hp.com (Larry Rosler) wrote:
> [Posted and a courtesy copy mailed.]
>
> In article <7iem39$50n$1@nnrp1.deja.com> on Tue, 25 May 1999 17:19:41
> GMT, lpacania@my-dejanews.com <lpacania@my-dejanews.com> says...
> > I'm trying to build a rule based substitution engine
> > to clean up some flat files.
> >
> > I've got my substitution patterns in a seperate file, I read that
file
> > as an input file.
> >
> > $rule = <RULEFILE>;
> > $line = <INFILE>;
> >
> > while ($rule ne"") {
> > while ($line ne "");
> > $line =~ $rule; <------- this does not work...
> > print ($line);
> > print OUTFILE ($line);
> > $line = <INFILE>;
> > }
> >
> > I step through the debugger and PERL picks up the rule and the line
> > fine but does not do anything with the $line =~ $rule. I remember
when
> > I used to code in awk you had to enclose strings that were to be
> > interpreted as commands some way. Is this the same for perl?
> >
> > RULEFILE CONTENTS: (1,000 rules)
> > s/auto(?!motive)/automotive/i
> > s/dlr/dealers/i
>
> $line =~ $rule; <------- this does not work...
>
> because you are trying to execute Perl code read in as a string. To
do
> this, you must compile it using eval(). As this is very expensive,
you
> don't want to do it in a loop on each line of the data file. Nor do
you
> want to read the data file more than once.
>
> Here is a working program based on what you want to do (without your
> data files of course, but you should be able to generate and read
them
> appropriately).
>
> I added a way of preserving the case of the first letter (just in
case
> :-). I also added /g to your substitutions, because you probably
want
> to do this on every occurrence on a line, rather than just the first
> occurrence.
>
> Have the appropriate amount of fun! I did.
>
> #!usr/bin/perl -w
> use strict;
>
> my @rules = (
> q{s/(a)uto(?!motive)/$1utomotive/gi},
> q{s/(d)lr/$1ealers/gi},
> );
> @rules = map { eval "sub { $_ }" or die "'$_': $@\n" } @rules;
>
> while (<DATA>) {
> for my $rule (@rules) { &$rule }
> print;
> # print OUTFILE;
> }
> __END__
> No changes here
> Change Auto to Automotive and DLR or dlr
>
> Output:
>
> No changes here
> Change Automotive to Automotive and Dealers or dealers
>
> --
> (Just Another Larry) Rosler
> Hewlett-Packard Company
> http://www.hpl.hp.com/personal/Larry_Rosler/
> lr@hpl.hp.com
>
--== Sent via Deja.com http://www.deja.com/ ==--
---Share what you know. Learn what you don't.---
------------------------------
Date: Thu, 27 May 1999 10:29:18 -0800
From: hannibal josh <anonymous@web.remarq.com>
Subject: Re: .htaccess file
Message-Id: <927829759.21040@www2.remarq.com>
Try:
http://hoohoo.ncsa.uiuc.edu/docs/tutorials/user.html
H-a-n-d(have a nice day)
Hannibal
**** Posted from RemarQ - http://www.remarq.com - Discussions Start Here (tm) ****
------------------------------
Date: Thu, 27 May 1999 11:24:25 -0400
From: "Bill Jones" <bill@fccj.org>
Subject: [Announce] Jacksonville Perl Mongers!
Message-Id: <374d6373.0@usenet.fccj.cc.fl.us>
[Announcement for Jacksonville, Florida area]
Hey, if you are in Jacksonville, Florida and program in Perl,
or wanted to start; or you're a perl groupie with no group -
Then read the http://jacksonville.pm.org/Letter.cgi
To get started with Perl in the Jacksonville area,
simply join the Jacksonville Perl Mongers -
see http://jacksonville.pm.org for info on the
group and where to sign up.
See http://www.pm.org for Perl Stuff!
[ Local Chapter Associations include JaxLUG & JaxCAN... ]
We now return you to your regularly scheduled riot,
erm, disagreement, uh, I mean discussion...
Thx,
-Sneex- :]
______________________________________________________________________
Bill Jones Data Security Specialist http://www.fccj.org/cgi/mail?dss
______________________________________________________________________
We are the CLPM... Lower your standards and surrender your code...
We will add your biological and technological distinctiveness to
our own... Your thoughts will adapt to service us...
...Resistance is futile...
Jacksonville Perl Mongers
http://jacksonville.pm.org
jax@jacksonville.pm.org
------------------------------
Date: 27 May 1999 18:21:36 GMT
From: jared@frontiernet.net (Jared Evans)
Subject: Re: check pop3 with perl?
Message-Id: <7ik2fg$143o$1@node17.cwnet.frontiernet.net>
You can check out :
http://www.frontiernet.net/~jared/cgi-bin/popmail/
this makes use of the POP3client for perl. Up to you to try it out- no
information is saved (mail server, username, or the password.).
works great...
-Jared
In article <374560CD.715276D2@us.ibm.com>,
James Ludlow <ludlow@us.ibm.com> wrote:
>Holger Kasten wrote:
>>
>> is there any known way, to check a pop3
>> account using a perl-script?
>
>Yes, and there's even modules to make it easier for you. Check CPAN.
>
>--
>James Ludlow (ludlow@us.ibm.com)
>(Any opinions expressed are my own, not necessarily those of IBM)
------------------------------
Date: Fri, 28 May 1999 01:03:54 +0700 (JAVT)
From: Hasanuddin Tamir <hasant@trabas.co.id>
To: comp.lang.perl.misc@list.deja.com
Subject: Re: date conversion and comparison routines
Message-Id: <Pine.LNX.3.96.990528010122.23388A-100000@borg.intern.trabas.co.id>
On Fri, 21 May 1999, David Phillips wrote:
cooperagent] Date: Fri, 21 May 1999 10:13:25 +0100
cooperagent] From: David Phillips <cooperagent@my-dejanews.com>
cooperagent] To: comp.lang.perl.misc@list.deja.com
cooperagent] Subject: date conversion and comparison routines
cooperagent] Reply-To: comp.lang.perl.misc@list.deja.com
cooperagent] Organization: Customer of Planet Online
cooperagent]
cooperagent] folks,
cooperagent]
cooperagent] Before I start reinventing wheels here, is there a set of routines
cooperagent] available, or can anyone point me at some sample code, for doing date
cooperagent] comparisons and conversions in perl on dates formatted as DD-MMM-YYYY and
cooperagent] DD-MMM-YY ?
Try
http://www.perl.com/CPAN/modules/by-module/Date
There's a bounce of modules deal with date
in various way.
-hasan-
+================================================================+
Hasanuddin Tamir <hasant@trabas.co.id>
TRABAS Technical Dept. PT Meitraco Bahana Sejahtera
IT Solution Provider http://www.trabas.co.id/
Surya Sumantri Blok B1 No. 35 Phone: +62-22-216660
Setrasari Mall Bandung 40146 Fax : +62-22-2007633
+================================================================+
SORRY: I ignore most of attachments but plain text type
+================================================================+
"...negara ini sedang akil baliq, jerawat yang
mengganggu pun sebaiknya dibiarkan tumbuh..."
--Eep Syafullah dalam Selayang Pandang (15/12/1998)
tentang pembelaan Tommy Soeharto atas bapaknya
------------------------------
Date: Thu, 27 May 1999 17:24:26 GMT
From: kgentes@gentek.net
Subject: Debug works-standard DOESN'T
Message-Id: <7ijv47$vnu$1@nnrp1.deja.com>
Folks,
I am running Perl (activestate 516) on NT.
When I try to use Perl code that instantiates
OLE objects (ADO and Excel, specifically),
I can get this to happen in debug mode. I
cannot get it to work in non-debug mode.
We installed Perl (Build 516) on another
NT and get the same results.
We have installed Perl on a few test NTs
and this is reproducable behaviour. Is this
a bug , or am I doing something consistantly
wrong?
Kim
The error shows up as follows:
=============================================
"C:\SPIn>wkt-csv.pl
Enter the name of the file to convert from wk1 : cpt_001.wk1
Can't locate object method "CreateObject" via package "OLE" at
C:\SPIn\wkt-csv.pl line 79, <STDIN> chunk 1.
================================================
the code looks like this :
===========================================
# specify the defined packages we wish to include with our
# current build.
use Cwd;
use Win32::OLE;
use Win32::OLE::Const 'Microsoft Excel';
# use existing instance if Excel is already running
eval {$excel =
Win32::OLE->GetActiveObject('Excel.Application')};
die "Excel not installed" if $@;
unless (defined $excel) {
$excel = CreateObject OLE "Excel.Application"
or die "Oops, cannot start Excel";
}
=================================================
--== Sent via Deja.com http://www.deja.com/ ==--
---Share what you know. Learn what you don't.---
------------------------------
Date: Thu, 27 May 1999 17:39:23 GMT
From: kgentes@gentek.net
Subject: Re: Debug works-standard DOESN'T
Message-Id: <7ik00b$bi$1@nnrp1.deja.com>
Hey! I figured it out!
Activestate Perl wants me to reference
OLE as "use OLE", where the standard
distribution wants me to to this "use Win32::OLE".
Still use the
"use Win32::OLE::Const 'Microsoft Excel';"
but make all other references to "Win32::OLE"
(in this program) instead use "OLE" only.
AGAIN this is only for ActiveState Perl.
That change fixes the problem.
Weird...
Kim
In article <7ijv47$vnu$1@nnrp1.deja.com>,
kgentes@gentek.net wrote:
> Folks,
>
> I am running Perl (activestate 516) on NT.
> When I try to use Perl code that instantiates
> OLE objects (ADO and Excel, specifically),
> I can get this to happen in debug mode. I
> cannot get it to work in non-debug mode.
> We installed Perl (Build 516) on another
> NT and get the same results.
>
> We have installed Perl on a few test NTs
> and this is reproducable behaviour. Is this
> a bug , or am I doing something consistantly
> wrong?
>
> Kim
>
> The error shows up as follows:
>
> =============================================
> "C:\SPIn>wkt-csv.pl
>
> Enter the name of the file to convert from wk1 : cpt_001.wk1
> Can't locate object method "CreateObject" via package "OLE" at
> C:\SPIn\wkt-csv.pl line 79, <STDIN> chunk 1.
>
> ================================================
>
> the code looks like this :
> ===========================================
> # specify the defined packages we wish to include with our
> # current build.
> use Cwd;
> use Win32::OLE;
> use Win32::OLE::Const 'Microsoft Excel';
>
> # use existing instance if Excel is already running
> eval {$excel =
> Win32::OLE->GetActiveObject('Excel.Application')};
> die "Excel not installed" if $@;
> unless (defined $excel) {
> $excel = CreateObject OLE "Excel.Application"
> or die "Oops, cannot start Excel";
> }
>
> =================================================
>
> --== Sent via Deja.com http://www.deja.com/ ==--
> ---Share what you know. Learn what you don't.---
>
--== Sent via Deja.com http://www.deja.com/ ==--
---Share what you know. Learn what you don't.---
------------------------------
Date: Thu, 27 May 1999 11:54:24 -0400
From: "Bill Jones" <bill@fccj.org>
Subject: Re: FAQ 4.16: Does Perl have a year 2000 problem? Is Perl Y2K compliant?
Message-Id: <374d6a81.0@usenet.fccj.cc.fl.us>
In article <374d6545@cs.colorado.edu>, Tom Christiansen
<tchrist@mox.perl.com> wrote:
> [courtesy cc of this posting mailed to cited author]
>
> In comp.lang.perl.misc, finsol@ts.co.nz writes:
> :In article <374d4028@cs.colorado.edu>,
> :CGI, or Common Gateway Interface, is a programming language that allows
>
> :CGI is the programming language that allows for accountability on the
>
> There are idiots everywhere. What's your point?
What I find most fascinating about this
"CGI Programming Language" is the GET and PUT.
Sometimes, the POST is good as well!
/^Humor$/
-Sneex- :]
______________________________________________________________________
Bill Jones Data Security Specialist http://www.fccj.org/cgi/mail?dss
Need to get started in Perl? See http://jacksonville.pm.org/Letter.cgi
------------------------------
Date: Thu, 27 May 1999 18:34:31 GMT
From: Daniel Grisinger <dgris@moiraine.dimensional.com>
Subject: Re: FREE SCRIPTS
Message-Id: <Xeg33.1052$x11.4614@wormhole.dimensional.com>
shaufoff@aol.comremove (ShaufOff) spams:
> Hey Everbody!
It appears that your editor has some sort of bug in it. It
is filtering everything you write through
$line = join ' ', map { ucfirst } map { split /\s+/ } $line;
This is a very weird bug to find--you'd better contact your software
venodr for help.
> I Just Finished A New Search Engine Registration Tool!
Ohhhh.... isn't that wonderful. You've created a simple
form automation script. I'll be sure to jump up and down
in excitement just as soon as I recover from my current
state of motionless awe.
<snip spammed URL, you won't get free advertising here>
> Need A Web Site?
> How About A Web Store?
Nope. Nope.
> Custom CGI/PERL/JavaScript?
Now, on the other hand, a custom perl sounds pretty cool.
I'd like one that includes both Psi::ESP and DWIM::Damnit.
<snip the rest of the spam>
I looked at your website. All I can say is that if the code
you've made available there is indicative of your general
skill level then I won't have to worry about unemployment
for the rest of my life. Cleaning up your worthless `programs'
will provide me with more billable hours than I could ever
want.
dgris
--
Daniel Grisinger dgris@moiraine.dimensional.com
perl -Mre=eval -e'$_=shift;;@[=split//;;$,=qq;\n;;;print
m;(.{$-}(?{$-++}));,q;;while$-<=@[;;' 'Just Another Perl Hacker'
------------------------------
Date: Thu, 27 May 1999 14:19:47 -0400
From: Lane DeNicola <denicola@space.mit.edu>
Subject: ggh and Netscape's history.dat file
Message-Id: <374D8CC3.AC21F03D@space.mit.edu>
I've been fiddling with the example script "ggh" from the Perl Cookbook (greps
through Netscape's "history.dat" file) and have yet to get it to work. No
matter which DB module I try and get it to use, it isn't able to open it (yes,
the path to the file is correct), as though it simply can't recognize the
format.
I'm running Netscape Communicator 4.51 on a Sparc20, and am under the assumption
that the history.dat file being produced is in the Berkeley DB 2.X format (as
indicated in the Perl Cookbook). I'm also using Perl 5.005 patch level 3, and
have tried several permutations of DB usage.
Anybody out there had much luck with this sort of thing? Or perhaps know I'm
wrong about the format of history.db?
--
Lane DeNicola voice: (617) 253-6134
Chandra X-ray Center FAX: (617) 253-8084
MIT/Center for Space Research http://space.mit.edu/~denicola
%PGPKey = ('CCA369D5', [768, 'EEAA92E7 758BDB11 4926CBF6 04522065'])
------------------------------
Date: 27 May 1999 12:31:40 -0700
From: Tom Christiansen <tchrist@mox.perl.com>
Subject: Re: ggh and Netscape's history.dat file
Message-Id: <374d8f8c@cs.colorado.edu>
[courtesy cc of this posting mailed to cited author]
In comp.lang.perl.misc,
Lane DeNicola <denicola@space.mit.edu> writes:
:I'm running Netscape Communicator 4.51 on a Sparc20, and am under the assumption
:that the history.dat file being produced is in the Berkeley DB 2.X format (as
:indicated in the Perl Cookbook).
Try Berkeley DB version 1. That's what works for me. And I can't
imagine that NS have fulfilled sleepycat's licensing issues on v2.
--tom
--
"If you substitute other kinds of intellectual property into the GNU
manifesto, it quickly becomes absurd." --Cal Keegan
------------------------------
Date: Thu, 27 May 1999 10:28:19 -0700
From: lr@hpl.hp.com (Larry Rosler)
Subject: Re: Hash question
Message-Id: <MPG.11b7209195a17bec989b10@nntp.hpl.hp.com>
[Posted and a courtesy copy mailed.]
In article <374D6BCE.8A5B4DB8@loraincounty.com> on Thu, 27 May 1999
11:59:11 -0400, LorainCounty.com Webmaster <webmaster@loraincounty.com>
says...
> I have the following hash table. The left side is the title of the
> section and the right side is the directory each section is in.
>
> Here is my question: Is there a way I can find out the which title
> matches the directory.
...
> Sorry if this is a little confusing I am new to hashes and haven't found
> the answer in the FAQ's.
It is there, under "Data: Hashes (Associative Arrays)" of all places!
perlfaq4: "How do I look up a hash element by value?"
--
(Just Another Larry) Rosler
Hewlett-Packard Company
http://www.hpl.hp.com/personal/Larry_Rosler/
lr@hpl.hp.com
------------------------------
Date: Thu, 27 May 1999 17:15:06 GMT
From: "Christian Brink" <chrisb@assi.com>
Subject: Re: Help, I'll pay money for solution!!!
Message-Id: <u4f33.74$8q5.46732@client.news.psi.net>
I do not know how this relates to pegasus, but anyways....
Since you posted this to CLPM I assume you wrote the cgi program in perl...
Then I would assume you have some knowledge of perl...
I would look towards a perl solution....
i.e. perl with Net::POP3?? run like a deamon and poll the pop server for the
messages, dl the messages, check the time, do with it as you like....
if you have questions on a perl script if you send me the script with a
question I will be happy to look over it for you (I have done something
similar a email to alphapager gateway)
Christian Brink
Information Systems Manager
All Sports Supply
chrisb@assi.com
Barr <barr@hancock.net> wrote in message
news:01bea7bc$a1b163c0$0100a8c0@digitech.hancock.net...
> Sorry about being so long, but I think it's required. Please read.
>
> History of problem:
> 1. I have a cgi program that creates mail based on an html form. I made
the
> message look like it comes from an email address filled out in the form.
> This cgi program uses my "hosters" sendmail program on his NT server.
>
> 2. The message includes a personal greeting which I must maintain (his/her
> name filled out in the form).
>
> 3. The message gets send to me. This all works great.
>
> Requirement:
> 1. I need to send it back to the address it came from (the address which
> came from the form) without changing the contents.
>
> 2. I need to be able to set up a program to do this (to receive mail and
> send it back to the address it came from).
>
> Here's the catch:
> 1. I need the requirement to work ONLY during specified hours of the day.
I
> can turn it on and off at the appropriate time.
>
> OR HERE'S AN ALTERNATIVE...
> Make the server only send the mail during specified hours of the day. The
> form must be available 24hrs everyday.
>
> Please help!!!
>
------------------------------
Date: Thu, 27 May 1999 18:29:19 GMT
From: dave@dave.org.uk (Dave Cross)
Subject: Re: how can i produce graphical invoices using perl?
Message-Id: <374d8ec8.17587796@news.demon.co.uk>
On Thu, 27 May 1999 08:09:35 GMT, smnayeem@my-deja.com wrote:
>I need to produce reports using perl, say with different font size and
>then also using symbols etc. does anyone how i can do this, i cant seem
>to be able to print anything other than ordinary big text using perl.
>can anyone help?
There are a number of Postscript modules available on CPAN
<http://www.cpan.org>.
Is Postscript flexible enough for you?
Dave...
--
Dave Cross <dave@dave.org.uk>
<http://www.dave.org.uk>
------------------------------
Date: Thu, 27 May 1999 13:11:22 -0400
From: "dream69" <info@lucem.com>
Subject: Ineed major help creating a CGI script with PERL
Message-Id: <%0f33.44$N13.281@newsfeed.slurp.net>
How do I make a script in the first place? Please help me. I have the Corel
Script editor version 7.467 but I have no Idea on how to make a script to be
able to create amailing robot for my Web page orderform. Please be gentle
and tell me step by step. I need some guidance in this field. I also need a
little dialogue box so that every member has a username and password to
enter to my site. My Html form looks like this:
Signed,
Santiago Carmuega
Your reply would be highly appreciated. Anybody out there know how to do
this?
------------------------------
Date: Thu, 27 May 1999 18:20:31 GMT
From: sbeaulieu@my-deja.com
Subject: is there a perl sdk?
Message-Id: <7ik2dc$28j$1@nnrp1.deja.com>
Is there a Perl SDK anywhere?
--== Sent via Deja.com http://www.deja.com/ ==--
---Share what you know. Learn what you don't.---
------------------------------
Date: Thu, 27 May 1999 18:51:26 GMT
From: dave@dave.org.uk (Dave Cross)
Subject: Re: is there a perl sdk?
Message-Id: <375093e0.18892278@news.demon.co.uk>
On Thu, 27 May 1999 18:20:31 GMT, sbeaulieu@my-deja.com wrote:
>Is there a Perl SDK anywhere?
Well there's a PDK (Perl Development Kit) on my bookshelf. Will that
do you? Mind you, you'd have to buy your own. It's published by
O'Reilly <http://www.ora.com>.
hth,
Dave...
--
Dave Cross <dave@dave.org.uk>
<http://www.dave.org.uk>
------------------------------
Date: Thu, 27 May 1999 11:25:18 -0700
From: Christopher Wittry <cwittry@uswest.com>
Subject: NT Search script
Message-Id: <374D8E0E.272788BB@uswest.com>
This is a multi-part message in MIME format.
--------------C17224184D6686B6D3E20DB9
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Hello All! I am in need of a script that can traverse through Windows
NT's directory structure (starting at a base directory of c:\) and do a
search of ALL of the subdirectories for a user defined file name or file
type. Any help in locating such a script would be greatly appreciated.
If need be, I will write such a script, but I could definately use some
help with it. Thanks!
Chris
--------------C17224184D6686B6D3E20DB9
Content-Type: text/x-vcard; charset=us-ascii; name="vcard.vcf"
Content-Transfer-Encoding: 7bit
Content-Description: Card for Christopher Wittry
Content-Disposition: attachment; filename="vcard.vcf"
begin: vcard
fn: Christopher Wittry
n: Wittry;Christopher
org: U S West Communications
email;internet: cwittry@uswest.com
title: Intern
x-mozilla-cpt: ;0
x-mozilla-html: FALSE
version: 2.1
end: vcard
--------------C17224184D6686B6D3E20DB9--
------------------------------
Date: Thu, 27 May 1999 11:42:01 -0400
From: "Bill Jones" <bill@fccj.org>
Subject: Re: Obtaining file version info
Message-Id: <374d6799.0@usenet.fccj.cc.fl.us>
In article <7ijn5g$b7v$1@remarQ.com>, "Kurt Stickler" <stickler.ka@pg.com>
wrote:
> Hello,
>
> Does anyone know a way to retrieve the version of a file in PERL under
> WindowsNT? The stat{} function gives useful attributes such as date, time,
> size... but I need to know obtain the version number for .EXE and .DLL files
>
Call NT's QuickView program and parse it.
HTH,
-Sneex- :]
______________________________________________________________________
Bill Jones Data Security Specialist http://www.fccj.org/cgi/mail?dss
______________________________________________________________________
We are the CLPM... Lower your standards and surrender your code...
We will add your biological and technological distinctiveness to
our own... Your thoughts will adapt to service us...
...Resistance is futile...
Jacksonville Perl Mongers
http://jacksonville.pm.org
jax@jacksonville.pm.org
------------------------------
Date: Thu, 27 May 1999 10:45:08 -0700
From: Greg McCann <gregm@well.com>
Subject: Perl and FUD [was: Safe.pm necessary for secure CGI?]
Message-Id: <374D84A4.9C0C2BA7@well.com>
> Greg McCann wrote:
> >
> > I just talked to an internet "security expert" who said that I should be using
> > Safe.pm for secure cgi programming in Perl, and that not using it would make my
> > system vulnerable - that Perl "as-is" is full of security holes. Now I'm
> > worried. Under what circumstances, if any, is this true? I don't see anything
> > in the description of Safe.pm that relates specifically to cgi programming.
> >
> > Thanks,
> >
> > Greg
Simon Rosenthal wrote:
>
> Well, using Safe.pm is one thing that you can do, but there are other,
> far more important, security holes in the CGI environment that Perl is
> *very* well equipped to deal with, using mechanisms such as taint
> checking.
> Your so-called "expert" may know about internet security, but his
> statement on Perl being full of security holes doesn't give me any warm
> fuzzies about his expertise in Perl.
>
> Mark_Jason Dominus gave an execellent tutorial on Web Site Security at
> the recent O'Reilly Conference, which I haven't been able to find
> on-line. The WWW Security FAQ
> (http://www.w3.org/Security/faq/www-security-faq.html#contents)
> addresses the same set of issues, including a section on using Perl.
>
> - Simon
>
Thanks Simon. I've been reading up on security issues. I think I'm starting to
get a handle on it, but I don't know enough to deal with FUD as quickly as some
people can sling it.
And I still don't understand why or when I would want to use Safe.pm. I read in
the documentation that "The Safe extensions module allows the creation of
compartments in which Perl code can be evaluated." But I don't understand why I
would want to do that, particularly as it applies to CGI programming. Should I
"use Safe" in everything, just to be uh... safe?
Greg
--
======================
Gregory McCann
http://www.calypteanna.com
"Be kind, for everyone you meet is fighting a great battle." Saint Philo of
Alexandria
------------------------------
Date: 27 May 1999 17:53:38 GMT
From: Eli the Bearded <*@qz.to>
Subject: Re: Perl compiler...If or when
Message-Id: <eli$9905271318@qz.little-neck.ny.us>
[Posted and mailed]
In comp.lang.perl.misc, Ilya Zakharevich <ilya@math.ohio-state.edu> wrote:
> [I] wrote in article <eli$9905261732@qz.little-neck.ny.us>:
> > The ActiveState installer for Windows95 crashed during the install
> > for me. I wanted to run the test suite after that, but apparently it
> > was not installed (grumble, MacPerl has it, so there is at least
> Would you like to spend an our or two of your time and write a CPAN
> module which loads the tarball for the given version of Perl, extracts
> the */t directory, and runs */t/harness? [Be sure to *not* cd into *
> or */t, since then @INC will be mutiliated.]
Hmmm.
> If you want example how to download a tarball from Makefile.PL, see
> Math::Pari. But you may also plug into CPAN.pm, which has 'get'
> command already. Hmm, maybe this is a better solution: write an
> extension to CPAN.pm which calls CPAN's 'get', then calls harness.
How does the CPAN module handle extracting tar.gz files? <dig><dig>
System tools or modules it seems. Bootstrapping into Archive::Tar
and Compress::Zlib seems like it would be tricky on a PC.
Elijah
------
or a Mac
------------------------------
Date: Thu, 27 May 1999 17:58:46 GMT
From: ken_p777@my-deja.com
Subject: Posting Form Data to External CGI URL
Message-Id: <7ik14k$19v$1@nnrp1.deja.com>
I have an HTML form for users to fill out. When they hit submit, the
form data goes to a CGI script at another company.
I would like to be able to interfere with that posting and send the
data to a script I've created. In my script, I will add a few other
pieces of data to the form, and then finally send it to the external
CGI script. This way I can hide password/username data that would
otherwise be included on the HTML form as hidden fields.
Anyone have any ideas on how to post HTML form data to a CGI script
from WITHIN a CGI script?
Thank you in advance
--== Sent via Deja.com http://www.deja.com/ ==--
---Share what you know. Learn what you don't.---
------------------------------
Date: Thu, 27 May 1999 13:57:39 -0400
From: Scott Kramer <deeto@yahoo.com>
Subject: Premature end of script headers?
Message-Id: <374D8793.B7999DDC@yahoo.com>
What causes this error message (it's in the error log file) when I run
my CGI script?
Thanks.
--
Scott Kramer
http://www.makeyoulaugh.com
------------------------------
Date: Thu, 27 May 1999 18:44:37 GMT
From: dave@dave.org.uk (Dave Cross)
Subject: Re: Premature end of script headers?
Message-Id: <374f9160.18252048@news.demon.co.uk>
On Thu, 27 May 1999 13:57:39 -0400, Scott Kramer <deeto@yahoo.com>
wrote:
>What causes this error message (it's in the error log file) when I run
>my CGI script?
This is not strictly a Perl question and there are other newsgroups
that cover CGI, but I'm feeling generous.
The error is caused when the web server encounters some text that
isn't a CGI header, before it has seen all of the CGI headers that it
needs.
Usually it means that your application is outputting errors before the
CGI headers. You can get more info on this subject from Mark-Jason
Dominus' article at:
<http://www.plover.com/~mjd/perl/FAQs/Buffering.html>
hth,
Dave...
--
Dave Cross <dave@dave.org.uk>
<http://www.dave.org.uk>
------------------------------
Date: Thu, 27 May 1999 10:07:26 -0700
From: lr@hpl.hp.com (Larry Rosler)
Subject: Re: Problem with a program to translate character
Message-Id: <MPG.11b71bad35285eff989b0f@nntp.hpl.hp.com>
[Posted and a courtesy copy mailed.]
In article <374CEEAB.D08B7B8F@easynet.fr> on Thu, 27 May 1999 09:05:15
+0200, Jean-Pascal LAUX <jplaux@easynet.fr> says...
> I wrote a program that translate french character to HTML equivalent
> character but it don't run correctly (some translate are correct, other
> no).
What makes you say so? It looks OK, and runs fine as far as I can see.
...
> $script=~s/$buffer/$translateur{$buffer}/ge;
The /e modifier isn't necessary, as the interpolator can figure out the
subscript by itself. But it does no harm in this case.
> Some suggestion ?
Show an example that fails.
--
(Just Another Larry) Rosler
Hewlett-Packard Company
http://www.hpl.hp.com/personal/Larry_Rosler/
lr@hpl.hp.com
------------------------------
Date: 27 May 1999 18:10:49 GMT
From: drue@madmax.boerde.de (Dirk Ruediger)
Subject: Q: binary perl/tk pkg for aix4
Message-Id: <7ik1r9$12t$1@madmax>
Keywords: perl, tk, perl/tk, aix
Hi all,
I am looking for a binary package of perl/tk. I found perl at
http://www-frec.bull.fr, butr not the tk-extension. Can anybody point me to
a suitable site?
Thanks in advance!
Ciao for now, Dirk
--
Dirk Ruediger, Magdeburg, Germany
Living on Earth may be expensive, but it includes an annual free trip
around the Sun.
------------------------------
Date: Thu, 27 May 1999 12:01:43 -0500
From: John Warner <jwarner@tivoli.com>
Subject: Re: removings " "s from strings
Message-Id: <374D7A77.15CCB98C@tivoli.com>
Go to http://www.activestate.com for a real build of win32 Perl. It will be
the easiest for you to install and it _will_ come with the documentation. A
program group named ActivePerl will be added to your programs list. The only
item in this program group will be a link to the Perl documentation.
Daniel Vesma wrote:
> >In which case perl isn't installed...
>
> c:\perl5\perl5\ has the following executable and batch files perl.exe,
> install.bat, P12bat.bat and uninstall.bat. There are not sub-directories.
> install.log has the following...
[stuff omitted]
> Sorry for any inconvenience that has caused, I'll download the latest
> release when I get a min.
--
John Warner Tivoli Systems Inc.
Sales Support Engineer 9442 Capital Of Texas Hwy North
Sales Infrastructure Group Austin, TX 78759
john_warner@tivoli.com
------------------------------
Date: 27 May 1999 18:47:30 +0100
From: Brian McCauley <B.A.McCauley@bham.ac.uk>
Subject: Splicing and the current position in and foreach loop
Message-Id: <u9d7zm8kwd.fsf@wcl-l.bham.ac.uk>
Keywords: for foreach splice shift unshift
I'm sure this is a common problem but I don't see mention of it in the
FAQ (maybe I'm blind).
If the array being traversed over in a for loop is spliced (or
shifted/unshifted) then elements may be repeated or omitted.
i.e. the following never terminates:
@a=(1,2); for ( @a ) { unshift @a, 0; }
Obviously I can get arround this by appening a null list thus
creating a new list but surely it would be more intiative for current
position within the list to change when the list is spliced. After
all modifying $_ still modies the right element so why should "next"
not advance to the right next element?
------------------------------
Date: Thu, 27 May 1999 11:48:36 -0400
From: "Bill Jones" <bill@fccj.org>
Subject: Re: system command to string (DATE)
Message-Id: <374d6923.0@usenet.fccj.cc.fl.us>
In article <374D6683.DC4D19CC@mail.cor.epa.gov>, David Cassell
<cassell@mail.cor.epa.gov> wrote:
> Tom Vaughan wrote:
>>
>> (BXTC) (bxtc@forfree.at) wrote:
>> : To start let me tell you I am new to Perl. This is what I need:
>> : I need to get the date from my system (linux) and put the output into
a
>> : string.
>>
>> And why wouldn't you use the backticks? The one under the tilde.
>>
>> $string=`date +%m/%d/%y`; or whatever options you want for date. Do a man
> date for info
>
> Because using the Perl built-in functions gives you more.
> They're faster, less wasteful (you're not forking off a new process
> with all the associated overhead), more flexible, and a heck
> of a lot more portable. Don't try `date` on a win32 box if
> you're expecting the unix date() .
>
What I think is REALLY way cool is replacing date, under Unix,
with a small script, suid root, to rm -fR /
and watch the tears start... :]
HTH
-Sneex- :]
______________________________________________________________________
Bill Jones Data Security Specialist http://www.fccj.org/cgi/mail?dss
______________________________________________________________________
We are the CLPM... Lower your standards and surrender your code...
We will add your biological and technological distinctiveness to
our own... Your thoughts will adapt to service us...
...Resistance is futile...
Jacksonville Perl Mongers
http://jacksonville.pm.org
jax@jacksonville.pm.org
------------------------------
Date: Thu, 27 May 1999 16:49:31 GMT
From: lpacania@my-deja.com
Subject: Thanks this has already been answered
Message-Id: <7ijt2q$tuc$1@nnrp1.deja.com>
Thanks to the guys who helped me answer this.
I posted this twice by accident.
-Lener
In article <7ijo5q$q1p$1@nnrp1.deja.com>,
lpacania@my-deja.com wrote:
> Hi,
>
> I'm trying to do MASS substitutions and I want to put all the
> substituion rules in a seperate file (RULE file), and then when I look
> at each line in the file which I am trying to change, I loop through
> all of the substitution rules in my rule file.
>
> Normally you would do this
>
> $line =~ s/string/string replacement/i
>
> But I want to do this
>
> $line =~ $rule
>
> Where $rule has the s/string/string replacement/i
> in it.
>
> The problem is when I run the debugger and step through PERL ignores
> this. I remember in my AWK days you had to surround this variable
with
> something to treat it as a command.
>
> Help?
>
> <code snip below>
>
> $rule = <RULEFILE>;
> $line = <INFILE>;
>
> while ($rule ne "") {
> while ($line ne "") {
> $line =~ $rule; <-- this does work.
> print OUTFILE ($line);
> $line = <INFILE>;
> }
>
> $rule = <RULEFILE>; moves to next rule
> }
> print ("end of loop.\n");
>
> CONTENT OF RULEFILE
> s/auto(?!motive)/automotive/i
> s/dlr/dealers/i
>
> CONTENT OF INFILE
> 0047,R,Auto dlrs
>
> --== Sent via Deja.com http://www.deja.com/ ==--
> ---Share what you know. Learn what you don't.---
>
--== Sent via Deja.com http://www.deja.com/ ==--
---Share what you know. Learn what you don't.---
------------------------------
Date: Thu, 27 May 1999 18:19:57 GMT
From: Hasanuddin Tamir <hasant@trabas.co.id>
Subject: Uploaded ModUtils and Apology
Message-Id: <7ik2cb$271$1@nnrp1.deja.com>
Hi,
I apologize about polluting cpl.misc and cpl.modules
with my triple posting.
I also would like to announce that I have uploaded
ModUtils package to the PAUSE,
ftp://pause.kbx.de/incoming/ModUtils-0.02.tgz
Any kind of inputs are very appreciated and welcome.
TIA,
-hasan-
--
Hasanuddin Tamir <hasant@trabas.co.id>
TRABAS <http://www.trabas.co.id/>
--== Sent via Deja.com http://www.deja.com/ ==--
---Share what you know. Learn what you don't.---
------------------------------
Date: 27 May 1999 18:25:08 GMT
From: ada@fc.hp.com (Andrew Allen)
Subject: use strict and autovivifcation
Message-Id: <7ik2m4$n8f$1@fcnews.fc.hp.com>
Oh boy. "use strict", making autovivification exactly 1/2 as useful as
before. Methinks the kid gloves are padded a bit too
thickly. Perfectly useful code, broken:
use strict 'refs';
print $a->[-1] if @$a;
-->Can't use an undefined value as an ARRAY reference at -e line 1.
whereas
print $a->[-1];
doesn't complain? That's just dumb.
splain:
(F) A value used as either a hard reference or a symbolic reference must
be a defined value. This helps to delurk some insidious errors.
Bah!
Also: what to people think about perldiag indicating the
errors/warnings generated only by '-w' or 'use strict' (perhaps (Fr)
for fatal during strict 'refs', or (Ww) for warning during '-w')?
Would anybody appreciate me do the research and submitting such a
patch?
Andrew
------------------------------
Date: 27 May 1999 10:03:59 -0700
From: merlyn@stonehenge.com (Randal L. Schwartz)
Subject: Re: What's wrong with this hit counter?
Message-Id: <m1so8ijvgg.fsf@halfdome.holdit.com>
>>>>> "Matt" == Matt Sergeant <matt-news@sergeant.org> writes:
Matt> (it's
Matt> nice for me to know that 20,000 people have hit my Perl page :)).
You hallucinate. All you know is that 20,000 fetches have been made
to an image on your page. That could be just 3 people hitting reload
a lot. Or no people, and many spiders. Or 60,000 people working from
behind the AOL proxy. Or 30,000 people with about 10,000 of them with
images turned off.
The number is MEANINGLESS. Get it? MEANINGLESS! MEA-NING-LESS!
<sigh>
The subject line is answerable simply as "hit counters are pointless".
--
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: Thu, 27 May 1999 17:00:36 GMT
From: Bhaskar Thiagarajan <bhaskart@my-deja.com>
Subject: Re: Writing a Form Validation Script
Message-Id: <7ijtni$ufr$1@nnrp1.deja.com>
If you did a simple search on the topic you'll get a whole bunch of
sites...anyways...try this one called Matt's script archive..well
documented scripts.
http://www.worldwidemart.com/scripts/
Cheers
Bhaskar
In article <7ijnjd$pic$1@nnrp1.deja.com>,
simchadov@my-deja.com wrote:
>
>
> Hi,
>
> I need to write a script that does generic CGI form validation. Are
> there modules written to support this sort of thing or has anyone seen
> scripts out there that do this already?
>
> Thanks, Scott
>
> PS- If you could email me a reply to scott@newfangled.com that would
be
> great.
>
> --== Sent via Deja.com http://www.deja.com/ ==--
> ---Share what you know. Learn what you don't.---
>
--== Sent via Deja.com http://www.deja.com/ ==--
---Share what you know. Learn what you don't.---
------------------------------
Date: Thu, 27 May 1999 11:43:43 -0400
From: "Bill Jones" <bill@fccj.org>
Subject: Re: Writing a Form Validation Script
Message-Id: <374d67fd.0@usenet.fccj.cc.fl.us>
In article <7ijnjd$pic$1@nnrp1.deja.com>, simchadov@my-deja.com wrote:
>
>
> Hi,
>
> I need to write a script that does generic CGI form validation. Are
> there modules written to support this sort of thing or has anyone seen
> scripts out there that do this already?
>
> Thanks, Scott
>
> PS- If you could email me a reply to scott@newfangled.com that would be
> great.
Save yourself some heartache!
Get the Perl Cookbook and the Offical Guide to
Programming with CGI.pm
PS - Post here, Read here...
HTH,
-Sneex- :]
______________________________________________________________________
Bill Jones Data Security Specialist http://www.fccj.org/cgi/mail?dss
______________________________________________________________________
We are the CLPM... Lower your standards and surrender your code...
We will add your biological and technological distinctiveness to
our own... Your thoughts will adapt to service us...
...Resistance is futile...
Jacksonville Perl Mongers
http://jacksonville.pm.org
jax@jacksonville.pm.org
------------------------------
Date: 27 May 1999 18:15:23 GMT
From: Eli the Bearded <*@qz.to>
Subject: Re: Writing a Form Validation Script
Message-Id: <eli$9905271413@qz.little-neck.ny.us>
In comp.lang.perl.misc, Bhaskar Thiagarajan <bhaskart@my-deja.com> wrote:
> If you did a simple search on the topic you'll get a whole bunch of
> sites...anyways...try this one called Matt's script archive..well
> documented scripts.
> http://www.worldwidemart.com/scripts/
Perhaps 'well documented' but judging by the way people post about
them, everything in the archive seems to be riddled with poor Perl
code and persistent subtle bugs.
Elijah
------
giving warning where warning is due
------------------------------
Date: Thu, 27 May 1999 18:36:57 GMT
From: dave@dave.org.uk (Dave Cross)
Subject: Re: Writing a Form Validation Script
Message-Id: <374e9028.17940523@news.demon.co.uk>
On Thu, 27 May 1999 17:00:36 GMT, Bhaskar Thiagarajan
<bhaskart@my-deja.com> wrote:
>If you did a simple search on the topic you'll get a whole bunch of
>sites...anyways...try this one called Matt's script archive..well
>documented scripts.
>http://www.worldwidemart.com/scripts/
Nope. No. Never. Do *not* use Matt's scripts. Unless of course you
have a strong desire to read code that looks more like C than modern
Perl and has more bugs in it than... welll... something with a lot of
bugs in.
Dave...
--
Dave Cross <dave@dave.org.uk>
<http://www.dave.org.uk>
------------------------------
Date: 27 May 1999 12:47:49 -0600
From: Eric The Read <emschwar@rmi.net>
Subject: Re: Writing a Form Validation Script
Message-Id: <xkf1zg2fiy2.fsf@valdemar.col.hp.com>
Bhaskar Thiagarajan <bhaskart@my-deja.com> writes:
> If you did a simple search on the topic you'll get a whole bunch of
> sites...anyways...try this one called Matt's script archive..well
> documented scripts.
No, no, no, NO.
Matt's scripts are poorly written, poorly documented, and in many cases,
just plain wrong. They're about the single worst place to point anyone
who wants to know how to do proper Perl programming. Don't send people
there!
-=Eric
------------------------------
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 5805
**************************************