[12252] in Perl-Users-Digest
Perl-Users Digest, Issue: 5853 Volume: 8
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Tue Jun 1 18:07:17 1999
Date: Tue, 1 Jun 99 15:01:28 -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 Tue, 1 Jun 1999 Volume: 8 Number: 5853
Today's topics:
Re: Re Better than Perl <emschwar@rmi.net>
Re: Re Better than Perl <jeromeo@atrieva.com>
Re: Re Better than Perl <cassell@mail.cor.epa.gov>
Re: Re Better than Perl <cmcurtin@interhack.net>
Re: Re Better than Perl (Marcel Grunauer)
Re: Salvaging CPAN installs after Perl upgrade? <randy@theoryx5.uwinnipeg.ca>
Re: Time Error <bill@fccj.org>
Timeout question...(CODE INCLUDED)...Please help! <portboy@home.com>
undesired result with .* in s command (Steve)
Re: undesired result with .* in s command (Larry Rosler)
Re: Use binmode for binary files (Was: Re: PB writing a <bill@fccj.org>
Re: Web Based SpellChecker? <gellyfish@gellyfish.com>
Re: Web Based SpellChecker? (Gregory Snow)
Re: Y2K infected Perl code <upsetter@ziplink.net>
Re: Y2K infected Perl code <upsetter@ziplink.net>
Re: Y2K infected Perl code <gellyfish@gellyfish.com>
Re: Y2K infected Perl code (Chris Nandor)
Re: Y2K infected Perl code <ebohlman@netcom.com>
Special: Digest Administrivia (Last modified: 12 Dec 98 (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: 01 Jun 1999 14:06:40 -0600
From: Eric The Read <emschwar@rmi.net>
Subject: Re: Re Better than Perl
Message-Id: <xkfpv3fd6sv.fsf@valdemar.col.hp.com>
John Q Public <CybdaNony@nym.alias.net> writes:
> Look at you, Schwartz, selling your Perl books and your Perl training
> and then insulting any group that threatens your livelihood with better
> stuff. Id say youre the spammer, if anyone.
Why, I never! I mean, I haven't even written any books, and what
training I've done has been mostly gratis (modulo the cost of the
occasional lunch here and there).
Oh wait. You meant that *other* Schwartz. The one who's done more for
Perl (for free, no less) than you've ever done for anything. The one
whose books are among the best I've ever read for *any* programming
language.
Well. <mode="Emily Litella" spelling=doubtful>Nevermind</mode>.
-=Eric, who uses a pseudonym because of legions of Amiga fanatics who
insist on asking him if he's THAT Eric Schwartz. He isn't.
------------------------------
Date: Tue, 01 Jun 1999 12:54:59 -0700
From: Jerome O'Neil <jeromeo@atrieva.com>
To: John Q Public <CybdaNony@nym.alias.net>
Subject: Re: Re Better than Perl
Message-Id: <37543A93.123E4735@atrieva.com>
John Q Public wrote:
>
> Look at you, Schwartz, selling your Perl books and your Perl training and then insulting any group that threatens your livelihood with better stuff. Id say youre the spammer, if anyone.
Yeah, but we *like* Randal. The usefullness of the stuff he gives away
is far more useful than anything you've ever done.
Spammer.
<*plonk*>
--
Jerome O'Neil, Operations and Information Services
Atrieva Corporation, 600 University St., Ste. 911, Seattle, WA 98101
jeromeo@atrieva.com - Voice:206/749-2947
The Atrieva Service: Safe and Easy Online Backup http://www.atrieva.com
------------------------------
Date: Tue, 01 Jun 1999 13:57:44 -0700
From: David Cassell <cassell@mail.cor.epa.gov>
To: Eric The Read <emschwar@rmi.net>
Subject: Re: Re Better than Perl
Message-Id: <37544948.944F93D1@mail.cor.epa.gov>
Eric The Read wrote:
>
> John Q Public <CybdaNony@nym.alias.net> writes:
> > Look at you, Schwartz, selling your Perl books and your Perl training
> > and then insulting any group that threatens your livelihood with better
> > stuff. Id say youre the spammer, if anyone.
>
> Why, I never! I mean, I haven't even written any books, and what
> training I've done has been mostly gratis (modulo the cost of the
> occasional lunch here and there).
>
> Oh wait. You meant that *other* Schwartz. The one who's done more for
> Perl (for free, no less) than you've ever done for anything. The one
> whose books are among the best I've ever read for *any* programming
> language.
>
> Well. <mode="Emily Litella" spelling=doubtful>Nevermind</mode>.
>
> -=Eric, who uses a pseudonym because of legions of Amiga fanatics who
> insist on asking him if he's THAT Eric Schwartz. He isn't.
IIRC, that *is* the correct spelling for Gilda Radner's character.
BTW, nice post. It's a shame that cluelessness and jerkiness
are chronic diseases. Why doesn't Jerry Lewis do a charity
fundraiser for them? Hey, he could be the posterboy too!
David, who doesn't use a pseudonym, even though he gets the
occasional query asking if he's the Dave Cassell of AOLSucks
fame...
--
David Cassell, OAO cassell@mail.cor.epa.gov
Senior computing specialist
mathematical statistician
------------------------------
Date: 01 Jun 1999 16:58:52 -0400
From: Matt Curtin <cmcurtin@interhack.net>
Subject: Re: Re Better than Perl
Message-Id: <xlxk8tny6wj.fsf@gold.cis.ohio-state.edu>
>>>>> On 1 Jun 1999 18:58:47 -0000,
John Q Public <CybdaNony@nym.alias.net> said:
AnonymousCoward> We are doing a service to the Unix community.
If this were true, then you would be participating in a "gift economy"
whereby your work builds a good reputation for you, resulting in lots
of esteem and other good things to keep you going.
Posting anonymously is not a good way to build a reputation.
You are building no reputation. You are doing no service. What you
are doing is giving more ammunition to the people who argue that the
ability to maintain anonymity on the Internet is itself an evil that
can have no good purpose.
AnonymousCoward> The more newsgroups hear about Unicon, the better.
Indeed, because newsgroups write software!
Here's a nickel's worth of free advice. If you have something that
you want people to know, stake out your territory by building a web
site that describes your tool, provides documentation, and offers the
tool itself. Then find yourself an *appropriate* place to make an
announcement. And find an *appropriate* way to make that
announcement. Posting to n groups saying "better than x!" isn't the
way to do it.
A programming language would logically be announced in
comp.programming, perhaps with a to-the-point article that describes
the language, its goals, and how it goes about accomplishing those
objectives. Other possibilities would include:
o "Announce" newsgroups for various OSes, announcing that your
language is available for that platform, and
o comp.infosystems.announce, noting that you've got a new programming
langauge and where its web site can be found.
Don't expect to be able to invade an well-established community with
your mouth wide open, hiding behind a veil of anonymity, and defending
yourself by attempting to insult people whose reputations in the free
software community have been in the making for more than a decade.
--
Matt Curtin cmcurtin@interhack.net http://www.interhack.net/people/cmcurtin/
------------------------------
Date: Tue, 01 Jun 1999 20:34:31 GMT
From: marcel.grunauer@lovely.net (Marcel Grunauer)
Subject: Re: Re Better than Perl
Message-Id: <37544147.6776864@enews.newsguy.com>
On 1 Jun 1999 19:35:39 -0000, John Q Public <CybdaNony@nym.alias.net>
wrote:
>Look at you, Schwartz, selling your Perl books and your Perl training and then insulting any group that threatens your livelihood with better stuff. Id say youre the spammer, if anyone.
>
>Sincerely,
>Another anonymous dude
Or should that have been d00d?
Just killfile the suckers from nym.alias.net. Why do they have to hide
behind email addresses like AnnonyMai1@nym.alias.net and CybdaNony?
And what's this newsreader that doesn't wrap lines?
>In fact our major discovery is that the Unix related
>newsgroups are heavily censored, in general, by
>people whose fat petards sit in plush sysadmin seats where
>their pay is tied to knowledge of esoteric script languages
>that should be replaced with modern software technology.
Right. All Unicon users, switch to Perl!
>http//www.drones.com/unicon/
Your understanding of the http protocol is admirable. It stops after
four characters.
Interesting to note, though, that on that page they mention
Programming Perl as one of the references, of course misspelling
Randal's first name. And not even mentioning TomC.
Also from that page (I thought that might be of interest):
>While it is true that Perl substitutes for a congolmeration of sed,
>awk and shell scripts, it does so with some of the worst
>language features from them.
>Icon, on the other hand, has always been a good clean
>language with lots of support for high-level control and data
>structures.
Uh huh.
Whatever.
Regards
Marcel Grunauer
--
Codewerk Ltd marcel@codewerk.com
Just Another Perl Hacker phone: +44-171-624 7408
------------------------------
Date: 1 Jun 1999 20:55:55 GMT
From: Randy Kobes <randy@theoryx5.uwinnipeg.ca>
Subject: Re: Salvaging CPAN installs after Perl upgrade?
Message-Id: <7j1hcr$dtr$1@canopus.cc.umanitoba.ca>
In comp.lang.perl.modules Lloyd Zusman <ljz@asfast.com> wrote:
> I've finally gotten around to upgrading my 5.005_02 version of Perl to
> 5.005_03, and now I want to install all the modules I got from CPAN
> that I so painstakingly installed within my 5.005_02 release. Due to
> the version-specific subdirectories within my Perl library tree, it
> looks like I need to re-install all these modules.
> I'm willing to do this next time I have an afternoon or two, but I'm
> wondering if there is any kind of automated or at least
> partially-automated way to rebuild all my previously installed CPAN
> modules. I have a dial-up internet connection and I'd like to
> avoid re-downloading everything.
Hi,
One way to do this is through the CPAN.pm module; get into the
CPAN shell (on your old perl) via
perl -MCPAN -e shell
and then issue the command
autobundle
This will create a file like
$CPAN/.cpan/Bundle/Snapshot_1999_06_01_00.pm
which contains a list of all modules installed. You may want
to edit this file to weed out any modules you may not need
or want. Then, in your new perl, in the CPAN shell issue the
command
install Bundle::bundle_file
where 'bundle_file' is the edited Bundle file from before.
This may take a while on a dial-up connection, but is pretty
straightforward and will get the most recent versions of
things. Also, newer versions of CPAN.pm have the neat property
that, for a given module, being usually able to detect
dependencies and install these for you as well.
Best regards,
Randy Kobes
--
Physics Department Phone: (204) 786-9399
University of Winnipeg Fax: (204) 774-4134
Winnipeg, Manitoba R3B 2E9 e-mail: randy@theoryx5.uwinnipeg.ca
Canada http://theory.uwinnipeg.ca/
------------------------------
Date: Tue, 01 Jun 1999 17:28:58 -0400
From: "Bill Jones" <bill@fccj.org>
Subject: Re: Time Error
Message-Id: <37545050.0@usenet.fccj.cc.fl.us>
In article <37541961.81458F7A@xs4all.nl>, Frank de Bot <debot@xs4all.nl>
wrote:
> I've some little trouble with the time. Today it's 1 june . But my
> script thinks it's 2 june. It has the same problem with other dates at
> the start of each month. Here's the script I use. If you have a better
> one, I would love to hear from it.
>
> ($sec,$min,$hour,$mday,$mon,$year,$wday) =
> (gmtime(time))[0,1,2,3,4,5,6];
> @months = ('January','February','March','April','May','June',
> 'July','August','September','October','November','December');
> @days =
> ('Sunday','Monday','Tuesday','Wednesday','Thursday','Friday','Saturdat');
>
> if ($sec < 10) { $sec = "0$sec"; }
> if ($min < 10) { $min = "0$min"; }
> if ($hour < 10) { $hour = "0$hour"; }
> if ($mday <10) { $mday = "0$wday"; }
> if ($mon <10) { $mon = "0$mon"; }
#!perl -w
use strict;
use diagnostics;
my @months = qw(January February March April May June
July August September October November December);
my @days = qw(Sunday Monday Tuesday Wednesday Thursday Friday Saturday);
my ($sec,$min,$hour,$mday,$mon,$year,$wday) = localtime;
$year += 1900; # Damn, there goes Y2k again...
print<<_EOF;
The time is $hour:$min$sec and
the date is $days[$wday] $months[$mon], $mday $year
_EOF
/^Enjoy$/
-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: Tue, 01 Jun 1999 20:59:31 GMT
From: Mitch <portboy@home.com>
Subject: Timeout question...(CODE INCLUDED)...Please help!
Message-Id: <3753D9E0.6016313A@home.com>
I'm working on a timeout issue. Here's how the problem is setup. There
are two files, one contains daemon code, and the other contains the
"commands" code. When the daemon is fired up, it fires up the commands
code. After that is fired up, it does a &print_welcome; Here's the
print_welcome code:
sub print_welcome
{
my $an;
my $cfg_pass;
&welcome; #shows all that welcome b.s.
# Get the password from the config file
open(CONFIG, "/foo/bar/config");
while(<CONFIG>) {
if ($_ =~ /^pass (.*)/) {
$cfg_pass = $1;
}
}
close(CONFIG);
do
{
&show("password: ");
ReadMode 'noecho';
$an = ReadLine 0;
chomp $an;
ReadMode 'normal';
&show("\n");
} while ($an ne $cfg_pass); #keep doing until they get it right
}
All this code does is show a pretty banner, and then ask the user for a
password where it then compares the inputted password with the one
contained in the config file. Assuming the user's inputted password
matches the one contained in the config, we then get to a console>
prompt where the users is able touse the scripts commands. Assuming the
welcome banner and login go ok, I then send it to &poll. Code is
below...
sub poll
{
eval {
alarm(5);
&loop;
alarm(0);
};
if ($@) {
if ($@ =~ /timeout/) {
&foo;
} else {
alarm(0);
die;
}
}
}
As you see in poll, there is &loop (code below), which monitors what the
user is inputting and if a proper command is inputted, it heads off to
execute it. However, if there is no input from the user, the script
should essentially log the user out, print the banner, and ask them to
log-in again (i've tried doing this by calling foo - code below).
sub loop {
while (1)
{
&show(&prompt);
my($an) = &get_line;
# next if ($an[0] =~ /^\s*$/);
($cmd, @args) = split(/\s+/, $an);
if (!$commands{$cmd})
{
&bad_input;
}
else
{
&{$commands{$cmd}{sub}}(@args);
}
}
}
sub foo{
&print_welcome;
&poll;
}
This doesn't seem to be working. Everything fires up fine, but after 5
seconds, the script dies.
Any suggestions on what I'm doing wrong?
Thanks again,
Mitch
p.s. if you need clarification let me know
------------------------------
Date: 1 Jun 1999 21:02:50 GMT
From: stevenh@erols.com (Steve)
Subject: undesired result with .* in s command
Message-Id: <7j1hpq$8hn$1@autumn.news.rcn.net>
I am new to Perl, and I'm having a problem with the .* expression in the
substitute function.
I am trying to strip the middle portion out of a string where I don't know
what that portion is. For example, <p align=center>, I would like to have
just <p>. To do that, I tried
$var =~ s/<p.*>/<p>/ig;
That didn't work since the .* matches the longest possible pattern. See the
code
sample below:
--------------------------------------------
#!/usr/local/bin/perl
$str = "<p>This is text from paragraph1<p align=center>";
$str .= "This is a center aligned paragraph<p>This is the third";
$str .= " para<p align=right>This is a right aligned para";
print "Before...\n$str\n";
$str =~ s/<p.*>/\n<P>/gi;
print "After...\n$str\n";
----------------------------------------------
Desired output is
Before...
<p>This is text from paragraph1<p align=center>This is a center aligned
paragraph<p>This is the third para<p align=right>This is a right aligned para
After...
<P>This is text from paragraph1
<P>This is a center aligned paragraph
<P>This is the third para
<P>This is a right aligned para
Actual output is
Before...
<p>This is text from paragraph1<p align=center>This is a center aligned
paragraph<p>This is the third para<p align=right>This is a right aligned para
After...
<P> This is a right aligned para
I am trying to replace all para tags (those that are just <p> and those that
are like <p align=right>) with a newline followed by a <P>. Since the ".*"
pattern matches the longest possible pattern, I'm not getting the desired
result. How can I perform a substitution like this (constant value,
anything, constant value)?
Any help is greatly appreciated.
Steve
------------------------------
Date: Tue, 1 Jun 1999 14:29:07 -0700
From: lr@hpl.hp.com (Larry Rosler)
Subject: Re: undesired result with .* in s command
Message-Id: <MPG.11bdf07a9ce09ba4989b50@nntp.hpl.hp.com>
[Posted and a courtesy copy mailed.]
In article <7j1hpq$8hn$1@autumn.news.rcn.net> on 1 Jun 1999 21:02:50
GMT, Steve <stevenh@erols.com> says...
> I am new to Perl, and I'm having a problem with the .* expression in the
> substitute function.
>
> I am trying to strip the middle portion out of a string where I don't know
> what that portion is. For example, <p align=center>, I would like to have
> just <p>. To do that, I tried
> $var =~ s/<p.*>/<p>/ig;
>
> That didn't work since the .* matches the longest possible pattern. ...
.*? matches the shortest possible pattern. Read about 'non-greedy
quantifiers' in perlre.
--
(Just Another Larry) Rosler
Hewlett-Packard Company
http://www.hpl.hp.com/personal/Larry_Rosler/
lr@hpl.hp.com
------------------------------
Date: Tue, 01 Jun 1999 16:36:24 -0400
From: "Bill Jones" <bill@fccj.org>
Subject: Re: Use binmode for binary files (Was: Re: PB writing an uploaded file in perl (size changes!))
Message-Id: <375443fb.0@usenet.fccj.cc.fl.us>
In article <7j16fa$nf4$2@fcnews.fc.hp.com>, ada@fc.hp.com (Andrew Allen)
wrote:
> Are the perl programs also line-records?
>
> Andrew
#!perl -w
use strict; use diagnostics; print "Yes I am!";
print <<_EOF_;
Not, I'm not!
/^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
_EOF_
------------------------------
Date: 1 Jun 1999 20:22:04 -0000
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: Web Based SpellChecker?
Message-Id: <7j1fdc$h3$1@gellyfish.btinternet.com>
On Thu, 27 May 1999 18:36:46 -0700 Alex Guberman wrote:
> Hi,
>
> I'm starting to work on a web based spell checker. Does anybody know if
> there is already one in existance, or do you know if I can somehow hook
> it up to a existing spellchecking application: for example - use MS Word
> to do it using OLE module?
>
>
You might try out Search::Dict that is part of the standard distribution -
of course on NT you dont have /usr/dict/words but you could download the
source for some Unix spellchecker and use the words list.
This following is *a really dumb* example but (assuming you can get you
a word list ) it will give you a start.
#!/usr/bin/perl -w
use strict;
use Search::Dict;
my $file = '/usr/dict/words';
open(DICT,$file) || die "Cant open $file - $!\n";
while(<>)
{
my $line_number = $.;
chomp;
foreach (split )
{
s/\W//g;
next if /^\d/;
my $pos = look *DICT,$_,1,1;
my $word = <DICT>;
chomp $word;
if (lc($_) ne lc($word))
{
print "line $line_number : $_ - guess $word \n";
}
}
}
/J\
--
Jonathan Stowe <jns@gellyfish.com>
Some of your questions answered:
<URL:http://www.btinternet.com/~gellyfish/resources/wwwfaq.htm>
Hastings: <URL:http://www.newhoo.com/Regional/UK/England/East_Sussex/Hastings>
------------------------------
Date: 1 Jun 1999 21:35:02 GMT
From: snow@biostat.washington.edu (Gregory Snow)
Subject: Re: Web Based SpellChecker?
Message-Id: <7j1jm6$16gk$1@nntp6.u.washington.edu>
I have a perl version of spell that I will be submitting to PPT
within the next week or so (need to finish the pod).
It's not perfect, but watch for it there and borrow whatever
you want from it.
--
-------------------------------------------------------------------------------
Gregory L. Snow | Imagination is the one weapon in the
(Greg) | war against reality.
snow@biostat.washington.edu | -- Jules de Gaultier
------------------------------
Date: Tue, 01 Jun 1999 20:33:19 GMT
From: Scratchie <upsetter@ziplink.net>
Subject: Re: Y2K infected Perl code
Message-Id: <jsX43.1503$nn.456581@news.shore.net>
In comp.lang.perl.misc Jonathan Stowe <gellyfish@gellyfish.com> wrote:
: Asserting that a language makes it easy to create Y2K problems is totally
: bogus.
It was demonstrated here at one point that it is easier (fewer lines of
code and/or operators) to write a non-compliant Perl program than it is to
write a compliant one. While this doesn't justify hysteria, simply
admitting it won't make you a heretic to the Perl Cause.
--Art
--
--------------------------------------------------------------------------
National Ska & Reggae Calendar
http://www.agitators.com/calendar/
--------------------------------------------------------------------------
------------------------------
Date: Tue, 01 Jun 1999 20:39:04 GMT
From: Scratchie <upsetter@ziplink.net>
Subject: Re: Y2K infected Perl code
Message-Id: <IxX43.1504$nn.456581@news.shore.net>
In comp.lang.perl.misc Chris Nandor <pudge@pobox.com> wrote:
: Well, if you can't put headers into it, it's broken. If you want to
: continue using a broken newsreader, that's your business, I guess.
If you really want to continue this inane discussion, that's your
business, but please do it elsewhere (e.g. email).
--Art
--
--------------------------------------------------------------------------
National Ska & Reggae Calendar
http://www.agitators.com/calendar/
--------------------------------------------------------------------------
------------------------------
Date: 1 Jun 1999 19:32:34 -0000
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: Y2K infected Perl code
Message-Id: <7j1cgi$e1$1@gellyfish.btinternet.com>
On 1 Jun 1999 10:04:43 GMT Malcolm Ray wrote:
>
> For example: what
> proportion of beginning CGI programmers start by copying and modifying
> existing code? How many of these do so because they've tried and
> failed to find online tutorial documentation pitched at their level?
> If such a learner found that the first script they studied contained a
> comment pointing to good introductory documentation, plus a suggestion
> that they copy this comment into any code that they produce, could
> this become a meme which would raise the standard?
>
Strangely someone brought this up here (clpmisc) a few weeks ago - go search
at AltaVista for "Un-Webify" (or whatever the comment in the form parsing
code in wwwboard.pl ) and you'll come up with hundreds of different
scripts all with the self same piece of code. I hate to think whatever
other pieces of truly bad code have transmitted themselves in this manner.
/J\
--
Jonathan Stowe <jns@gellyfish.com>
Some of your questions answered:
<URL:http://www.btinternet.com/~gellyfish/resources/wwwfaq.htm>
Hastings: <URL:http://www.newhoo.com/Regional/UK/England/East_Sussex/Hastings>
------------------------------
Date: Tue, 01 Jun 1999 21:10:25 GMT
From: pudge@pobox.com (Chris Nandor)
Subject: Re: Y2K infected Perl code
Message-Id: <pudge-0106991710270001@192.168.0.77>
In article <IxX43.1504$nn.456581@news.shore.net>, Scratchie
<upsetter@ziplink.net> wrote:
# In comp.lang.perl.misc Chris Nandor <pudge@pobox.com> wrote:
#
# : Well, if you can't put headers into it, it's broken. If you want to
# : continue using a broken newsreader, that's your business, I guess.
#
# If you really want to continue this inane discussion, that's your
# business, but please do it elsewhere (e.g. email).
La la la I can't hear you I can't hear you
--
Chris Nandor mailto:pudge@pobox.com http://pudge.net/
%PGPKey = ('B76E72AD', [1024, '0824090B CE73CA10 1FF77F13 8180B6B6'])
------------------------------
Date: Tue, 1 Jun 1999 21:34:27 GMT
From: Eric Bohlman <ebohlman@netcom.com>
Subject: Re: Y2K infected Perl code
Message-Id: <ebohlmanFCo3xF.5HI@netcom.com>
Scratchie <upsetter@ziplink.net> wrote:
: In comp.lang.perl.misc Jonathan Stowe <gellyfish@gellyfish.com> wrote:
: : Asserting that a language makes it easy to create Y2K problems is totally
: : bogus.
: It was demonstrated here at one point that it is easier (fewer lines of
: code and/or operators) to write a non-compliant Perl program than it is to
: write a compliant one. While this doesn't justify hysteria, simply
: admitting it won't make you a heretic to the Perl Cause.
Theorem: for every language L and any correct program P in L which takes N
lines of code, there exists an incorrect program PP in L which takes NN
lines of code, NN<=N, and NN<N for N>1.
Proof: Let P be a correct N-line program in L accomplishing some task T, and
assume WLOG that N is the minimum number of lines in which such a program
can be encoded. Transform P to PP by the following rules:
1) If N>1, delete an arbitrarily-chosen line from P.
2) If N=1, delete an arbitrarily-chosen syntactically-significant
character from P.
By the assumption, PP cannot be a correct program.
QED
------------------------------
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 5853
**************************************