[9050] in Perl-Users-Digest
Perl-Users Digest, Issue: 2668 Volume: 8
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Thu May 21 17:13:31 1998
Date: Thu, 21 May 98 14:03:30 -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, 21 May 1998 Volume: 8 Number: 2668
Today's topics:
LABOR CRISIS: Perl SW Guru NEEDED MA Intranet Start-up scott@softbase.com
Re: LABOR CRISIS: Perl SW Guru NEEDED MA Intranet Start <merlyn@stonehenge.com>
Re: matching problem <lr@hpl.hp.com>
Re: matching problem (Mike Stok)
Re: More double standards out of the FSF (Greg Bacon)
Re: More double standards out of the FSF <tchrist@mox.perl.com>
Re: More double standards out of the FSF <tchrist@mox.perl.com>
Re: More double standards out of the FSF <hp@pobox.com>
Re: More double standards out of the FSF <hp@pobox.com>
Re: Non-greedy regexp still eatting all the pies! <rootbeer@teleport.com>
Perl 6 (KevinCohen)
Re: Perl terminology (KevinCohen)
Re: Problems with Sys::Syslog <paul.joslin@sdrc.com>
Randon files in Perl 5? <svetter@ameritech.net>
Re: Randon files in Perl 5? (Belg4mit)
Re: Randon files in Perl 5? <rootbeer@teleport.com>
Re: regexp for strings of chars (Gurusamy Sarathy)
Re: samba log files <rootbeer@teleport.com>
scope of variables in Perl under Linux <nmx@ResourceInternational.com>
Security? <svetter@ameritech.net>
Re: Software vendor liability [Was: Does Perl have a ID (Ken Fox)
Re: Suggestion Re: GNU attacks on the open software com (Michael J Gebis)
Re: Suggestion Re: GNU attacks on the open software com (Ilya Zakharevich)
swrite formline example in Camel ? <prl2@lehigh.edu>
Re: swrite formline example in Camel ? <prl2@lehigh.edu>
Re: Text File Manipulatoin <ahdiii@webspan.net>
Re: Text File Manipulatoin <ahdiii@webspan.net>
Re: Text File Manipulatoin (John)
Tom Christiansen seeing double <abraham@dina.kvl.dk>
Re: usage of perl in NT. ($ENV{'PREVIOUS_URL'} <JKRY3025@comenius.ms.mff.cuni.cz>
Re: Where is (or is there) perlpod for Win32? (Belg4mit)
Re: Why NOT crypt??? (Stuart McDow)
Re: Why NOT crypt??? chris+usenet@netmonger.net
Re: writing image from http request to file <playinmantis@earthlink.net>
Digest Administrivia (Last modified: 8 Mar 97) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: 21 May 1998 18:29:35 GMT
From: scott@softbase.com
Subject: LABOR CRISIS: Perl SW Guru NEEDED MA Intranet Start-up 80K+>+Equity
Message-Id: <6k1rqf$9k4$1@mainsrv.main.nc.us>
You wanna know why there's a so-called "labor crisis"?! Here it is:
> Required Skills/Experience:
> Qualified candidates will have following skills:
> - 5+ years of Perl experience including
> - Significant experience with CGI scripts and DBMS access
> - Experience delivering multiple releases of a Perl based product
> - Experience with object oriented Perl
> - 2 years developing for the Web, including HTML and CGI development
> - Experience with C++
5 years experience or MORE? With Perl? Has CGI even existed 5 years? I
know significant DBMS support for Perl hasn't. OO Perl has only been
around about a year. All that *AND* experience with C++? (And
*why*? If this is written in Perl, who cares?)
*AND* they want you to:
> ... live in the MA/NH area
Holy smokes! This ad is so specific and detailed what are the odds
it will ever be filled? The "labor crisis" is a big hoax.
PS: Anyone with 5+ years experience with Perl would be a senior
systems administrator somewhere by now, not looking to hook
on with some fly-by-night startup!
Scott
--
Look at Softbase Systems' client/server tools, www.softbase.com
Check out the Essential 97 package for Windows 95 www.skwc.com/essent
All my other cool web pages are available from that site too!
My demo tape, artwork, poetry, The Windows 95 Book FAQ, and more.
------------------------------
Date: Thu, 21 May 1998 20:40:28 GMT
From: Randal Schwartz <merlyn@stonehenge.com>
To: scott@softbase.com
Subject: Re: LABOR CRISIS: Perl SW Guru NEEDED MA Intranet Start-up 80K+>+Equity
Message-Id: <8c90nvnyrq.fsf@gadget.cscaper.com>
>>>>> "scott" == scott <scott@softbase.com> writes:
scott> 5 years experience or MORE? With Perl? Has CGI even existed 5 years?
Heh. Boy, are you gonna be embarassed when you really re-read what
you posted again.
There are tens of thousands of people that have 5 or more years of
Perl experience. Many of them are probably using Perl to this day on
projects that won't even come anywhere *near* the web.
Perl is MUCH larger than the web, and much older as well.
In fact, I'd argue that most of the Web couldn't have sprang up as
fast as it did if Perl hadn't *already* been deployed out there, with
tens of thousands of Unix hackers already playing with Perl.
print "Just another Perl hacker," # but not what the media calls "hacker!" :-)
## legal fund: $20,990.69 collected, $186,159.85 spent; just 102 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: Thu, 21 May 1998 12:16:56 -0700
From: "Larry Rosler" <lr@hpl.hp.com>
Subject: Re: matching problem
Message-Id: <6k1ujc$i1k@hplntx.hpl.hp.com>
[posted and emailed]
Belg4mit wrote in message
<1998052118541400.OAA12338@ladder03.news.aol.com>...
>I've tried everything I can think of, and re-read perlre, so here goes.
>Given two possible inputs:
> mailto:bob@aol.com mailto:bob@aol.com?subject=test
>
>I want to strip both down to just bob@aol.com.
>It seeems like this should work:
> $loc =~ s/mailto:(.+?)(\?.+)?/$1/i;
>or this
> $loc =~ s/mailto:(.+?)(\?.+)*/$1/i;
>but they only match the first case.
>So far I've had to kluge it by doing:
> $loc =~ s/mailto:(.+?)/$1/i;
> $loc =~ s/\?.+//;
>But I'd rather not. Any ideas?
>
>
>Mail replies to belg4mit@mit.edu preferred, thanks!
$loc =~ s/mailto:([^?]+).*/$1/i;
--
Larry Rosler
Hewlett-Packard Laboratories
lr@hpl.hp.com
------------------------------
Date: 21 May 1998 19:21:00 GMT
From: mike@stok.co.uk (Mike Stok)
Subject: Re: matching problem
Message-Id: <6k1uqs$re9@news-central.tiac.net>
In article <1998052118541400.OAA12338@ladder03.news.aol.com>,
Belg4mit <belg4mit@aol.com> wrote:
>I've tried everything I can think of, and re-read perlre, so here goes.
>Given two possible inputs:
> mailto:bob@aol.com mailto:bob@aol.com?subject=test
>
>I want to strip both down to just bob@aol.com.
>It seeems like this should work:
> $loc =~ s/mailto:(.+?)(\?.+)?/$1/i;
>or this
> $loc =~ s/mailto:(.+?)(\?.+)*/$1/i;
>but they only match the first case.
>So far I've had to kluge it by doing:
> $loc =~ s/mailto:(.+?)/$1/i;
> $loc =~ s/\?.+//;
>But I'd rather not. Any ideas?
http://www.ics.uci.edu/pub/ietf/uri/draft-fielding-uri-syntax-01.txt
suggests
^(([^:/?#]+):)?(//([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?
as a regex to try,
DB<12> @f = 'mailto:bob@aol.com' =~ m{^(([^:/?#]+):)?(//([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?}
DB<13> X f
@f = (
0 'mailto:'
1 'mailto'
2 undef
3 undef
4 'bob@aol.com'
5 undef
6 undef
7 undef
8 undef
)
DB<14> @f = 'mailto:bob@aol.com?subject=test' =~ m{^(([^:/?#]+):)?(//([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?}
DB<15> X f
@f = (
0 'mailto:'
1 'mailto'
2 undef
3 undef
4 'bob@aol.com'
5 '?subject=test'
6 'subject=test'
7 undef
8 undef
)
(I must confess I tried the URI::URL module first and looked at the
netloc, but it seemed to include the query in the netloc. The same
reference contains:
4.3. URI Syntactic Components
The URI syntax is dependent upon the scheme. Some schemes use
reserved characters like "?" and ";" to indicate special components,
while others just consider them to be part of the path. However,
most URI schemes use a common sequence of four main components:
<scheme>://<site><path>?<query>
each of which, except <scheme>, may be absent from a particular URI.
For example, some URI schemes do not allow a <site> component, and
others do not use a <query> component.
but I didn't check whether queries are legal for mailto: links. That
means that teh regex may appear to give the right result, but the URI::URL
module could be "right")
Hope this helps,
Mike
--
mike@stok.co.uk | The "`Stok' disclaimers" apply.
http://www.stok.co.uk/~mike/ | PGP fingerprint FE 56 4D 7D 42 1A 4A 9C
http://www.tiac.net/users/stok/ | 65 F3 3F 1D 27 22 B7 41
stok@colltech.com | Collective Technologies (work)
------------------------------
Date: 21 May 1998 19:54:10 GMT
From: gbacon@cs.uah.edu (Greg Bacon)
Subject: Re: More double standards out of the FSF
Message-Id: <6k20p2$rdm$5@info.uah.edu>
In article <9xopvh7cy1v.fsf@bcarsf26.dpn>,
Stephane Boucher <sbo@nortel.ca_NO_SPAM> writes:
: So, could you please tell me what licence I should
: use. Note that I want to share only with people who will share with
: me.
If someone gives me a gift, I want it to be given out of generosity, not
because I'm holding a gun to their head or they feel otherwise compelled.
Greg
--
open(G,"|gzip -dc");$_=<<EOF;s/[0-9a-f]+/print G pack("h*",$&)/eg
f1b88000b620f22320303fa2d2e21584ccbcf29c84d2258084
d2ac158c84c4ece4d22d1000118a8d5491000000
EOF
------------------------------
Date: 21 May 1998 20:02:58 GMT
From: Tom Christiansen <tchrist@mox.perl.com>
Subject: Re: More double standards out of the FSF
Message-Id: <6k219i$aie$1@csnews.cs.colorado.edu>
[courtesy cc of this posting sent to cited author via email]
In comp.lang.perl.misc, Ken MacLeod <ken@bitsko.slc.ut.us> writes:
:Maybe it will need to be
:clarified if _any_ of the documentation can be modified to reflect
:changes in the modified code.
You cannot "modify" Perl in some way to make it not work like the standard
release and still call it by that name.
--tom
--
"If you substitute other kinds of intellectual property into the GNU
manifesto, it quickly becomes absurd." --Cal Keegan
------------------------------
Date: 21 May 1998 20:05:42 GMT
From: Tom Christiansen <tchrist@mox.perl.com>
Subject: Re: More double standards out of the FSF
Message-Id: <6k21em$aie$2@csnews.cs.colorado.edu>
[courtesy cc of this posting sent to cited author via email]
In comp.lang.perl.misc, robert havoc pennington <hp@pobox.com> writes:
:That's an opinion piece, not program documentation.
Read perltoot. There's a lot of opinion there, too.
:Everyone is going to buy the O'Reilly books
:anyway just because they are the best for the forseeable future. I
:spent $70 on two last night.
I'm sorry you have misunderstood. This is not about books. This is
about the complete and full Perl documentation, free with every
Perl distribution -- all 1,000 pages of it. I guess that's a free
book if you want to call it a book.
--tom
--
"If you substitute other kinds of intellectual property into the GNU
manifesto, it quickly becomes absurd." --Cal Keegan
------------------------------
Date: Thu, 21 May 1998 20:10:21 GMT
From: robert havoc pennington <hp@pobox.com>
Subject: Re: More double standards out of the FSF
Message-Id: <wsnsom38jwy.fsf@harper.uchicago.edu>
gbacon@cs.uah.edu (Greg Bacon) writes:
>
> If someone gives me a gift, I want it to be given out of generosity, not
> because I'm holding a gun to their head or they feel otherwise compelled.
>
Perhaps GPL code is meant to be a public good, not a gift.
But this "gun to the head" phrase is a little melodramatic, don't you
think? It's software, not food and air. You don't even have to use
it. You can use the license of your choice on your own code.
Bottom line: GPL isn't making anyone do anything unless you choose to
use GPL software. Then you have to abide by the license - same as you
do with any copyrighted software, including proprietary software.
Advocating only public domain software on the grounds that all
copyrights impose restrictions is at least coherent. Opposing the GPL
on the grounds that you don't like those particular restrictions is
kind of lame, and makes me at least suspect ulterior motives like
using GPL code in proprietary products.
Havoc Pennington ==== http://pobox.com/~hp
------------------------------
Date: Thu, 21 May 1998 20:28:17 GMT
From: robert havoc pennington <hp@pobox.com>
Subject: Re: More double standards out of the FSF
Message-Id: <wsnpvh78j32.fsf@harper.uchicago.edu>
Tom Christiansen <tchrist@mox.perl.com> writes:
>
> In comp.lang.perl.misc, robert havoc pennington <hp@pobox.com> writes:
> :That's an opinion piece, not program documentation.
>
> Read perltoot. There's a lot of opinion there, too.
>
Sure. OK, let's assume that perltoot is a piece of artistic prose. RMS
sees a need for utilitarian, modifiable perl documentation, which he
would see as distinct from opinion writing. Let him write this
documentation and put his desire for it on his task list. How does
that hurt you? It's not like it will ever get done
anyway. Replicating 1000 pages is a huge task, and by the time it was
done it would all be outdated.
> I'm sorry you have misunderstood. This is not about books. This is
> about the complete and full Perl documentation, free with every
> Perl distribution -- all 1,000 pages of it. I guess that's a free
> book if you want to call it a book.
>
I only mention the books because the first wave of your flames were
all about how people have stolen your work, put it in their own books,
etc.
If your documentation is really distributable in all cases that Perl
itself is distributable - and I think Perl is optionally available
under the GPL, isn't it - then you should include a clarifying phrase
to that effect in your license.
This is a simple matter of clarifying your license, or contacting
those who are producing docless perl dists. There is no need for all
your melodrama about Evil and whatever. To borrow a phrase from junior
high: take a chill pill. Or a vacation. Or have a drink. Whatever you
need to do.
Havoc Pennington ==== http://pobox.com/~hp
------------------------------
Date: Thu, 21 May 1998 20:20:22 GMT
From: Tom Phoenix <rootbeer@teleport.com>
To: Glenn Morgan <gmorgan@photographics.co.uk>
Subject: Re: Non-greedy regexp still eatting all the pies!
Message-Id: <Pine.GSO.3.96.980521130833.16724J-100000@user2.teleport.com>
On Thu, 21 May 1998, Glenn Morgan wrote:
> I thought that if I anchored the match to the end of a line then the
> non-greedy match would do the trick, but it was still eatting more pies than
> I initially hoped it would.
Is this the problem?
$_ = 'you are matching more, and you want to match less';
print "$1\n" if /(you.*?$)/;
Is this the solution?
$_ = 'you are matching more, and you want to match less';
print "$1\n" if /.*(you.*$)/;
A Perl pattern always matches the first place that it finds, but you can
use greediness to your advantage. I should recommend the excellent Hip
Owls book here, but that gets plugged too often. :-) Hope this helps!
--
Tom Phoenix Perl Training and Hacking Esperanto
Randal Schwartz Case: http://www.rahul.net/jeffrey/ovs/
------------------------------
Date: 21 May 1998 19:17:55 GMT
From: kevincohen@aol.com (KevinCohen)
Subject: Perl 6
Message-Id: <1998052119175500.PAA14473@ladder03.news.aol.com>
it's been said (by paul hoffman) that "the changes [from perl 4 to perl 5] make
it so that there will probably never be a perl 6."
true??? or is creating perl 6 what larry wall is up to all day at o'reilly?
kevin
------------------------------
Date: 21 May 1998 19:03:59 GMT
From: kevincohen@aol.com (KevinCohen)
Subject: Re: Perl terminology
Message-Id: <1998052119035900.PAA17451@ladder01.news.aol.com>
Hi, Liznet---
>Is there a book that starts at the _very_ beginning? (I have the >camel and
>llama and a bunch of others, but they all assume the reader is >already a
>programmer) Maybe I need a beginning programming book? >Any suggestions?
for a very beginner, i recommend reading the llama book side-by-side with "Perl
5 for dummies", by paul hoffman. $30 bucks, and a bargain at twice the price.
the llama will help you understand perl, and "perl 5 for dummies" will help you
use it.
later, you'll find "Perl: the programmer's companion", by nigel chapman,
helpful in understanding perl, and, indeed, in understanding programming.
kevin
------------------------------
Date: 21 May 1998 15:36:33 -0400
From: Paul Joslin <paul.joslin@sdrc.com>
Subject: Re: Problems with Sys::Syslog
Message-Id: <y4dogwrmn5q.fsf@hppop.sdrc.com>
On 20 May 98 17:43:59 GMT, "Murray Williams" <william2@wdni.com> said:
Murray> Hello, I have Perl 5.004 and am using the Sys::Syslog module in a
Murray> program on an HP G30 and an HP 725. When I run the program I get an
Murray> error:
Murray> Constant subroutine _INCLUDE_AES_SOURCE redefined at (eval 17) line 1.
Did the make install go cleanly? I'm running Sys::Syslog under HP-UX 10.20,
perl 5.004_04 and do not have a problem.
Test program:
#!/opt/perl5/bin/perl
use Sys::Syslog;
my $ident = "Sys::SyslogTest";
$logopt = "pid";
$facility = "LOG_LOCAL0";
openlog $ident, $logopt, $facility;
$priority = "info";
$format = "Just testing!";
syslog $priority, $format;
#$oldmask = setlogmask $mask_priority;
closelog;
Results:
May 21 15:33:43 host.domain.com Sys::SyslogTest[11815]: Just testing!
Regards,
--
Paul R. Joslin paul.joslin@sdrc.com +1 513 576 2012
It makes me mad when I go to all the trouble of having Marta cook up
about a hundred drumsticks, then the guy at Marineland says, "You
can't throw that chicken to the dolphins. They eat fish." Sure they
eat fish, if that's all you give them! Man, wise up.
-- Jack Handey
------------------------------
Date: Thu, 21 May 1998 15:23:27 -0400
From: Scott Vetter <svetter@ameritech.net>
Subject: Randon files in Perl 5?
Message-Id: <35647F2F.66E@ameritech.net>
Is it possible to have random files that can be read and written to
by a Perl 5 programs?
------------------------------
Date: 21 May 1998 19:46:01 GMT
From: belg4mit@aol.com (Belg4mit)
Subject: Re: Randon files in Perl 5?
Message-Id: <1998052119460100.PAA17004@ladder03.news.aol.com>
what do you mean "random files"?
like randomize the lines in a file?
generate a file with random crap in it?
if it's the first, I have one at:
http://www.mit.edu/~belg4mit/software/bin/rndline
but be careful, it can hang on small files...
I use it on a 15 line file, and have never had this problem
------------------------------
Date: Thu, 21 May 1998 20:46:55 GMT
From: Tom Phoenix <rootbeer@teleport.com>
To: Scott Vetter <svetter@ameritech.net>
Subject: Re: Randon files in Perl 5?
Message-Id: <Pine.GSO.3.96.980521134640.16724M-100000@user2.teleport.com>
On Thu, 21 May 1998, Scott Vetter wrote:
> Is it possible to have random files that can be read and written to
> by a Perl 5 programs?
Yes.
--
Tom Phoenix Perl Training and Hacking Esperanto
Randal Schwartz Case: http://www.rahul.net/jeffrey/ovs/
------------------------------
Date: 21 May 1998 19:34:09 GMT
From: gsar@engin.umich.edu (Gurusamy Sarathy)
Subject: Re: regexp for strings of chars
Message-Id: <6k1vjh$neo@srvr1.engin.umich.edu>
[ mailed and posted ]
In article <6k0kbf$d8o$1@mathserv.mps.ohio-state.edu>,
Ilya Zakharevich <ilya@math.ohio-state.edu> wrote:
>On the other hand, the current atmosphere on p5p does not support
>hacking any more,
Could you be more specific about the reasoning behind that claim?
Maybe things will improve if two of us understand the problem...
> so maybe I will just leave the perl RE engine in the
>current pitiful state...
That would be sad. I'm sure not many people can grok the RE code as
you do.
- Sarathy.
gsar@umich.edu
------------------------------
Date: Thu, 21 May 1998 20:07:51 GMT
From: Tom Phoenix <rootbeer@teleport.com>
To: Darren Nguyen <darren2@jps.net>
Subject: Re: samba log files
Message-Id: <Pine.GSO.3.96.980521130419.16724I-100000@user2.teleport.com>
On Thu, 21 May 1998, Darren Nguyen wrote:
> So how do I calculate two numbers on two different lines and reference
> that to only that service or user.
If I've understood you, I think you could do what you want by making a
hash whose keys are formed from the information which will be the same on
the two lines, perhaps something like this.
$start_time{"$user on $service_name"} = $start_time;
Potentially you could make a hash of (references to) hashes as well,
although that might not be worth the effort. Hope this helps!
--
Tom Phoenix Perl Training and Hacking Esperanto
Randal Schwartz Case: http://www.rahul.net/jeffrey/ovs/
------------------------------
Date: 21 May 1998 19:51:33 GMT
From: "Nathan Morse" <nmx@ResourceInternational.com>
Subject: scope of variables in Perl under Linux
Message-Id: <01bd84f2$78c6abc0$01ceefcf@stay-puft>
I have been wending my way through the beginning of Learning Perl, and have
been typing in the examples with some negligible personal modifications.
In the example that starts on p17 (in the 2nd edition, at least ;^), Moving
the Secret Word List into a Separate File, there is a fine demonstration of
creating a [by default] global variable within a subroutine. Since I'd
been using the Win32 Perl that can't do file globs, I decided to transfer
my programs/scripts to a Linux machine. Having cleaned up all the carriage
returns, I went merrily to testing the Perl to be sure everything behaved
well, and to try out proper glob behavior. Since this init_words() sub
comes to have a globbing while loop in it on p22 (Many Secret Word Files in
the Current Directory), it was one of my first choices. The only secret
word it was content to accept for _any_ given name was the default one
("groucho" in their example). After a bit of hunting and debugging, I
realized that the problem was that @words was empty/undefined outside of
init_words(), where it is created, but not via my(). :^( That machine is
using Perl 5.003, but I didn't see anything in the 5.004 revision history
that indicated a problem with that. What am I missing? Thanks!!
--
When life hands you lemons, start a used car dealership.
------------------------------
Date: Thu, 21 May 1998 15:28:49 -0400
From: Scott Vetter <svetter@ameritech.net>
Subject: Security?
Message-Id: <35648071.6617@ameritech.net>
Just was wondering if a web host runs a Perl program, I take it the
web host handles the security and not Perl?
------------------------------
Date: 21 May 1998 19:47:54 GMT
From: kfox@pt0204.pto.ford.com (Ken Fox)
Subject: Re: Software vendor liability [Was: Does Perl have a IDE?]
Message-Id: <6k20da$el37@eccws1.dearborn.ford.com>
davet@angel.uunet.ca (Dave Till) writes:
> The problem is that software, by its very nature, has zero
> tolerance for error. This isn't true in other disciplines.
This is only part of the story. Software can be made more fault
tolerant if the developer chooses to do so. The emphasis is almost
always on features or performance though. The one very different
thing between cars and software is that every piece of software
shipped is a *perfect duplicate* of the *actual design*. There are
no manufacturing errors, only design errors.
If Ford every invents the ability to manufacture perfect copies
of our original designs, I'm sure we'll let you know. ;)
> When you build a car, you don't have to perform each
> assembly operation perfectly - just well enough to have
> it work. (If a door is a millimeter or two off, it will
> still close.) An equivalent error in software makes it
> non-operational.
Why do you think that? I've seen lot's of "off by one pixel"
errors that still let the software function. Fault tolerant
software can be written. In fact, Ford has to write fault
tolerant software to go into our cars. There's a worst case
scenario called "limp home mode" which will at least allow the
car to be driven to service.
- Ken
--
Ken Fox (kfox@ford.com) | My opinions or statements do
| not represent those of, nor are
Ford Motor Company, Powertrain | endorsed by, Ford Motor Company.
Analytical Powertrain Methods Department |
Software Development Section | "Is this some sort of trick
| question or what?" -- Calvin
------------------------------
Date: 21 May 1998 19:38:09 GMT
From: gebis@albrecht.ecn.purdue.edu (Michael J Gebis)
Subject: Re: Suggestion Re: GNU attacks on the open software community
Message-Id: <6k1vr1$rc0@mozo.cc.purdue.edu>
Jason Larke <jlarke@anthem.aa.ans.net> writes:
}I think you're right about why Tom is upset.
}But instead of trying to get him to rewrite his license, I think
}it would be nice if the FSF changed their statement to read
}something like:
Why should the FSF type one keystroke to pander to someone who is too
lazy to read their definition of "free"?
--
Mike Gebis gebis@ecn.purdue.edu mgebis@eternal.net
------------------------------
Date: 21 May 1998 20:03:31 GMT
From: ilya@math.ohio-state.edu (Ilya Zakharevich)
Subject: Re: Suggestion Re: GNU attacks on the open software community
Message-Id: <6k21aj$ql3$1@mathserv.mps.ohio-state.edu>
[A complimentary Cc of this posting was sent to Jason Larke
<jlarke@anthem.aa.ans.net>],
who wrote in article <vathg2j4fq3.fsf_-_@anthem.aa.ans.net>:
> "While excellent documentation for Perl is available without
> charge, this documentation is covered by a non-GPL license. GPL'd
> documentation would be desirable."
>
> Which, IMHO, describes the situation better.
>
> I understand that to the FSF, "free" has a precise meaning, but
> to those who are new to the free software community, that meaning
> may not be clear.
And for many of those members for which the meaning *is clear*, the
meaning is disgusting. :-( But we have beaten it to death already...
Ilya
------------------------------
Date: Thu, 21 May 1998 15:27:57 -0400
From: "Phil R Lawrence" <prl2@lehigh.edu>
Subject: swrite formline example in Camel ?
Message-Id: <6k1v7t$1moc@fidoii.cc.Lehigh.EDU>
OK, I think I understand the formline syntax because it looks the same as here
document syntax:
______________________________________
formline(<<'END', $var1, $var2);
VARONE: @<<<<< VARTWO: @<<<<<
END
print $^A;
______________________________________
What I don't get is the swrite example on pp. 127 of the Blue Camel.
_______________________________________
sub swrite {
my $terminator = shift;
$^A = '';
formline($terminator,@_);
print "\$^A is now:\n$^A.\n"; #FOR CLARIFICATION
return $^A;
}
my $term = '199840';
my $admit_codes = 'IN, NA, ED, DA';
my $dec_before_date = '04-MAY-1998';
my $exclude_codes = 'SW, CW, SH, MW, NW, TW';
my $string = swrite(<<'END', $term, $admit_codes, $dec_before_date,
$exclude_codes);
Selected Term: @<<<<<<< Admit Codes: @<<<<<<<<<<<<<<<<<<<<<<<<
Decision before: @<<<<<<<<<< Exclude Codes: @<<<<<<<<<<<<<<<<<<<<<<<<
END
print $string;
_______________________________________
The above returns:
_______________________________________
$^A is now:
Selected Term: 199840 Admit Codes: IN, NA, ED, DA
Decision before: 04-MAY-1998 Exclude Codes: SW, CW, SH, MW, NW, TW
.
Selected Term: 199840 Admit Codes: IN, NA, ED, DA
Decision before: 04-MAY-1998 Exclude Codes: SW, CW, SH, MW, NW, TW
________________________________________
I don't get it! All I passed to swrite was the terminator and values:
swrite(<<'END', $term, $admit_codes, $dec_before_date, $exclude_codes);
I *did not* send the 'format' info to the sub. So how did the sub manage to
interpolate the variables with the format I never sent it?
--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Phil R Lawrence phone: 610-758-3051
Programmer / Analyst e-mail: prl2@lehigh.edu
194 Lehigh University Computing Center
E.W. Fairchild - Martindale, Bldg. 8B
Bethlehem, PA 18018
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
------------------------------
Date: Thu, 21 May 1998 15:43:26 -0400
From: "Phil R Lawrence" <prl2@lehigh.edu>
Subject: Re: swrite formline example in Camel ?
Message-Id: <6k204u$21uq@fidoii.cc.Lehigh.EDU>
Someone here showed me the error of my ways:
________________________________________________________________
<SNIP!>
my $string = swrite(<<'END',$var1,$var2,$var3,$var4);
Selected Term: @<<<<<<< Admit Codes: @<<<<<<<<<<<<<<<<<<<<<<<<
Decision before: @<<<<<<<<<< Exclude Codes: @<<<<<<<<<<<<<<<<<<<<<<<<
END
<SNIP!>
_________________________________________________________________
doesn't pass "<<\'END\'" as the first element. Rather, it passes the format
info enclosed in the here document terminated by 'END'.
Duh.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Phil R Lawrence phone: 610-758-3051
Programmer / Analyst e-mail: prl2@lehigh.edu
194 Lehigh University Computing Center
E.W. Fairchild - Martindale, Bldg. 8B
Bethlehem, PA 18018
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
------------------------------
Date: Thu, 21 May 1998 15:01:11 -0400
From: Arthur Dardia <ahdiii@webspan.net>
To: John <johns@cc.gatech.edu>
Subject: Re: Text File Manipulatoin
Message-Id: <356479F7.14131116@webspan.net>
#!c:/progra~1/perl/bin/perl
sub error {
($message) = @_;
print("ERROR:\n",
$message);
exit(0);
}
open AUTOEXEC, "<c:\autoexec.bat" or &error("Cannot open autoexec.bat!");
while(<AUTOEXEC>) {
if ($_ eq "LINETOREMOVE") {
<OLDFILE>;
print AUTOEXEC 'TEXTOADD';
} else {
print AUTOEXEC $_;
}
}
close(AUTOEXEC);
print "Autoexec.bat successfully updated!";
-------
The above code will open C:\Autoexec.bat, look for LINETOREMOVE and if it
finds it, it'll replace it with TEXTOADD. If LINETOREMOVE is on it's own
line, make sure you change:
if ($_ eq "LINETOREMOVE") {
to
if ($_ eq "LINETOREMOVE\n") {
Also, if you want to make TEXTOADD on its own line, change:
print AUTOEXEC 'TEXTOADD';
to
print AUTOEXEC 'TEXTOADD';
print AUTOEXEC "\n";
Hoping this helps,
Arthur Dardia
PS - Remember to change #!c:/progra~1/perl/bin/perl to whatever your path
is.
John wrote:
> I'm wondering if someone can help me with the syntax for the following
> task:
>
> Using PERL for Win32, I want to run a script that will open a file
> (AUTOEXEC.BAT). It will then find a particular text string, and if
> it's in there, replace the text with some other text. It then needs
> to just save/close the file. If the text string is not found, it
> needs to add the other text string to the end of the PATH line. I
> guess it might be best to just do this no matter what and change
> the first step so that it just removes the text to be replaced, but
> since I know NO PERL at all, I'm just guessing. Can someone please
> help me out here?
>
> --
> John Q. Sindell Jr.
> jqs@pikapp.net
> jqsindel@gapac.com
> http://www.cc.gatech.edu/~johns
------------------------------
Date: Thu, 21 May 1998 15:05:43 -0400
From: Arthur Dardia <ahdiii@webspan.net>
To: John <johns@cc.gatech.edu>
Subject: Re: Text File Manipulatoin
Message-Id: <35647B07.A7C9E0C1@webspan.net>
Also, read my first post, and instead of doing AUTOEXEC.BAT try using a
temporary file, such as foo.bat (a copy of AUTOEXEC.bat). replace
AUTOEXEC with FOO and Autoexec.bat with Foo.bat. Good luck.
Arthur Dardia
John wrote:
> I'm wondering if someone can help me with the syntax for the following
> task:
>
> Using PERL for Win32, I want to run a script that will open a file
> (AUTOEXEC.BAT). It will then find a particular text string, and if
> it's in there, replace the text with some other text. It then needs
> to just save/close the file. If the text string is not found, it
> needs to add the other text string to the end of the PATH line. I
> guess it might be best to just do this no matter what and change
> the first step so that it just removes the text to be replaced, but
> since I know NO PERL at all, I'm just guessing. Can someone please
> help me out here?
>
> --
> John Q. Sindell Jr.
> jqs@pikapp.net
> jqsindel@gapac.com
> http://www.cc.gatech.edu/~johns
------------------------------
Date: 21 May 1998 19:58:16 GMT
From: johns@cc.gatech.edu (John)
Subject: Re: Text File Manipulatoin
Message-Id: <6k210o$t10@smash.gatech.edu>
Arthur Dardia (ahdiii@webspan.net) wrote:
: while(<AUTOEXEC>) {
: if ($_ eq "LINETOREMOVE") {
: <OLDFILE>;
: print AUTOEXEC 'TEXTOADD';
: } else {
: print AUTOEXEC $_;
: }
: }
This finds an entire line, but not part of a line. How can I change
this so that it looks WITHIN a line of text and replaces only part of
that text. Also, it doesn't seem to write back to the file properly.
The file never changes with that "print AUTOEXEC..." part, but if I
change it so that it does "print 'found the text';" it lets me know
that the text has been found (but only if I match the ENTIRE line).
--
John Q. Sindell Jr.
jqs@pikapp.net
jqsindel@gapac.com
http://www.cc.gatech.edu/~johns
------------------------------
Date: 21 May 1998 22:10:11 +0200
From: Per Abrahamsen <abraham@dina.kvl.dk>
Subject: Tom Christiansen seeing double
Message-Id: <rjyavv2xng.fsf@zuse.+dina.kvl.dk>
[ FUT: gnu.misc.discuss ]
Tom Christiansen <tchrist@mox.perl.com> writes:
> Check out http://www.gnu.org/gnu/linux-and-gnu.html, where you
> will see a remarkably similar copyright to mine:
>
> Copyright 1997, 1998 Richard Stallman
> Verbatim copying and redistribution is permitted without royalty as
> long as this notice is preserved.
The FSF use that for political and legal documents. You won't find it
on any of their technical documentation.
Are you able to see reasons to use different copyrights for the GNU
Manifest and the GCC Manual by yourself, or do you need them explained?
> I guess only Richard is allowed to use that kind of copyright.
Why do you guess that? Have Richard tried to prevent you from using
such a copyright?
> I wish I were that special.
But you are! RMS hasn't asked for free replacements for any of the
political documents you have written, including your well known rants
about anything that isn't Perl.
------------------------------
Date: Thu, 21 May 1998 21:44:20 -0700
From: Jan Krynicky <JKRY3025@comenius.ms.mff.cuni.cz>
To: yat@scmp.com
Subject: Re: usage of perl in NT. ($ENV{'PREVIOUS_URL'}
Message-Id: <356502A4.3CD0@comenius.ms.mff.cuni.cz>
yat@scmp.com wrote:
>
> hi..
>
> Anyone know the new function $ENV{'PREVIOUS_URL'} is work in NT w/
> IIS4.0? I have try other enviroment but only this not work.
>
> Thx. in advance.
>
> ..yat
>
> p.s pls reply in email. too. Thx.
I didn't hear about this variable. Didn't you mean
$ENV{HTTP_REFERER}?
This script will print out all the system variables available to your
CGIs :
#!/usr/bin/perl
print "Content-type: text/plain\n\n";
foreach (sort keys %ENV) {
print "$_ = $ENV{$_}\n";
}
HTH, Jenda
------------------------------
Date: 21 May 1998 19:01:14 GMT
From: belg4mit@aol.com (Belg4mit)
Subject: Re: Where is (or is there) perlpod for Win32?
Message-Id: <1998052119011400.PAA12972@ladder03.news.aol.com>
perlpod for win32, there is. It came with my distribtion from
ActiveWare (http://www.ActiveWare.com)
Enjoy
------------------------------
Date: 21 May 1998 20:03:02 GMT
From: smcdow@arlut.utexas.edu (Stuart McDow)
Subject: Re: Why NOT crypt???
Message-Id: <6k219m$2j6$1@ns1.arlut.utexas.edu>
pittelli@envmed.rochester.edu writes:
>
> BUT, could someone PLEASE tell me WHY the hell crypt was not implemented in
> the 5.00402 NT build, WHO was paranoid about WHAT (from people using
> encryption???), and have the developers acknowledged that this implementation
> omission was stupid (at the very least form the standpoint of all the users
> asking for crypt!), or will I need to build a workaround in all my scripts for
> clients b.c. of an expected lack of FUTURE crypt support???
It wasn't implemented because going to jail is a Bad Thing.
--
Stuart McDow Applied Research Laboratories
smcdow@arlut.utexas.edu The University of Texas at Austin
"Look for beauty in roughness, unpolishedness"
------------------------------
Date: 21 May 1998 20:49:28 GMT
From: chris+usenet@netmonger.net
Subject: Re: Why NOT crypt???
Message-Id: <6k240o$nhk$1@schenectady.netmonger.net>
In article <6k1p22$lkm$1@nnrp1.dejanews.com>,
<pittelli@envmed.rochester.edu> wrote:
> Ok, I've seen the threads discussing how to get crypt to work on the most
> recent CPAN NT Perl (5.00402), and I am also aware of Activeware's
> crypt-enabled 5.00307.
>
> BUT, could someone PLEASE tell me WHY the hell crypt was not implemented in
> the 5.00402 NT build, WHO was paranoid about WHAT (from people using
> encryption???), and have the developers acknowledged that this implementation
> omission was stupid (at the very least form the standpoint of all the users
> asking for crypt!), or will I need to build a workaround in all my scripts for
> clients b.c. of an expected lack of FUTURE crypt support???
What do you think crypt is for and do you know why it works on Unix
systems?
--
Christopher Masto <chris+usenet@netmonger.net>
Director of Operations, NetMonger Communications, Inc.
"Behold the Power of Cheese"
------------------------------
Date: Thu, 21 May 1998 12:13:22 -0700
From: Matthew Purdon <playinmantis@earthlink.net>
To: Randal Schwartz <merlyn@stonehenge.com>
Subject: Re: writing image from http request to file
Message-Id: <35647CD2.EDBDE55F@earthlink.net>
Randal Schwartz wrote:
> In case anyone else at home is watching, this is essentially
> an open-coded version of:
>
> use LWP::Simple;
> getstore('http://www.perl.com/graphics/ora_logo.gif','ora_logo.gif');
>
> I'm never sure why people don't start with the simple code first, so
> let me illustrate it here. Matthew, I'm not sure it'll solve your
> problem, but see what that does first.
Thanks for saving me from another day of banging my head against the wall. It worked
so well, it solved another problem as well. As for your comment about starting with
the simple code first. Yes that was easier and my company will be happy I can
continue to be productive. But as far as my own growth as a coder, I don't feel any
better. I still don't know what was wrong with my code. I feel like a dwarf standing
ontop of a castle built by giants without a clue how to do it himself. Of course, as
time goes on, we're only going to develop more and more levels, until computers
themselves handle all low level routines. I don't question how all the parts of my
body are working, so why should I my program? But what happen when I have to do
something really sophisticated - I'll feel like the curtain's been pulled and all my
knowledge will dissolve like an illusion and I'll be powerless.
------------------------------
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 2668
**************************************