[8578] in Perl-Users-Digest
Perl-Users Digest, Issue: 2195 Volume: 8
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Fri Mar 27 14:07:52 1998
Date: Fri, 27 Mar 98 11:00:28 -0800
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Perl-Users Digest Fri, 27 Mar 1998 Volume: 8 Number: 2195
Today's topics:
? search and replace string in Perl ? <fp@pmpcs.com>
Re: ARRRG! "recommended" CPAN update stopped CPAN modul lvirden@cas.org
Re: Command line arguments <ludlow@us.ibm.com>
Re: Copy file command. (Lasse =?ISO-8859-1?Q?Hiller=F8e?= Petersen)
Re: Copy file command. <tchrist@mox.perl.com>
Re: Going Rates for PERL Programming??? <fp@pmpcs.com>
Install Parallel::Pvm <brianp@webpromote.com>
Re: installing IO module on AIX (Jeffrey R. Drumm)
Re: Need sorting routine in Perl (Stuart McDow)
Nested quantifier in regexp problem (Rick Freeman)
Re: Odd dereferencing behavior <mike@unival.com>
perl 5 CGI with NT IIS3.0, this one is challenging ... <pcbob@raex.com>
Re: Perl Libraries y2k compliance lvirden@cas.org
Re: Perl Libraries y2k compliance lvirden@cas.org
Re: Problems with handling Mac/PC/Unix line breaks <jim.michael@gecm.com>
Re: PROPOSAL: The Perl Dictionary <merlyn@stonehenge.com>
rant: illiterate Perl programmers (Kyler Laird)
Re: rant: illiterate Perl programmers (brian d foy)
request HELP setting ISAPI Perl's @INC array <benton@panix.com>
Re: trivial example reveals a taint problem? <hoco@shell5.ba.best.com>
Re: trivial example reveals a taint problem? <hoco@shell5.ba.best.com>
Re: using ftp.pl as included in perl 5.002 (Jeffrey R. Drumm)
Would like to hire purchase a perl script <jeffjarrnospam@enteract.com>
Re: Would like to hire purchase a perl script (brian d foy)
Digest Administrivia (Last modified: 8 Mar 97) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Fri, 27 Mar 1998 13:37:00 -0500
From: "Peter Perchansky" <fp@pmpcs.com>
Subject: ? search and replace string in Perl ?
Message-Id: <6fgrn9$dtn$1@usenet45.supernews.com>
Greetings:
I have a string denoted below where I would like to replace
value="STATE CODE" with
selected value="STATE CODE" when provided with the two digit state code.
How would I code this in Perl? Thank you.
my $dropdown = q(<option value="AB">Alberta</option>
<option value="AK">Alaska</option>
<option value="AL">Alabama</option>
<option value="AR">Arkansas</option>
<option value="AZ">Arizona</option>
<option value="BC">British Columbia</option>
<option value="CA">California</option>
<option value="CO">Colorado</option>
<option value="CT">Connecticut</option>
<option value="DC">District of Columbia</option>
<option value="DE">Delaware</option>
<option value="FL">Florida</option>
<option value="GA">Georgia</option>
<option value="HI">Hawaii</option>
<option value="IA">Iowa</option>
<option value="ID">Idaho</option>
<option value="IL">Illinois</option>
<option value="IN">Indiana</option>
<option value="KS">Kansas</option>
<option value="KY">Kentucky</option>
<option value="LA">Louisiana</option>
<option value="MA">Massachusetts</option>
<option value="MB">Manitoba</option>
<option value="MD">Maryland</option>
<option value="ME">Maine</option>
<option value="MI">Michigan</option>
<option value="MN">Minnesota</option>
<option value="MO">Missouri</option>
<option value="MS">Mississippi</option>
<option value="MT">Montana</option>
<option value="NB">New Brunswick</option>
<option value="NC">North Carolina</option>
<option value="ND">North Dakota</option>
<option value="NE">Nebraska</option>
<option value="NF">Newfoundland</option>
<option value="NH">New Hampshire</option>
<option value="NJ">New Jersey</option>
<option value="NM">New Mexico</option>
<option value="NS">Nova Scotia</option>
<option value="NV">Nevada</option>
<option value="NY">New York</option>
<option value="OH">Ohio</option>
<option value="OK">Oklahoma</option>
<option value="ON">Ontario</option>
<option value="OR">Oregon</option>
<option value="PA">Pennsylvania</option>
<option value="PQ">Quebec</option>
<option value="RI">Rhode Island</option>
<option value="SC">South Carolina</option>
<option value="SD">South Dakota</option>
<option value="SK">Saskatchewan</option>
<option value="TN">Tennessee</option>
<option value="TX">Texas</option>
<option value="UT">Utah</option>
<option value="VA">Virginia</option>
<option value="VT">Vermont</option>
<option value="WA">Washington</option>
<option value="WI">Wisconsin</option>
<option value="WV">West Virginia</option>
<option value="WY">Wyoming</option>);
--
===========================================================
Peter Perchansky, Computer Consultant & Microsoft FrontPage MVP
Dynamic Net, Inc. DBA PMP Computer Solutions
Providing Dynamic Databases, Design, & Electronic Commerce Solutions
FrontPage Web Hosting at http://www.pmpcs.com/services/fpwebhosting.htm
FrontPage Support http://www.pmpcs.com/support/frontpage.htm
------------------------------
Date: 27 Mar 1998 17:55:00 GMT
From: lvirden@cas.org
Subject: Re: ARRRG! "recommended" CPAN update stopped CPAN module from working!
Message-Id: <6fgp5k$6sl$1@srv38s4u.cas.org>
According to James B. Crigler <crigler@seo.com>:
:
:That was it! Many thanks! The problem was that the Makefile generated
:by "perl Makefile.PL" needed UNINST=1 set, recommended it in the output
:of the automatic make, but didn't perform it, leaving (at least) part of
:the old version in place, making it inconsistent.
To get this done automatically you have to specify the proper response to
perl's Configure question about additional compiler flags to use. I
seem to recall that you need to make sure that, in addition to anything
else you might be using (like -DDEBUGGING) you have to specify the
-DUNINST=1 flag.
--
<URL:mailto:lvirden@cas.org> Quote: In heaven, there is no panic,
<*> O- <URL:http://www.teraform.com/%7Elvirden/> only planning.
Unless explicitly stated to the contrary, nothing in this posting
should be construed as representing my employer's opinions.
------------------------------
Date: Fri, 27 Mar 1998 10:48:56 -0600
From: James Ludlow <ludlow@us.ibm.com>
Subject: Re: Command line arguments
Message-Id: <351BD878.8B7426E1@us.ibm.com>
Tony Christian Svderudd wrote:
>
> I'm trying to do a program that modifies html-files.
> How do I pass the command line arguments to program as variables?
> F.ex. 'program tony.html' should process the tony.html and
> 'program *' should process all html-files in directory.
So you want to do something like...
perl -w program.pl [parameter1] [parameter2]
Right?
If so, you should check the documentation for the section on "@ARGV".
Command line parameters like this (not the -w though, that's for perl,
not your program) get put into an array called @ARGV. So the first
argument is in $ARGV[0], the second is in $ARGV[1]. Read up on it
though, there's a little more to it than that. Also, I believe that
there is a module available for processing more complex arguments
(Getopts if I'm not mistaken).
For instance (and untested):
#!/usr/bin/perl -w
$fooglob = (defined $ARGV[0]) ? $ARGV[0] : "default.value";
@files_to_use = glob $fooglob;
for (@files_to_use) {
.
.
.
}
--
James Ludlow (ludlow@us.ibm.com)
This isn't tech support and all opinions are my own.
------------------------------
Date: Fri, 27 Mar 1998 18:55:08 +0100
From: lassehp@imv.aau.dk (Lasse =?ISO-8859-1?Q?Hiller=F8e?= Petersen)
Subject: Re: Copy file command.
Message-Id: <lassehp-2703981855080001@ra.imv.aau.dk>
In article <6fgcjk$t4c$1@csnews.cs.colorado.edu>, tchrist@mox.perl.com
(Tom Christiansen) wrote:
>Just because there's a module to do something doesn't mean it's a good
>idea. I'm not fond of telling people to use a module rather than
>their own brain just because it exists. Just because there's a module for
>getopt processing doesn't mean I always use it. And *certainly* just
>because there's a module for file handle bits doesn't mean I use it.
That is true, and neither do I. But you didn't answer my question. Can
modules bundled with the distribution be considered "standard" or not? I
ask, because this appears to be a common impression, and I think it should
be made clear if it is not the case. If this is in a perldoc item I've
missed then please put me out of my miserable situation and tell me which
M to RTF. Whether or not we choose to _use_ a module (be it standard or
non-standard), is a different issue.
Further, if File::Copy is to be deprecated, then this leads to another
question: are there other bad modules that are distributed with
latest.tar.gz?
And, another question you didn't answer: If it is that bad as your wording
implies, why has it gone into the perl distribution in the first place?
I hope that you agree with me that not all Perl programmers can be
expected to review module code in absolute detail and identify trouble
spots. We must rely to some extent on other people's opinion about
modules. So when Larry Wall or the TPI or Chip Salzenberg packaged the
latest.tar.gz and decided that File::Copy was to be included, then I think
it is fair for us to assume that this module is more or less OK. Somebody
must have decided at one point in time that including it was the right
thing to do, that File::Copy did something useful. But now you tell us not
to use it.
>You're right. I don't care, at least, not enough to really screw up my
>coding or Perl. I'm sorry that some users have their own penance to
>pay in purgatory, but I'm not going to go to hell and back for them.
>That's what you're asking, and I tell you that it is wrong. (And you
>should upgrade to an operating system. Perhaps you might try Rhapsody.
>Some people seem to like it. :-)
When Rhapsody comes out I will upgrade as many of our machines as I can.
Unfortunately I can't upgrade all.
But my choice (or lack of choice) of OS doesn't really matter. I was
merely pointing out that the system() solution didn't work on all
platforms, which may constitute a problem for some people, including me,
when programming with MacPerl.
I'm not asking you to do anything, not to screw up your coding, not to
screw up Perl, nothing. What makes you think I am? You can code just as
you please.
>Perl is a glue language. It glues together, amongst other things,
>programs. Functions like system and exec and pipe opens and backticks
>and qx and glob and fork are put in there for a reason. They're there
>to be used, don't you know? If they weren't supposed to be used, Larry
>would not have put them there.
Yes, Perl is Unix-centric in many ways, and I don't even consider this a
fault. On Unix, when dealing with Unix matters, I am happy to use them
with great success.
But Perl is also a cross-platform programming language, used for many
other things. And for some things, a shared standard library that works
across platforms is highly desirable. I'm not trying to force you to use
it, just pointing out that it would be a good thing to have.
>It is very scary to me to see the current crusade to castrate Perl.
You seem to imply that I'm part of such a crusade.
But I don't see any evidence that there _is_ such a crusade, nor would I
be any part of it if there were. Unless you consider running Perl on
anything but Unix a "crusade to castrate Perl." You don't, I hope.
>That's not what Perl is about. Programs are meant to be re-used.
>The Unix tool-and-filter philosophy is alive and well; you ignore it at
>your own peril. Just because you live in a programmer-hostile world
>doesn't mean that you have the right to drag others down with you.
How is reusing a module called File::Copy worse than reusing /bin/cp?
Fine, there are problems with it, you tell us. Then why don't you put some
action behind your words and stop distributing it if it is so bad? Can I
assume that a Perl distribution downloaded from perl.com is stripped from
bad modules? Or are you deliberately trying to get people to use this bad
module for some reason? Of course you are not. Explain, please!
I do wonder why you use such strong language to defame File::Copy. If that
is the treatment people can expect to get for sharing code, then I wonder
why anybody would want to. Perhaps you have tried to get the authors of
File::Copy to fix the problems, and they didn't? Still I don't see how
this deserves words like "icky" and "gutter".
I also wonder how you got the impression that the Mac is programmer-hostile?
>Facilities are meant to be used. I shall continue to write my code
>using sockets and execs backticks and system and newlines and fork,
>and I shall take up a jihad against those who would denigrate their use.
>If you don't like them, don't use them, but the instant you tell others
>that they are bad Perl, I shall throw down my gauntlet before you.
Relax, please. If I have offended you in any way, please accept my
sincerest apologies, for I had no intent to do so. "Jihad" and throwing
gauntlets, really, please!
>If you want Java, you know where to find it. And it's not here.
I don't want Java, I want Perl. If I wanted Java I wouldn't be here. I
_depend_ on Perl.
-Lasse
------------------------------
Date: 27 Mar 1998 17:42:52 GMT
From: Tom Christiansen <tchrist@mox.perl.com>
Subject: Re: Copy file command.
Message-Id: <6fgoes$89f$1@csnews.cs.colorado.edu>
[courtesy cc of this posting sent to cited author via email]
In comp.lang.perl.misc,
lassehp@imv.aau.dk (Lasse =?ISO-8859-1?Q?Hiller=F8e?= Petersen) writes:
I agree with most of everything you have said, and am sorry to have
been so harsh in my tone. Yes, File::Copy should be fixed to somehow
identify which of the files proved problematic. As for system, etc,
people need to use whatever gets the job done. I would never fault a DOS
user for using backticks to call a DOS program to get system config data,
or whatnot. I only hope that he might pay me the same courtesy.
When we say that modules are the unit of software reuse, I fear that
programs get the short end of the deal.
--tom
--
Tom Christiansen tchrist@jhereg.perl.com
Fine, let them give me the endless crap. --Andrew Hume
------------------------------
Date: Fri, 27 Mar 1998 13:40:56 -0500
From: "Peter Perchansky" <fp@pmpcs.com>
Subject: Re: Going Rates for PERL Programming???
Message-Id: <6fgrul$dvn$1@usenet45.supernews.com>
Greetings John:
John Porter wrote in message <351A6290.1543@min.net>...
>That completely ignores economics. The value of what I produce
>may be the same in either case, but I should charge what I can
>to do it. That's supply and demand. If I ask 100/hr to do what
>everyone else is charging 45/hr for, I'm out. Who decides what
>the "value" is of what I produce, in $/hour?
While market forces "may" dictate the value of your time, most forces -- in
so far as Perl programming is concerned -- deal in industry averages... not
fixed figures (such as x per hour).
As long as you are within those averages, then your time can be the same
value for any task you perform as it relates to the issue at hand (Perl
programming in this case).
--
===========================================================
Peter Perchansky, Computer Consultant & Microsoft FrontPage MVP
Dynamic Net, Inc. DBA PMP Computer Solutions
Providing Dynamic Databases, Design, & Electronic Commerce Solutions
FrontPage Web Hosting at http://www.pmpcs.com/services/fpwebhosting.htm
FrontPage Support http://www.pmpcs.com/support/frontpage.htm
------------------------------
Date: Fri, 27 Mar 1998 18:12:08 GMT
From: Brian Pitsch <brianp@webpromote.com>
Subject: Install Parallel::Pvm
Message-Id: <351BEBE3.5F5EE96F@webpromote.com>
I'm having trouble installing the PVM module on a BSDI machine. I
installed it correctly on a FreeBSD machine before that. PVM is
installed ok (seems to be, anyway).
The problem I get is from the 'make test'. Here's what happens:
PERL_DL_NONLAZY=1 /usr/bin/perl5 -I./blib/arch -I./blib/lib
-I/usr/local/lib/perl5/i386-bsdos/5.00404 -I/usr/local/lib/perl5 test.pl
1..1
Can't load './blib/arch/auto/Parallel/Pvm/Pvm.o' for module
Parallel::Pvm: can't resolve undefined symbols: Inappropriate file type
or format at /usr/local/lib/perl5/i386-bsdos/5.00404/DynaLoader.pm line
166.
at test.pl line 11
BEGIN failed--compilation aborted at test.pl line 11.
not ok 1
*** Error code 79
I'm stuck.... anybody have any thoughts, please let me know!
Brian Pitsch
------------------------------
Date: Fri, 27 Mar 1998 16:57:08 GMT
From: drummj@mail.mmc.org (Jeffrey R. Drumm)
Subject: Re: installing IO module on AIX
Message-Id: <351bd7ee.159961462@news.mmc.org>
[courtesy copy emailed to the cited author]
On Fri, 27 Mar 1998 10:33:02 -0500, Rick Schofield <Richard.Schofield@fmr.com>
wrote:
>AIX 4.2 / perl 5.002
I'm at 5.004_04 . . .
>I'm trying to install the IO module IO-1.19 onto an AIX system v4.2 and
>I'm gettting the
>following errors in the "make test" phase:
(errors snipped)
>Has anyone successfully installed this module to theis or similar
>configuaration?
>
> Rick
I installed it to AIX v4.2.1 just a minute ago (was apparently running v1.15 of
IO) with absolutely no problems . . . "make test" displayed no errors.
Just curious . . . are you using IBM's C or gcc?
--
Jeffrey R. Drumm, Systems Integration Specialist
Maine Medical Center - Medical Information Systems Group
drummj@mail.mmc.org
"Broken? Hell no! Uniquely implemented!" - me
------------------------------
Date: 27 Mar 1998 18:25:00 GMT
From: smcdow@arlut.utexas.edu (Stuart McDow)
Subject: Re: Need sorting routine in Perl
Message-Id: <6fgqts$859$1@ns1.arlut.utexas.edu>
gebis@albrecht.ecn.purdue.edu (Michael J Gebis) writes:
>
> sub fast_sort {
sort { $a <=> $b } @_;
> }
--
Stuart McDow Applied Research Laboratories
smcdow@arlut.utexas.edu The University of Texas at Austin
"It is obvious that about 750,000 people ago, Austin was a wonderful City."
------------------------------
Date: Fri, 27 Mar 1998 18:26:32 GMT
From: rick@marinweb.com (Rick Freeman)
Subject: Nested quantifier in regexp problem
Message-Id: <351dea42.5636082@nntp2.ba.best.com>
Hi all,
I've run into a problem for which I can't find an answer. I fact I'm
even having trouble completely understanding what is going on.
I have a "search" text input on a cgi application that needs to split
it's terms either on whitespace or by what's enclosed in quotes, or
both. For example...
two cats
term 1 is two
term 2 is cats
"two cats"
term 1 is two cats
my "two cats"
term 1 is my
term 2 is two cats
So, after lot's of trial and error, I came up with these regexps to
extract the terms I want:
@terms = ($in =~ /(?:(?:")([^"]+)(?:"))|(\S+)/g);
@terms = grep /$_/, @terms;
That second line gets rid of the empty array values.
The problem is that the quantifiers + and * are giving me a headache
(and of course it's a resume processing application, so "C++" is one
of the first things people will try to search for).
If I add the lines...
$in =~ s/\+/\\\+/g;
$in =~ s/\*/\\\*/g;
before the regexps above, I can keep the thing from crashing with a
nested regexp error, but then it doesn't extract the term with, for
example, ++ in it.
Here is the command line code I'm using to test this:
while (<>) {
$in = $_;
$in =~ s/\+/\\\+/g;
@terms = ($in =~ /(?:(?:")([^"]+)(?:"))|(\S+)/g);
@terms = grep /$_/, @terms;
for (@terms){
print " $_\n"
}
}
It should accept the simulated text input entry and print the terms.
I'm so confused!!! I'll greatly appreciate any help.
Regards,
Rick Freeman
M a r i n W e b
Marin's Home on the World Wide Web
http://www.marinweb.com/
98 Main Street #453
Tiburon CA 94920
415-458-3201
------------------------------
Date: Fri, 27 Mar 1998 09:52:09 -0800
From: Mike Hitchcock <mike@unival.com>
Subject: Re: Odd dereferencing behavior
Message-Id: <351BE749.DEE896E6@unival.com>
Tom Grydeland wrote:
> Because a single unquoted bareword inside the braces are interpreted as
> a word, but because there is a possible ambiguity, Perl tells you
> exactly how that is interpreted:
>
> % perl -wle 'print @{shift}'
> Ambiguous use of @{shift} resolved to @shift at -e line 1.
>
> Why don't you let Perl help you? Use -w on your scripts!
You can also use "+" in front of shift:
You have to put something else inside the braces
to let Perl know that the identifier isn't a
variable name:
my @a = @{shift()}; # My preferred form.
my @a = @{+shift}; # Works, but looks weird to me.
[from the excellent Effective Perl Programming,
Joseph N. Hall with Randal L. Schwartz, page 28]
--
Mike Hitchcock
mike@unival.com
hitchcock@earthling.net
------------------------------
Date: Wed, 25 Mar 1998 10:26:52 -0500
From: "Robert Waris - Personal Account" <pcbob@raex.com>
Subject: perl 5 CGI with NT IIS3.0, this one is challenging ...
Message-Id: <6fb7fn$d6j$1@tenax.raex.com>
1st Thanks in advance for help anyone can give.
2nd Please reply to bwaris@comintertech.com .
On this location of my Intranet site I am using perl to create a revision
notice
file for my image library of engineering drawings. I run perl cgi to
manipulate
a base file and move it to the correct location on the IIS server. When the
imagesare called up, the pluggin looks for a revision file. If it finds a
file
created and put into the revision directory, it then overlays the revision
notice
on the image.
This all works 100 % with out error. Engineers can put a drawing on
revision
and remove a drawing from revision from password (NT challenge & auth.)
protected web pages.
The problem that exists is this:
In order to create the revision notice with the perl cgi scripts I have to
give the
anonymous user in IIS full read/write access to the revision directory. This
in
itself is not bad, but the pluggin allows users to change/delete the
revision
notice and save them back to the server. This is not acceptable.
Even with the NT Authentication the cgi still runs as the anonymous user.
The revision directory MUST be read only access for the anonymous user.
1. How do I tell perl to run the cgi script as Administrator or another user
that
has write access to the revision directory ?
2. How do I get the sever to know that the cgi is to be run as the
Authenticated
User and not as the anonymous user ?
Thanks Again for any help you can give !
Bob Waris
bwaris@comintertech.com
Information Systems Specialist
Commercial Intertech Corp.
------------------------------
Date: 27 Mar 1998 18:23:30 GMT
From: lvirden@cas.org
Subject: Re: Perl Libraries y2k compliance
Message-Id: <6fgqr2$8ij$2@srv38s4u.cas.org>
According to <lvirden@cas.org>:
:Frankly, it seems idiotic to me to expect the XXX users of perl to all
:go out to their CPAN source code and look to see if the libraries have
:any code that will break. Most of the XXX users have enough to do
Note that I am not referring here to anyone on _this_ newsgroup, but those
nameless, faceless 'bosses' across the world who expect their staff to each
go out and check the doggone same code.
It seems infinitely preferable for one pass to be made over the code,
documenting the places which at least use 2 digit years and, if the
case IS found where the two digit year is used WITHIN the library itself
in a manner that will result in incorrect behavior during Jan 2000, make
sure that fixes occur and are distributed.
--
<URL:mailto:lvirden@cas.org> Quote: In heaven, there is no panic,
<*> O- <URL:http://www.teraform.com/%7Elvirden/> only planning.
Unless explicitly stated to the contrary, nothing in this posting
should be construed as representing my employer's opinions.
------------------------------
Date: 27 Mar 1998 18:21:02 GMT
From: lvirden@cas.org
Subject: Re: Perl Libraries y2k compliance
Message-Id: <6fgqme$8ij$1@srv38s4u.cas.org>
According to Tom Christiansen <tchrist@mox.perl.com>:
:
:All mumbles about Year 2000 compliance are just someone looking for
:a lawsuit. So, whom are you trying to sue, or avoid being sued by,
:and why do we want to participate in your litigational trials and
:tribulations? :-)
I suspect in many cases it's folk who would like to remain employed now
as well as after the Year 2000. Believe it or not, some of us, in the
industry, are expected to discover in some fashion whether code being
used on our systems is going to continue to work on Jan 1, 2000 .
If we discover code that appears that it isn't going to work, amazingly
enough, we are expected to make corrections so that the problem doesn't
occur.
Frankly, it seems idiotic to me to expect the XXX users of perl to all
go out to their CPAN source code and look to see if the libraries have
any code that will break. Most of the XXX users have enough to do
looking at all the desk drawer as well as production scripts USING
perl and the associated libraries.
--
<URL:mailto:lvirden@cas.org> Quote: In heaven, there is no panic,
<*> O- <URL:http://www.teraform.com/%7Elvirden/> only planning.
Unless explicitly stated to the contrary, nothing in this posting
should be construed as representing my employer's opinions.
------------------------------
Date: Fri, 27 Mar 1998 12:55:12 -0500
From: Jim Michael <jim.michael@gecm.com>
Subject: Re: Problems with handling Mac/PC/Unix line breaks
Message-Id: <351BE800.5E25@gecm.com>
joshmccormack@yahoo.com wrote:
>
> Save your scripts in a program like BBEdit or Pagespinner (I think). Under
> BBedit save dialogue box choose options and change the line break option to
> whatever you need.
Better yet, ftp your files in ascii mode and your line break characters
will be translated for you automagically.
------------------------------
Date: 27 Mar 1998 10:45:05 -0700
From: Randal Schwartz <merlyn@stonehenge.com>
To: comdog@computerdog.com (brian d foy)
Subject: Re: PROPOSAL: The Perl Dictionary
Message-Id: <8c7m5g6na6.fsf@gadget.cscaper.com>
>>>>> "brian" == brian d foy <comdog@computerdog.com> writes:
brian> In article <x7btusk7tq.fsf@sysarch.com>, Uri Guttman <uri@sysarch.com> posted:
>> i have been collecting the perl definitions we have posted. would anyone
>> like to see them on perl.com and/or perl.org under the humor categories?
>>
>> i should html them and put them on my site.
brian> you should get the authors' permission as well ;)
In fact, you should write a Perl program that sends email to the
authors of all postings in this newsgroup thread asking for
permission for that commercial act.
Oops, wrong thread.
:-)
print "Just another Perl hacker," # but not what the media calls "hacker!" :-)
## legal fund: $20,990.69 collected, $186,159.85 spent; just 157 more days
## before I go to *prison* for 90 days; email fund@stonehenge.com for details
--
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: 27 Mar 1998 18:11:50 GMT
From: laird@asphodel.ecn.purdue.edu (Kyler Laird)
Subject: rant: illiterate Perl programmers
Message-Id: <6fgq56$l5c@mozo.cc.purdue.edu>
<rant>
Is there some rule that all Perl programmers are
required to screw up every piece of documentation
that they touch by using bad grammar/spelling?
It's getting sooo frustrating to read Apache Perl
module docs because of all the stupid apostrophes.
Perhaps someone should write a Perl spell check
wrapper that eliminates all apostrophes. Even
with the errors introduced, the resultant error
count would probably decrease.
I even casually mentioned this to one of the
authors, Doug MacEachern, and received the e-mail
equivalent of a glazed-over stare.
Sheesh...
(Note that Perl programmers' overuse of
apostrophes is not *quite* as annoying as MBA-
types' misuse of "myself". However, both take
more effort than using correct grammar.)
</rant>
Yes, I'm feeling a bit better now. Back to
the code...
--kyler
------------------------------
Date: Fri, 27 Mar 1998 13:57:09 -0500
From: comdog@computerdog.com (brian d foy)
Subject: Re: rant: illiterate Perl programmers
Message-Id: <comdog-ya02408000R2703981357090001@news.panix.com>
Keywords: from just another new york perl hacker
In article <6fgq56$l5c@mozo.cc.purdue.edu>, laird@asphodel.ecn.purdue.edu (Kyler Laird) posted:
>It's getting sooo frustrating to read Apache Perl
>module docs because of all the stupid apostrophes.
>Perhaps someone should write a Perl spell check
>wrapper that eliminates all apostrophes. Even
feel free to contribute to the community.
--
brian d foy <comdog@computerdog.com>
CGI Meta FAQ <URL:http://computerdog.com/CGI_MetaFAQ.html>
Comprehensive Perl Archive Network (CPAN) <URL:http://www.perl.com>
Perl Mongers <URL:http://www.pm.org>
------------------------------
Date: Fri, 27 Mar 1998 12:32:19 -0500
From: benton <benton@panix.com>
Subject: request HELP setting ISAPI Perl's @INC array
Message-Id: <351BE2A3.40F99A81@panix.com>
Hello, all.
I am trying to load some libraries into the Win32 ActiveState ISAPI Perl
(build 315). Specifically, I'm trying to
write a script that retrieves a webpage, via the HTTP::request module.
The Difficulty is getting ISAPI Perl to load the correct @INC array.
When the Perl script is called from Internet
Information Server 4, with ".pl" files mapped to "Perlis.dll", any
commands of the form
use HTTP::request ;
results in the empty, "placeholder" document being returned by the
server, because the script crashes at this line
(it can't find the module). Running the script from the command-line,
WHILE IN THE "C:\program files\perl\bin"
DIRECTORY, instead of through the web server seems to load the library
OK.
This appears to be because the @INC path is set to ("..\lib",
"..\lib\i386-win32", ".")
When the script is called from IIS4, the "." is interpreted as the
script directory, not the perlis.dll directory,
so the @INC path is not correct. I have verified this by copying one of
the library files into the script directory, and it loads OK. I have
tried to include the line
use lib "C:\progra~1\perl\lib";
in my script, but of course it can't find the "lib" library either!
The only way I have tricked the ActiveState Perl into using the correct
include path is to map all .pl scripts to
the following command line (instead of mapping to perlis.dll):
C:\Progra~1\Perl\bin\Perl.exe -I C:\Progra~1\perl\lib %s %s
This forces the web browser to use C:\Progra~1\perl\lib in its include
path, but sacrifices the performance benefits
of using the load-once Perlis DLL.
So here's the question: does anyone know how to force Perlis.dll to use
the correct include path?
Please reply vial email -- mailto:benton@panix.com
- benton
--
Benton Roberts
--------------
benton@panix.com
http://iml.dartmouth.edu/~benton
------------------------------
Date: 27 Mar 1998 17:47:11 GMT
From: Howard Cohen <hoco@shell5.ba.best.com>
Subject: Re: trivial example reveals a taint problem?
Message-Id: <6fgomv$8d8$1@nntp1.ba.best.com>
Tom Christiansen <tchrist@mox.perl.com> wrote:
: [courtesy cc of this posting sent to cited author via email]
: In comp.lang.perl.misc,
: Bekman Stanislav <sbekman@iil.intel.com> writes:
: :But why do you need $ENV{PATH}="/bin"; if you call your hostname with
: :full path?
: I explain why in the fine perlsec manpage, just where you would expect to
: find such an answer.
Yes, that's clear.
But you didn't comment at all on why the trivial example isn't working.
It appears that either 5.004 taint checks for $PATH are broken on Linux
or there is something else up. The only other thing that can affect the
taintedness of $PATH (according to perlsec) is that the directories in the
path cannot be writable by the world. In this case /bin was writable only
by user -- and the owner was root. So that can't be the issue.
So what is up?
Can anyone explain what $ENV{ENV} is?
Are there any options this ISP may have configured when compiling perl
that would affect this?
I would love to hear from anyone who has any ideas how to work around this
absolute brick wall of a problem.
Peace,
Howard Cohen
hoco@timefold.com
------------------------------
Date: 27 Mar 1998 18:27:47 GMT
From: Howard Cohen <hoco@shell5.ba.best.com>
Subject: Re: trivial example reveals a taint problem?
Message-Id: <6fgr33$8d8$2@nntp1.ba.best.com>
Howard Cohen <hoco@shell5.ba.best.com> wrote:
: This is a problem for the experts who may follow this newsgroup.
: I am working with:
: perl, version 5.004_04 built for i586-linux
: And this trivial example script fails!
: #!/usr/local/bin/perl -T
: $ENV{PATH}="/bin";
: $host=`/bin/hostname`;
: print "host=$host\n";
: I get this error message:
: Insecure $ENV{ENV} while running with -T switch at testit line 4.
Well, it turns out that there was an environment variable called ENV and
that it is used by bash to store the pathname of its .bashrc file. So
any sub process which required a shell apparently was using bash for that
shell and perl must have realized that the .bashrc was an opportunity for
foul play and ensured that $ENV{ENV} was secure! Whew!
This is certainly a powerful attempt at security and my hat is off to
whoever decided to implement this special protection for $ENV{ENV}.
I think this qualifies for addition in the next revision of perlsec and
Programming Perl, but that's just my opinion.
Peace,
Howard Cohen
hoco@timefold.com
------------------------------
Date: Fri, 27 Mar 1998 17:10:55 GMT
From: drummj@mail.mmc.org (Jeffrey R. Drumm)
Subject: Re: using ftp.pl as included in perl 5.002
Message-Id: <351cdab2.160669270@news.mmc.org>
[courtesy copy emailed to the cited author]
On Fri, 27 Mar 1998 10:48:40 -0500, Rick Schofield <Richard.Schofield@fmr.com>
wrote:
>I'm having some trouble using the bundled ftp piece under perl 5.002 on
>an AIX 4.2 box.
>First off, the require of socket.ph failed and I had to comment it out
>and replace it with
Ouch. Please fix your news reader's broken word wrapping.
>a require of Socket.pm. This seemed to work and I could then run the
Did you run h2ph? You need to, if you want a socket.ph; Socket.pm doesn't do
the same thing . . .
>attached checkout
>program up to, but not including, the actual "get". At that point, the
>script returned with a
>0 code from an ftp'expect call (that's right, the bundled ftp.pl is in
>perl 4).
>
>Has anyone been able to use this module recently. I gather most folks
>are using the FTP
>stuff in libnet, and I'm working to get that installed in parallel with
>this, but I'd also like to
>find a way of getting the bundled ftp.pl to work too. Any ideas?
>
> Rick
If the above doesn't work, I'd recommend spending the effort to get 5.004_04
installed. Actually, I strongly recommend that anyway. 5.002 is pretty old.
And you'll LOVE the Net::FTP module . . . it's now in the core distribution.
--
Jeffrey R. Drumm, Systems Integration Specialist
Maine Medical Center - Medical Information Systems Group
drummj@mail.mmc.org
"Broken? Hell no! Uniquely implemented!" - me
------------------------------
Date: Fri, 27 Mar 1998 11:14:46 -0600
From: Jeff Jarr <jeffjarrnospam@enteract.com>
Subject: Would like to hire purchase a perl script
Message-Id: <351BDE86.E241DD9D@enteract.com>
Hello :
I would like to hire a programmer to creat a perl script for a web
page
Here are the requirements of the script
1. There will be a database of approx 100 urls.
2. When the advertized url is accessed the script will send the client
to the next url in sequence (from the database)
3 This may require file locking to prevent multiple reads on the script
(?)
4. Also there will be a e-mail address and a form to be sent out to the
enquiring party when requested.
5. This form will also be sent to the next url in sequence.
I believe this is all that needs to be done.
Nothing too complicated please e-mail me with your address and phone
number so I can get in touch with you. and discuss costs
Jeff Jarr
------------------------------
Date: Fri, 27 Mar 1998 13:00:11 -0500
From: comdog@computerdog.com (brian d foy)
Subject: Re: Would like to hire purchase a perl script
Message-Id: <comdog-ya02408000R2703981300110001@news.panix.com>
Keywords: from just another new york perl hacker
In article <351BDE86.E241DD9D@enteract.com>, jeffjarr@enteract.com posted:
>3 This may require file locking to prevent multiple reads on the script
>(?)
why would multiple reads be a problem? don't you want people to use
it a lot?
--
brian d foy <comdog@computerdog.com>
CGI Meta FAQ <URL:http://computerdog.com/CGI_MetaFAQ.html>
Comprehensive Perl Archive Network (CPAN) <URL:http://www.perl.com>
Perl Mongers <URL:http://www.pm.org>
------------------------------
Date: 8 Mar 97 21:33:47 GMT (Last modified)
From: Perl-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin)
Subject: Digest Administrivia (Last modified: 8 Mar 97)
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.
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 2195
**************************************