[12209] in Perl-Users-Digest
Perl-Users Digest, Issue: 5809 Volume: 8
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Thu May 27 23:07:20 1999
Date: Thu, 27 May 99 20:00:19 -0700
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Perl-Users Digest Thu, 27 May 1999 Volume: 8 Number: 5809
Today's topics:
Re: -> Folkert Meeuw: Write errors and correction <hasant@trabas.co.id>
[Fwd: Checking case of a variable]-Found Answer <info-spamstopper@animenet.com>
Re: A better way then flock? (Benjamin Franz)
Re: A better way then flock? <APTavistock@lbl.gov>
Re: Can someone help me on this challenging problem? <uyv_IGNORE_r@hotmail.com>
Re: Can someone help me on this challenging problem? (Lev)
Checking case of a variable <info-spamstopper@animenet.com>
Re: DBM File will not open after Redhat 6.0 upgrade <bruce@flair.law.ubc.ca>
Re: FAQ 4.16: Does Perl have a year 2000 problem? Is Pe finsol@ts.co.nz
Re: FAQ 4.16: Does Perl have a year 2000 problem? Is Pe <tchrist@mox.perl.com>
Re: How to exec a program( system() ) in a limited time <otis@my-deja.com>
how to upload file from the form? <globus@infonet.ee>
Re: Perl "constructors" zenin@bawdycaste.org
Re: scalar refs and m/(pat)/ <tchrist@mox.perl.com>
Re: scalar refs and m/(pat)/ <uri@sysarch.com>
Re: scalar refs and m/(pat)/ <tchrist@mox.perl.com>
Re: scalar refs and m/(pat)/ <uri@sysarch.com>
Strip "http" from URL's wired2000@my-deja.com
two questions, pls help jbell@263.net
Re: Usin IF gives Internal Server Error?? <hasant@trabas.co.id>
Re: Want to create a auto login script <dipak@corning.com>
Web Based SpellChecker? <alex@digi-q.com>
Re: workarounds for prototypes (Damian Conway)
Y2K infected Perl code finsol@ts.co.nz
Re: Y2K infected Perl code (Lane Core Jr.)
Re: Y2K infected Perl code <uri@sysarch.com>
Special: Digest Administrivia (Last modified: 12 Dec 98 (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Fri, 28 May 1999 08:37:38 +0700 (JAVT)
From: Hasanuddin Tamir <hasant@trabas.co.id>
To: comp.lang.perl.misc@list.deja.com
Subject: Re: -> Folkert Meeuw: Write errors and correction
Message-Id: <Pine.LNX.3.96.990528082907.25017A-100000@borg.intern.trabas.co.id>
On Wed, 19 May 1999, Folkert Meeuw wrote:
fmee] Date: Wed, 19 May 1999 16:21:33 +0200
fmee] From: Folkert Meeuw <fmee@lfi.uni-hannover.de>
fmee] To: comp.lang.perl.misc@list.deja.com
fmee] Subject: -> Folkert Meeuw: Write errors and correction
fmee] Reply-To: comp.lang.perl.misc@list.deja.com
fmee] Organization: LFI, Uni Hannover, Germany
fmee]
fmee] Hi Dear Friendly Readers,
fmee]
fmee] instead of a new problem, a correction to the yesterday postings.
fmee]
fmee] #!/usr/local/bin/perl -w
fmee] # 1.8 Listings
fmee]
fmee] open (IN, "friends") or die "couldn't open friends $!";
fmee]
fmee] @friends = <IN>;
fmee] close IN;
fmee] chomp @friends;
fmee] print "Whats your name:\n";
fmee] $name = <STDIN>;
fmee] chomp $name;
fmee] foreach $friend (@friends)
fmee] {
fmee] if ($name eq $friend)
fmee] {
fmee] print "Hallo $name, good old boy\n";
fmee] }
fmee] else
fmee] {
fmee] print "Hallo, $name\n";
fmee] }
fmee] }
fmee]
fmee] so far so good !
fmee]
fmee] But elsewise, when I write in too: use strict;
fmee] save the scrpit again and I type in a shell: perl -d 1.8.pl
fmee] to run it, the run of the script failed.
fmee] I don't know why, I'm a newby in perl.
fmee]
fmee] NG Folkert Meeuw
Allow me to suggest you to read one of:
% man strict
% man perlsub
(and go to section `Private Variable via my()')
% man strict
If you can't do the `man', do the `perldoc'.
HTH,
-hasan-
+================================================================+
Hasanuddin Tamir <hasant@trabas.co.id>
TRABAS Technical Dept. PT Meitraco Bahana Sejahtera
IT Solution Provider http://www.trabas.co.id/
Surya Sumantri Blok B1 No. 35 Phone: +62-22-216660
Setrasari Mall Bandung 40146 Fax : +62-22-2007633
+================================================================+
SORRY: I ignore most of attachments but plain text type
+================================================================+
"Hingga saat kita nyaris tak percaya
bahwa roda nasib memang berputar"
--Iwan Fals (Belum Ada Judul)
------------------------------
Date: Thu, 27 May 1999 21:47:35 -0400
From: The Anime Network <info-spamstopper@animenet.com>
Subject: [Fwd: Checking case of a variable]-Found Answer
Message-Id: <374DF5B7.12B1969@animenet.com>
This is a multi-part message in MIME format.
--------------918951BC90A3766DB9775D1C
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Sorry for bothering the group, no sooner than I posted the message I
found the answer...
Thanks!
--------------918951BC90A3766DB9775D1C
Content-Type: message/rfc822
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
X-Mozilla-Status2: 00000000
Message-ID: <374DF255.C1CB51F7@animenet.com>
Date: Thu, 27 May 1999 21:33:09 -0400
From: The Anime Network <info-spamstopper@animenet.com>
Reply-To: info-spamstopper@animenet.com
X-Mailer: Mozilla 4.5 [en] (Win95; I)
X-Accept-Language: en
MIME-Version: 1.0
Newsgroups: comp.lang.perl.misc
Subject: Checking case of a variable
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
I have the unfortunate task of moving some code over to NT from Unix,
where I have single letter (A.gif etc) graphics which must now be kept
in a separate directory.
Can anyone tell me a way to check the case (upper/lower) of a single
character and give a return of that case in some fashion?
I was thinking of something like:
if ($code eq [A-Z]) {$sky = "/uppercase/$code.gif";}
Any thoughts?
Ilene Jones
--------------918951BC90A3766DB9775D1C--
------------------------------
Date: Fri, 28 May 1999 01:37:39 GMT
From: snowhare@long-lake.nihongo.org (Benjamin Franz)
Subject: Re: A better way then flock?
Message-Id: <Drm33.1451$kd5.143241@typhoon-sf.snfc21.pbi.net>
In article <374de0b3.0@news1.starnetinc.com>,
$Richy Rich$ <rich_guy@hotmail.com> wrote:
>
>hi,
>
> i posted a question about the flocking technique not too long ago
>and Tom Christiansen was kind enough to direct me to some info and paste
>in the email reply a lot of info about how to implement flock. however,
>i'm not sure if this is what i need to solve my problem. in haste i
>assumed it would. here's my problem. the isp i'm on slows down to a
>crawl, and I have about 40 or more users at once creating session files.
>i don't think the flock command will help, as i want to increment +1 on
>the session of the user and not overwrite or update the same session
>file. i should have put more thought into it, sorry.
<snip>
You left out some details such as what happens if you have 25 users
and say user #3 leaves. If you are just monotonically incrementing the
session number, the next number would be 26. If you are re-using
session numbers, the next number would be 3 (or some other then
vacant number).
Anyhow, yes, locking is necessary. You will need to either keep
a 'user counter' in a file you open and increment locked to assign
the next monotonically available number track the number of active
sessions, or a 'user session tracking' file with entries for each
of session slots that you open and update locked if you are re-using
session numbers.
--
Benjamin Franz
------------------------------
Date: Thu, 27 May 1999 18:29:07 -0700
From: Aaron Tavistock <APTavistock@lbl.gov>
Subject: Re: A better way then flock?
Message-Id: <374DF163.981C412F@lbl.gov>
"$Richy Rich$" wrote:
>
> i'd love to get on a faster isp, but that's not going to happen right
> now,
"My hardware can't do it, so the softwares gotta". Typically not very
easy to do.
Alot of this might depend on exactly what is slowing down. If its some
piece of hardware on the server (e.g. the harddisk), then I can't see
any way you could keep this from happening.
Assuming it is the network then you are probably getting a race
condition when the network lets a few packets across the wire. There
may not be a good 100% solution unless you want to do some interprocess
communications and get really scary complex. I'd say flocking a file
and waiting is pretty good in most cases.
Maybe a better idea would be a redesign of what your doing for the
session files. I'd assume its better to have one more user than you
wanted than to have comingled data. So I would make my files
"user.".time().$$ ($$ is the process id), then count users using
opendir, readdir, closedir.
Aaron Tavistock
------------------------------
Date: Thu, 27 May 1999 20:46:24 -0500
From: "Ralph Emerson" <uyv_IGNORE_r@hotmail.com>
Subject: Re: Can someone help me on this challenging problem?
Message-Id: <7iksk2$20m@dfw-ixnews10.ix.netcom.com>
I searched for Prim algorithm and Kruskal algorithm on hotbot and got a lot
of college sites that had a lot of funky stuff about .... well I didn't
understand any of it (I remember Blue/Red, but I didn't get that either). I
think that I'd understand it more if someone could relate it to me on my
problem. I would really appreciate any help I could get on learning what
these algorithm's are.
Yves Gauvreau wrote in message ...
>Hi,
>
>If I read this correctly you could look for graph theory or more
>specifically the Prim algorithm, the Kruskal algorithm or the ADD
algorithm.
>If you don`t find anything write me back I might have some thing for you.
>
>Hope this helps
>
>YG
>
------------------------------
Date: Fri, 28 May 1999 02:00:36 GMT
From: lev@sir.com.au (Lev)
Subject: Re: Can someone help me on this challenging problem?
Message-Id: <374ded01.238527534@syd-news.tpg.com.au>
You are right, that is a classic task - finding the shortest path in a
Graph with all edges having equal weight. Try to use the Breadth-First
Search algorithm. It will do fine and should be quick enough for 5000
nodes. If I remember correctly, its time complexity is O(n+m), where
n is the number of nodes and m is the number of edges.
Any book on Data Structures and Algorithms, chapter Graphs.
------------------------------
Date: Thu, 27 May 1999 21:33:09 -0400
From: The Anime Network <info-spamstopper@animenet.com>
Subject: Checking case of a variable
Message-Id: <374DF255.C1CB51F7@animenet.com>
I have the unfortunate task of moving some code over to NT from Unix,
where I have single letter (A.gif etc) graphics which must now be kept
in a separate directory.
Can anyone tell me a way to check the case (upper/lower) of a single
character and give a return of that case in some fashion?
I was thinking of something like:
if ($code eq [A-Z]) {$sky = "/uppercase/$code.gif";}
Any thoughts?
Ilene Jones
------------------------------
Date: Thu, 27 May 1999 18:15:32 -0700
From: pedxing <bruce@flair.law.ubc.ca>
Subject: Re: DBM File will not open after Redhat 6.0 upgrade
Message-Id: <374DEE34.F88C93BD@flair.law.ubc.ca>
Thanks to everyone for their help. I'm sure that all three of the
respondents are correct, that it is the version of BerkeleyDB being used.
I too wrote scripts to dump and reload the DB file, and that not only worked
but significantly decreased the size of the file. I'll have to do that more
often.
I guess there is no conversion utility that comes with the new DB. Too bad.
------------------------------
Date: Fri, 28 May 1999 01:29:07 GMT
From: finsol@ts.co.nz
Subject: Re: FAQ 4.16: Does Perl have a year 2000 problem? Is Perl Y2K compliant?
Message-Id: <7ikrh1$kmd$1@nnrp1.deja.com>
In article <374d6545@cs.colorado.edu>,
tchrist@mox.perl.com (Tom Christiansen) wrote:
> There are idiots everywhere. What's your point?
> --tom
>
That's my point exactly. Idiot's or not, don't expect perfection from
programmers, we're only human. Ask any user who has to put up with our
arrogance, ego, bugs, delays, budget over-runs, optimism (based on
wishful thinking not past experience) and our inability to communicate
and understand their needs. Or do you live in a different world?
It is particularly likely mistakes will be made when a programming
language such as Perl, is so easy to mis-use. We need to be working
actively on Y2K awareness, not denial, if we are going to mitigate some
of the worst eventualities.
Jocelyn Amon
--
Financial Solutions Limited
http://www.ts.co.nz/~finsol/
Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.
------------------------------
Date: 27 May 1999 20:01:57 -0700
From: Tom Christiansen <tchrist@mox.perl.com>
Subject: Re: FAQ 4.16: Does Perl have a year 2000 problem? Is Perl Y2K compliant?
Message-Id: <374df915@cs.colorado.edu>
[courtesy cc of this posting mailed to cited author]
In comp.lang.perl.misc, finsol@ts.co.nz writes:
:> There are idiots everywhere. What's your point?
:That's my point exactly. Idiot's or not
Case in point. Now, I distinctly recall advising you, in effect,
that 'twould be better to keep one's mouth shut and be believed
a fool than to open and remove all doubt. You lose, again.
--tom
--
"Just because something is obviously happening doesn't mean something obvious
is happening." --Larry Wall
------------------------------
Date: Fri, 28 May 1999 01:03:09 GMT
From: Otis Gospodnetic <otis@my-deja.com>
To: sowmaster@juicepigs.com
Subject: Re: How to exec a program( system() ) in a limited time?
Message-Id: <7ikq0c$jib$1@nnrp1.deja.com>
In article <7ikgqa$iac$1@holly.prod.itd.earthlink.net>,
sowmaster@juicepigs.com (Bob Trieger) wrote:
> [ courtesy cc sent by mail if address not munged ]
>
> "Eric Yu" <ericyu@infor.eu.org> wrote:
> >I want to use system() call to exec a program, but I want it stop(be
killed)
> >after 1 hour, how can I do it? The second problem is that I made a
menu for
> >user and wait for their <STDIN>. How can I automatically exit the
program if
> >they didn't type anything after 10 minutes?
>
> Just fork a child to run the system command and if it ain't done in a
> certain amount of time, ya kill it.
But will that kill the process that was startd by exec()?
Here is a simple test:
#!/usr/bin/perl
unless ($childPID = fork) { exec ("sleep 30"); }
wait;
print "$childPID\n";
if I run this little script and then try to kill it (not the sleep
directly, but rather this script), the sleep process doesn't die.
How can one make sure that whatever was started by exec() or system()
dies when you kill its parent?
I checked perlipc and perdoc -f system and perldoc -f exec
Thanks,
Otis
Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.
------------------------------
Date: Fri, 28 May 1999 04:53:52 +0300
From: Gleb Ekker <globus@infonet.ee>
Subject: how to upload file from the form?
Message-Id: <374DF730.4F585088@infonet.ee>
Hi everybody,
please, help is needed. I want to upload to the server a file from the
form.
I use <input name='data' TYPE='file'> in the form and Perl script get
from it only path to a file and file name.
How can script get the file from a local machine for the futher
processing?
Thanks,
Gleb globus@infonet.ee
------------------------------
Date: 28 May 1999 01:43:01 GMT
From: zenin@bawdycaste.org
Subject: Re: Perl "constructors"
Message-Id: <927855938.146713@localhost>
Kai Henningsen <kaih=7HeqSvbmw-B@khms.westfalen.de> wrote:
: zenin@bawdycaste.org wrote on 26.05.99 in <927740249.63564@localhost>:
:> John Porter <jdporter@min.net> wrote:
>snip<
:> : Hmm, I *thought* I threw Exception::Mine->new( @problems ),
:> : but what I caught was:
:> : [Wed May 26 09:49:26 1999] jamaica.cgi: Exception::Mine=HASH(0xc6e30) at
:> : ./jamaica.cgi line 102.
:>
:> You explicitly use a module who's primary, if not single purpose for
:> existing is to override die() and friends, and you're surprised when
:> you find it actually does?
:
: Besides, if you use some eval encapsulation like try, you can always
: locally reset the __DIE__ handler.
Or maybe handlers such as CGI::Carp should really be checking the
state of $^S before doing anything...
--
-Zenin (zenin@archive.rhps.org) Caffeine...for the mind.
Pizza......for the body.
Sushi......for the soul.
-- User Friendly
------------------------------
Date: 27 May 1999 20:06:54 -0700
From: Tom Christiansen <tchrist@mox.perl.com>
Subject: Re: scalar refs and m/(pat)/
Message-Id: <374dfa3e@cs.colorado.edu>
[courtesy cc of this posting mailed to cited author]
In comp.lang.perl.misc, Uri Guttman <uri@sysarch.com> writes:
:that makes little sense as $<num> variables are read only.
Those are what we call your basic "numbered variables", pardner.
--tom
--
There is always a better way.
-- Thomas Edison
------------------------------
Date: 27 May 1999 22:22:04 -0400
From: Uri Guttman <uri@sysarch.com>
Subject: Re: scalar refs and m/(pat)/
Message-Id: <x7vhdej5mb.fsf@home.sysarch.com>
>>>>> "RA" == Russ Allbery <rra@stanford.edu> writes:
RA> Uri Guttman <uri@sysarch.com> writes:
>> that makes little sense as $<num> variables are read only. so
>> returning a ref so you modify it would be wrong. IIR they are
>> actually pseudo vars (ala substr) which are not copies of the
>> grabbed strings but offsets and lengths which point into the
>> original string.
RA> That's his entire point. He wants to use that reference into the
RA> original string to modify the original string. I'm guessing
RA> there's no way to do that, though.
but the "numbered variables" (as tom would have me call them) are not
refering to the modified string in s/// either. they refer to the
original string which is floating in memory and not attached to a
variable anymore (the version modified by s/// is there now). so using
$1 to modify that original string also makes no sense. and with ilya's
new @+ and @- arrays, you can find the location of each grabbed string
and do a lvalue substr on that to modify after some groups are
matched with m//. so there is no need for $1 to be an lvalue.
uri
--
Uri Guttman ----------------- SYStems ARCHitecture and Software Engineering
uri@sysarch.com --------------------------- Perl, Internet, UNIX Consulting
Have Perl, Will Travel ----------------------------- http://www.sysarch.com
The Best Search Engine on the Net ------------- http://www.northernlight.com
------------------------------
Date: 27 May 1999 20:23:55 -0700
From: Tom Christiansen <tchrist@mox.perl.com>
Subject: Re: scalar refs and m/(pat)/
Message-Id: <374dfe3b@cs.colorado.edu>
[courtesy cc of this posting mailed to cited author]
In comp.lang.perl.misc,
Uri Guttman <uri@sysarch.com> writes:
:which i refered to in a different way. TIMTOWT say it.
ENOREFERED, webboy.
--tom
--
Pascal, n.:
A programming language named after a man who would turn over in
his grave if he knew about it.
------------------------------
Date: 27 May 1999 22:26:23 -0400
From: Uri Guttman <uri@sysarch.com>
Subject: Re: scalar refs and m/(pat)/
Message-Id: <x7so8ij5f4.fsf@home.sysarch.com>
>>>>> "TC" == Tom Christiansen <tchrist@mox.perl.com> writes:
TC> [courtesy cc of this posting mailed to cited author] In
TC> comp.lang.perl.misc, Uri Guttman <uri@sysarch.com> writes: :that
TC> makes little sense as $<num> variables are read only.
TC> Those are what we call your basic "numbered variables", pardner.
which i referred to in a different way. TIMTOWT say it.
^
spellchecking provided by tom c.
uri
--
Uri Guttman ----------------- SYStems ARCHitecture and Software Engineering
uri@sysarch.com --------------------------- Perl, Internet, UNIX Consulting
Have Perl, Will Travel ----------------------------- http://www.sysarch.com
The Best Search Engine on the Net ------------- http://www.northernlight.com
------------------------------
Date: Fri, 28 May 1999 02:08:33 GMT
From: wired2000@my-deja.com
Subject: Strip "http" from URL's
Message-Id: <7iktqv$m8u$1@nnrp1.deja.com>
Hi,
I've been trying to figure out a substitution string that will do the
following:
Given any URL such as:
http://www.whatever.com/whatever/ or
http://www.whatever.com/whatever or
http://whatever.com/whatever/ or
http://www.whatever.com/whatever/whatever.xxx or
http://www.whatever.com/
Will strip away everything after the actual website, so the output of
the above examples would be:
/whatever/
/whatever
/whatever/
/whatever/whatever.xxx
/
Any help would be appreciated. I have from Web Sockets Programming Perl
book how to do the opposite, or to take a relative URL and assemble it
to make an absolute, but I can't figure out the above.
Thanks
Charles
Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.
------------------------------
Date: Fri, 28 May 1999 02:42:20 GMT
From: jbell@263.net
Subject: two questions, pls help
Message-Id: <7ikvqb$njg$1@nnrp1.deja.com>
Hi, all,
I have two newbie questions:
1.
under unix(not during compilation), how do I change the default @ISA
library search paths?
2.my perl files can only run with the command "perl MyFile", how can I
make MyFile itself an excutable(without "perl" in front of it)?
Thanks alot!
________
JB
Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.
------------------------------
Date: Fri, 28 May 1999 08:52:59 +0700 (JAVT)
From: Hasanuddin Tamir <hasant@trabas.co.id>
To: comp.lang.perl.misc@list.deja.com
Subject: Re: Usin IF gives Internal Server Error??
Message-Id: <Pine.LNX.3.96.990528084443.25017B-100000@borg.intern.trabas.co.id>
On Fri, 21 May 1999, LEB wrote:
airman] Date: Fri, 21 May 1999 08:49:00 -0700
airman] From: LEB <airman@inreach.com>
airman] To: comp.lang.perl.misc@list.deja.com
airman] Subject: Usin IF gives Internal Server Error??
airman] Reply-To: comp.lang.perl.misc@list.deja.com
airman] Organization: InReach Internet
airman]
airman]
airman] IF ($mediaurl ne "") {
^^
????
Is this what you really wrote on your script?
IF this is the case, you may want to consider
to read the perlsyn manpage.
if NOT, well, I don't know what happenned when
you called &error() routine.
-hasan-
+================================================================+
Hasanuddin Tamir <hasant@trabas.co.id>
TRABAS Technical Dept. PT Meitraco Bahana Sejahtera
IT Solution Provider http://www.trabas.co.id/
Surya Sumantri Blok B1 No. 35 Phone: +62-22-216660
Setrasari Mall Bandung 40146 Fax : +62-22-2007633
+================================================================+
SORRY: I ignore most of attachments but plain text type
+================================================================+
"Though we are together in our hearts,
There will always be a long distance."
--Kimberly (Long Distance), afom
------------------------------
Date: Thu, 27 May 1999 21:27:02 -0400
From: Dipak Chowdhury <dipak@corning.com>
Subject: Re: Want to create a auto login script
Message-Id: <374DF0E6.99E755CD@corning.com>
Dear David:
Thanks for your time. Actually what I am trying is to run a windows
program called `netlog2 wfh' where wfh is an argument. It opens a window
with two slots to put username & password. My hope was to use Perl to fill
in those to slots with appropriate text, which means Perl will have to
mimic my typing in the keyboard. Hope this is a bit more detail for you to
think about it if you want.
Again, Thanks for your time. Best regards.
David Cassell wrote:
> Dipak Chowdhury wrote:
> >
> > Hi:
> > I would like to run a program that lets me loginto a system and
> > automatically provide username and password. Can I automate that with
> > Perl in NT 4.0 environment? If so, any example will be appreciated.
>
> Well, without more info, it sounds like you want to work with
> Net::Telnet, which will let you do just that. There are plenty
> of examples in the documentation that comes with the module.
>
> But be aware of some basic problems with telnetting in NT
> environments. Here's a quote straight from the Net::Telnet
> documentation that will tell you the two major ones:
>
> | By default, Windows machines don't come with a TELNET service.
> | However, third party TELNET servers can be acquired to provide
> | access to a DOS shell. As is all too familiar, many of these
> | servers are of inferior quality.
> | One particularly nasty problem is a server that sends ANSI
> | terminal escape sequences despite being told not to. These
> | escape sequences make your job of parsing the data much more
> | difficult. You can sometimes avoid this with a server that
> | prompts you for console mode. Choose no to console mode.
>
> Good luck,
> David
> --
> David Cassell, OAO cassell@mail.cor.epa.gov
> Senior computing specialist
> mathematical statistician
------------------------------
Date: Thu, 27 May 1999 18:36:46 -0700
From: Alex Guberman <alex@digi-q.com>
Subject: Web Based SpellChecker?
Message-Id: <374DF32E.5F4F@digi-q.com>
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?
All suggestions are appreciated!
Best regards,
Alex Guberman
---------------------
RussianLink.com
Phone: (888) 553-4447
Fax: (603) 908-1083
------------------------------
Date: 28 May 1999 02:45:25 GMT
From: damian@cs.monash.edu.au (Damian Conway)
Subject: Re: workarounds for prototypes
Message-Id: <7il005$sae$1@towncrier.cc.monash.edu.au>
Tom Christiansen <tchrist@mox.perl.com> writes:
>In comp.lang.perl.misc,
> Gareth Rees <garethr@cre.canon.co.uk> writes:
>:> a function that takes a Foo object and a Bar object as
>:> its two arguments
>:
>: use Class::Multimethods;
>: multimethod foo => qw(Foo Bar) => sub { ... }
>No, sir. That is not a prototype check! That's just a run-time
>hack.
What do you mean "just"?!
>If you don't check prototypes at compile-time, you aren't
>checking prototypes.
Tom's right. Class::Multimethods is polymorphic dispatch on steriods.
Hence, it's about dynamic typing, not static typing.
>And at this stage, it may remain an open topic whether Class::Multimethods
>pertains more to the solution set than it does to the problem set. :-)
You wait Tom. One day you'll need multiple dispatch and then you'll
be begging me to remove that line in &Class::Multimethods::import:
die ECURMUDGEON if $ENV{USER} eq "tchrist"
;-)
Damian
------------------------------
Date: Fri, 28 May 1999 01:12:09 GMT
From: finsol@ts.co.nz
Subject: Y2K infected Perl code
Message-Id: <7ikqh8$jv4$1@nnrp1.deja.com>
In article <374D5A6E.130B4377@atrieva.com>,
Jerome O'Neil <jeromeo@atrieva.com> wrote:
<SNIP>
>
> Please, show us your qualifications by posting some Y2K brokeness in
> CGI. Then, show us how we might fix it.
>
> Afterwards, I'm sure you will realize your gross incompetence, and go
> back to the human resources department where you belong.
>
You may have missed my posting today where I gave examples of Y2K broken
code, so I have included them below. These examples are in Perl but
similar examples can be found in Java and several other languages
frequently used for CGI programming. I targetted localtime in Perl as it
appears to be the most frequently found Y2K problem within CGI routines.
If Perl code can be infected with Y2K problems, then so can CGI routines
- deny that if you can!
http://www.hollycole.com/WWWboard/wwwboard.html
# get information
local($string) = @_;
($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) =
localtime(time);
# calculate useful values
$cent = ($year < 70) ? 20 : 19;
$lyear = $year + $cent*100;
http://www2s.biglobe.ne.jp/~j_okada/free_cgi/j_diary/regist.txt
if ($year > 97) { $year = "19$year"; }
else { $year = "20$year"; }
if (!open (DB, "$data_dir/$year$mon\.dat")) {
http://www.linguistic-funland.com/scripts/RemindMe/remindmecgi.txt
if($data{'Year'} eq "Not Selected"){
($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst)=localtime(time);
if($year !~ /0/){
$form_year = "19$year";
}
else{$year = "20$year";}
These examples only took 10 minutes to find on the internet using an
AltaVista advanced search on 'perl' and looking for 'localtime near 19
and localtime near 20'.
Try it sometime for a close view of programming in the real world. Try
it with 'getyear' as well for some Java and Javascript examples. Try it
with '19' and notice how many of these web pages have been created this
year. These programmers are still hard-coding 19 for the century in
1999!
These web pages are provided by their authors so that the code can be
copied and pasted into new or existing programs.
As for how to fix it - that's the easy part. The hardest part is
getting programmers to realise that there is a problem in the first
place. With all this denial from programmers such as yourself, it is
not surprising that many of us are still blissfully unaware that we may
have serious problems in our code.
For anyone interested in what the booby trap code problem is, check out
the following links.
http://www.y2kinfo.com/journal/features/0499_amona.html
http://www.y2kinfo.com/journal/features/0599_amon.html
Jocelyn Amon
--
Financial Solutions Limited
http://www.ts.co.nz/~finsol/
Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.
------------------------------
Date: Fri, 28 May 1999 01:50:40 GMT
From: elcore@sgi.net (Lane Core Jr.)
Subject: Re: Y2K infected Perl code
Message-Id: <374df537.1748092@news.sgi.net>
[to comp.lang.perl.misc,comp.software.year-2000]
On Fri, 28 May 1999 01:12:09 GMT, finsol@ts.co.nz wrote:
>As for how to fix it - that's the easy part. The hardest part is
>getting programmers to realise that there is a problem in the first
>place. With all this denial from programmers such as yourself, it is
>not surprising that many of us are still blissfully unaware that we may
>have serious problems in our code.
One of the biggest Y2K problems is that professionals have been more
interested in (1) denying that there is a Y2K problem within their
realm of expertise, or (2) doing quick-and-dirty research directed
more at demonstrating that there is no Y2K problem in their realm of
expertise than at determining whether or not there is a problem.
I believe that those attitudes largely account for the situation
described in "A Curious Shift in Y2K Compliance"
http://year2000.dci.com/Articles/9905263.htm.
---------------------------------------------------------------------------
Mr. Lane Core Jr. elcore@sgi.net http://users.sgi.net/~elcore/elc_y2k.htm
---------------------------------------------------------------------------
"More software projects have gone awry for lack of calendar time than for
all other causes combined". Frederick P. Brooks, _The Mythical Man-Month_
------------------------------
Date: 27 May 1999 22:47:28 -0400
From: Uri Guttman <uri@sysarch.com>
Subject: Re: Y2K infected Perl code
Message-Id: <x7ogj5kj0f.fsf@home.sysarch.com>
>>>>> "f" == finsol <finsol@ts.co.nz> writes:
f> You may have missed my posting today where I gave examples of Y2K broken
f> code, so I have included them below. These examples are in Perl but
f> similar examples can be found in Java and several other languages
f> frequently used for CGI programming. I targetted localtime in Perl as it
f> appears to be the most frequently found Y2K problem within CGI routines.
f> If Perl code can be infected with Y2K problems, then so can CGI routines
f> - deny that if you can!
you are a raving lunatic (to say it mildly). so fucking what if cgi
routines and perl routines can be infected with y2k. that is the
programmers problem and not the language's. and again as so many of us
have told you. CGI has NO Y2K PROBLEM!!!!! it can't as it is an api which
use NO DATE INFORMATION EVER!!!! get it? it CANNOT HAVE A Y2K PROBLEM
any more than a pencil could.
and also perl does not have a y2k problem either. bad perl programmers
who don't rtfm have the problem.
f> http://www.hollycole.com/WWWboard/wwwboard.html
f> http://www2s.biglobe.ne.jp/~j_okada/free_cgi/j_diary/regist.txt
f> http://www.linguistic-funland.com/scripts/RemindMe/remindmecgi.txt
f> These examples only took 10 minutes to find on the internet using an
f> AltaVista advanced search on 'perl' and looking for 'localtime near 19
f> and localtime near 20'.
and are they respected perl hackers or some wannabe's like matt and
selena who post broken code for fun and profit? we constantly slam most
public archives of perl scripts since they are so bad. i once looked for
a simple voting/poll script to use and i found a mess of them. not one
was written in any semblence of good perl style or even decent
programming. most copied the same broken cgi code from matt and kept
spreading that virus. i couldn't in browse any of code i found
without causing a major case of intestinal cramping.
f> These web pages are provided by their authors so that the code can be
f> copied and pasted into new or existing programs.
hey and their reader are idiots. there are hundreds of these sites
around. why don't you spend your extra free time and find those sites,
fix their y2k bugs and send the patched code to their authors. i am sure
they and the world will be so grateful to you that you will be awarded
the nobel prize in good deed doing.
f> As for how to fix it - that's the easy part. The hardest part is
f> getting programmers to realise that there is a problem in the first
f> place. With all this denial from programmers such as yourself, it is
f> not surprising that many of us are still blissfully unaware that we may
f> have serious problems in our code.
we (who is we?) don't deny anything abiot y2k. we just say we know how
to program around the issue correctly. the fact that many programmers
out there don't know how to do that is not our problem. we can't police
all perl hackers (what an interesting thought! knock! knock! who is
there? tom c. and i have come to remove perl from your pc as you have
been propogating bad coding style and you cut and pasted bad cgi parsing
code from matt). perl is free and open and any moron can try to destroy
the world with it. stick that in your didgereedoo and smoke it!
and remember 40 million frenchmen CAN be wrong. CGI is not a language
and IT CANNOT HAVE A Y2K PROBLEM!!! PERIOD!!!
(to my loyal fans out there, i apologize for the yelling if it hurts
your ears (eyes?). but i had to vent my anger at this kiwi fruit.)
uri
--
Uri Guttman ----------------- SYStems ARCHitecture and Software Engineering
uri@sysarch.com --------------------------- Perl, Internet, UNIX Consulting
Have Perl, Will Travel ----------------------------- http://www.sysarch.com
The Best Search Engine on the Net ------------- http://www.northernlight.com
------------------------------
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 5809
**************************************