[13374] in Perl-Users-Digest

home help back first fref pref prev next nref lref last post

Perl-Users Digest, Issue: 784 Volume: 9

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Mon Sep 13 21:07:47 1999

Date: Mon, 13 Sep 1999 18:05:09 -0700 (PDT)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)

Perl-Users Digest           Mon, 13 Sep 1999     Volume: 9 Number: 784

Today's topics:
    Re: another RE problem <agray@infoscience.otago.ac.nz>
    Re: Discussion: compiled perl program as shareware (Matthew Bloch)
    Re: Exact matching? (elephant)
    Re: File IO Question <dheera@usa.net>
    Re: Good databases for multi-variate timeseries data? (Abigail)
    Re: How to determine a file or folder on winNT (elephant)
    Re: How to know how many users are connected on a NT se (elephant)
    Re: Is anyone capable of explaining this?? (Larry Rosler)
    Re: Link CGI to microsoft Access <ccarr@websocket.com>
    Re: newbie: need help,LEARNING FROM A BOOK (Larry Rosler)
    Re: output of backticks <cassell@mail.cor.epa.gov>
        perl screen saver for UNIX terminals mizpoon@my-deja.com
    Re: Playing .au or .wav file? <blazer@mail.nevalink.ru>
    Re: POP3 module for WINDOWS32i86 (elephant)
    Re: Regular Expresions <agray@infoscience.otago.ac.nz>
    Re: Regular Expresions <agray@infoscience.otago.ac.nz>
    Re: running Perl files on Apache 1.3 running under Wind <cassell@mail.cor.epa.gov>
    Re: Searching by date problem. (Larry Rosler)
    Re: Searching by date problem. (Benjamin Franz)
    Re: Searching by date problem. (Sam Holden)
        Sort Multidimentional array? (Ryan Briggs)
    Re: Sort Multidimentional array? (Larry Rosler)
    Re: Statistics for comp.lang.perl.misc <cassell@mail.cor.epa.gov>
    Re: UNCRAP project proposal (Abigail)
    Re: UNCRAP project proposal (Abigail)
    Re: WHY??? <cassell@mail.cor.epa.gov>
        Digest Administrivia (Last modified: 1 Jul 99) (Perl-Users-Digest Admin)

----------------------------------------------------------------------

Date: 14 Sep 1999 13:04:29 +1200
From: Andrew Gray <agray@infoscience.otago.ac.nz>
Subject: Re: another RE problem
Message-Id: <uiu5efgma.fsf@infoscience.otago.ac.nz>

Michael Scheferhoff <m.scheferhoff@gmx.de> writes:
> is there a possibility to find out, how often a string matched?

see perlfaq 4, "How can I count the number of occurrences of a
substring within a string?"  You may wish to check the FAQs before
posting.  Browsing is highly recommended, but often a "perldoc -q
<keyword>" will turn up what you are looking for.  With a little luck
you can not only access them via perldoc but also in HTML which is
rather nicer to browse.

Cheers,
Andrew



------------------------------

Date: Mon, 13 Sep 1999 23:52:20 GMT
From: mattbee@eh.org (Matthew Bloch)
Subject: Re: Discussion: compiled perl program as shareware
Message-Id: <slrn7tr1ro.8fn.mattbee@soup-kitchen.demon.co.uk>

In article <XF7D3.7707$N77.619925@typ11.nn.bcandid.com>, Kragen Sitaker wrote:
>In article <37DB713A.59EF1C2E@hiz.de>, Werner Diwischek  <werner@hiz.de> wrote:
>>What do you think about it?!
>
>I used to like shareware, back before 1992, when I found the Internet.
>Now I realize:
>1. most software is crap;
>2. dealing with crappy software is painful;
>3. most good software is either proprietary commercial software or free 
>	software, although there is also a lot of crap software in both
>	of these categories;
>4. shareware has the worst of both worlds: developed as a hobby in somebody's
>	spare time, like free software, and only worked on by a small number
>	of people and not trustworthy, like proprietary software.
>5. almost no shareware authors make any money at it.

Agreed; a better approach is to do what I did with a bit of my software
for RISC OS.  It was released under the GPL but I encouraged 10ukp
donations to anyone who could afford it, found it useful and worth paying
for.  I got a few banknotes sent to me over the course of a year or so,
which was pleasant enough and made me continue developing it without
forcing the traditional Shareware sense of obligation onto anyone.  Most
regular Perl hackers, at the very least (I'd imagine), would compare a the
effort put into your shareware program with the effort put into (say) the
Linux kernel or the current perl interpreter (which are free) and conclude
that your program isn't worth paying for.  In short, better to give it
away and ask for donations from people who want to donate than doggedly
insist on payment, and risk making your program look like pretentious
rubbish.

-- 
Matthew       ( http://www.soup-kitchen.demon.co.uk/ )




------------------------------

Date: Tue, 14 Sep 1999 11:13:31 +1000
From: elephant@squirrelgroup.com (elephant)
Subject: Re: Exact matching?
Message-Id: <MPG.124830273b0651e3989cc4@news-server>

yes .. heaps of it

-- 
 jason - elephant@squirrelgroup.com -


------------------------------

Date: Mon, 13 Sep 1999 23:15:41 GMT
From: Dheera <dheera@usa.net>
Subject: Re: File IO Question
Message-Id: <7rk0ik$ehi$1@nnrp1.deja.com>

I copied your code and executed it and it worked fine. Are you sure you
have set the @input array properly:
i.e.      @input=("this","is","a","test");
and NOT   $input= ...
?


Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.


------------------------------

Date: 13 Sep 1999 19:37:55 -0500
From: abigail@delanet.com (Abigail)
Subject: Re: Good databases for multi-variate timeseries data?
Message-Id: <slrn7tr6c6.f00.abigail@alexandra.delanet.com>

holmberg@NoSpam.net (holmberg@NoSpam.net) wrote on MMCCIII September
MCMXCIII in <URL:news:37dba4dc.1565809@news.tiac.net>:
\\ 
\\ [Detailed description of what is being looked for]
\\ 
\\ So, I figured that there may be some databases out there that are specialized
\\ this kind of data (you might think of it as telemetry data).  I've seen


It would have helped if you wrote the detailed description of what
you need the first time, instead of the very broad requirements you
mentioned before. Furthermore, you might get a better answer in a group
with 'database' in its name, than here.



Abigail
-- 
perl -we 'print split /(?=(.*))/s => "Just another Perl Hacker\n";'


  -----------== Posted via Newsfeeds.Com, Uncensored Usenet News ==----------
   http://www.newsfeeds.com       The Largest Usenet Servers in the World!
------== Over 73,000 Newsgroups - Including  Dedicated  Binaries Servers ==-----


------------------------------

Date: Tue, 14 Sep 1999 11:20:42 +1000
From: elephant@squirrelgroup.com (elephant)
Subject: Re: How to determine a file or folder on winNT
Message-Id: <MPG.124831d74e82782c989cc5@news-server>

Jon writes ..
>Is there a way to determin whether an object is a file or a folder without
>using the -d $filename. This does not seem to work on winNT.

the -d function works fine on all Win32 platforms .. review your logic

-- 
 jason - elephant@squirrelgroup.com -


------------------------------

Date: Tue, 14 Sep 1999 11:08:00 +1000
From: elephant@squirrelgroup.com (elephant)
Subject: Re: How to know how many users are connected on a NT server
Message-Id: <MPG.12482edc32fe8a9f989cc3@news-server>

Vincent BEZARD writes ..
>I work on NT, and I like to know if there is a module (or command line) that
>can give me the number of connected users on my server.

have a look at Win32::AdminMisc from http://www.roth.net/ .. I don't 
know if it does this - but it is likely that it will

if it doesn't then something else on http://www.roth.net/ probably will

-- 
 jason - elephant@squirrelgroup.com -


------------------------------

Date: Mon, 13 Sep 1999 16:45:01 -0700
From: lr@hpl.hp.com (Larry Rosler)
Subject: Re: Is anyone capable of explaining this??
Message-Id: <MPG.12472c5a66bc997b989f57@nntp.hpl.hp.com>

In article <7rjtkb$cb2$1@nnrp1.deja.com> on Mon, 13 Sep 1999 22:25:28 
GMT, Amonotod <amonotod@netscape.net> says...
 ...
> Excuse me, I have not before seen "+<file" in an open statement...

Then you have not read the documentation for 'open', which one might 
consider a prerequisite for offering answers based on it.  This is from 
the second paragraph of that document:

You can put a '+' in front of the '>' or '<' to indicate that you want 
both read and write access to the file; thus '+<' is almost always 
preferred for read/write updates--the '+>' mode would clobber the file 
first.

 ...

> Actually, I realized that I did not get the parameters correct, and
> tried to stop the post.  But you know how http is... Even though you
> didn't get a response, that doesn't necessarily mean you didn't post.
> Anyway, I believe the other post was more correct.  If not, please do
> feel free to hack on me some more...

It seems the same to me.  I must admit that I didn't read it before.  
Why would one read a second 49-line article submitted one minute later 
than the first?

Most newsreaders have a 'Cancel Article' capability.  I assume you tried 
that and it didn't work.

 ...

> Another of your wanna-be-like-Larry-but-still-very-far-off perl posers,
> amonotod

Welcome to the club.

> --

A magic invisible space character after those two dashes would make my 
newsreader cut out the signature automatically, which is a Good Thing.

>     `\|||/                     amonotod@
>       (@@)                     netscape.net
>   ooO_(_)_Ooo________________________________
>   _____|_____|_____|_____|_____|_____|_____|_____|

Cute enough, and only four lines, which conforms to etiquette.

> Sent via Deja.com http://www.deja.com/
> Share what you know. Learn what you don't.

We can't hold you responsible for that absurdity, except for your poor 
choice of ISP.

-- 
(Just Another Larry) Rosler
Hewlett-Packard Laboratories
http://www.hpl.hp.com/personal/Larry_Rosler/
lr@hpl.hp.com


------------------------------

Date: Sat, 11 Sep 1999 23:17:04 -0500
From: Clinton Carr <ccarr@websocket.com>
To: andriani@singnet.com.sg
Subject: Re: Link CGI to microsoft Access
Message-Id: <37DB2940.AB6EDA70@websocket.com>

If you are searching for an UNIX to Wintel solution then I developed two
approaches.  One is an Internet database server (IDBS) and the other uses
an ASP page for database accesses.  Both options include a Perl object
that runs on the client, UNIX in this case, and handles the
communications and data transfers.

Let me know if you are interested.

Clinton

Andriani Siau wrote:

> anyone know how to retrieve and save data from microsoft access using
> perl.
> Thank you in advance.
>
> bye
> andriani



------------------------------

Date: Mon, 13 Sep 1999 17:05:57 -0700
From: lr@hpl.hp.com (Larry Rosler)
Subject: Re: newbie: need help,LEARNING FROM A BOOK
Message-Id: <MPG.124731413b339fa0989f58@nntp.hpl.hp.com>

In article <7rjnsk$4c2$1@gellyfish.btinternet.com> on 13 Sep 1999 
20:47:16 -0000, Jonathan Stowe <gellyfish@gellyfish.com> says...
> On Mon, 13 Sep 1999 18:13:44 GMT mikedel@ix.netcom.com wrote:
> > Here are other books that may help you on your perl journey. I have
> > found them invaluable references:
 ...
> Hmm it would do.  Except you posted Jeopardy style and worse you posted
> these associate links and that is considered to be in extremely poor taste in
> these parts.  For myself I would encourage the original poster to support
> his local bookstore - you know like out in meatspace there - but if online
> purchase is the only option then:
> 
> <http://www.amazon.com/exec/obidos/ASIN/1565922840>
> Learning Perl
> 
> <http://www.amazon.com/exec/obidos/ASIN/1565921496>
> Programming Perl (2nd Edition)
>  
> <http://www.amazon.com/exec/obidos/ASIN/1565922433>
> Perl Cookbook
> 
> Will do just fine.

So what did you do to divert the commissions to yourself?  Just dropping 
/productlink from each URL doesn't seem like much.  :-)

-- 
(Just Another Larry) Rosler
Hewlett-Packard Laboratories
http://www.hpl.hp.com/personal/Larry_Rosler/
lr@hpl.hp.com


------------------------------

Date: Mon, 13 Sep 1999 16:20:25 -0700
From: David Cassell <cassell@mail.cor.epa.gov>
Subject: Re: output of backticks
Message-Id: <37DD86B9.3C58666B@mail.cor.epa.gov>

Kragen Sitaker wrote:
> In article <7rjhab$2p1$1@nnrp1.deja.com>,  <smatta@acm.org> wrote:
[snip]
> >Essentially,  I am trying to count the non blank lines in $filename.
> 
> open F, "<$filename" or die "can't open $filename: $!";
> my $wcout = 0;
> while (<F>) { $wcout++ unless /^\s*$/ }
> close F;

Or, more succintly,

perl -lne "$x++ if !/^\s*$/;}{print $x" netlog.txt

on win32 boxen, and

perl -lne '$x++ if !/^\s*$/;}{print $x' netlog.txt

on unices.

This is a cute trick I learned by studying the nefarious works
of Abigail.  Note that I *should* have learned it by studying
the Perl internals, but...

David
-- 
David Cassell, OAO                     cassell@mail.cor.epa.gov
Senior computing specialist
mathematical statistician


------------------------------

Date: Mon, 13 Sep 1999 23:37:25 GMT
From: mizpoon@my-deja.com
Subject: perl screen saver for UNIX terminals
Message-Id: <7rk1rk$fel$1@nnrp1.deja.com>

i'm writing what is basically a screen saver for a VT100 terminal in
perl. I'm using Term::Cap to do this.

I'm nearly done. My main loop looks like this:

while ( ! defined(ReadKey(-1) ) {
    print_screen()
    sleep($delay)
}

I want to exit the loop if someone presses a key. This code works fine,
but you may need to wait until the end of the sleep command, for the
loop to exit. Does anyone have any ideas on how to exit the loop as
*soon* as there is a keystroke?

I had one idea, which is to implement my own version of sleep, which
would wake up every second, and poll for a keystroke. This works well,
but if I use ReadKey, it slurps in anything in STDIN. I'd rather
*check* to see if there is anything in the STDIN buffer, rather than
reading it. if that is possible.

Better still, are there any modules to do so? I checked on CPAN, but
with no luck.

please help me if you can. This kind of thing is easy with windows
event-driven libraries, but I can't figure out how to implement it on
UNIX


thanks,

mizpoon


Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.


------------------------------

Date: Tue, 14 Sep 1999 04:53:05 +0400
From: Mike Blazer <blazer@mail.nevalink.ru>
To: xdiv@hotmail.com
Subject: Re: Playing .au or .wav file?
Message-Id: <37DD9C71.EFDC986D@mail.nevalink.ru>

For .au files take a look at Nick Ing-Simmons' Audio-0.04 - it compiles on Win32.

xdiv@hotmail.com wrote:
> 
> Is there a module for playing a .au or .wav file from perl running on
> Win98?  (I'm using 5.005_03 build 518 from ActiveState).
> 
> Or, failing that, is there some freeware program that I can system()
> from my script to play the file?  (I tried "\Windows\Mplayer.exe /Play",
> but it leaves the Mplayer up after it plays the file.)
> 
> Thanks,
> 
> Adam
> 
> Sent via Deja.com http://www.deja.com/
> Share what you know. Learn what you don't.

-- 
==================================
Mike Blazer
blazer@mail.nevalink.ru
http://www.dux.ru/guest/fno/perl/
==================================


------------------------------

Date: Tue, 14 Sep 1999 10:47:08 +1000
From: elephant@squirrelgroup.com (elephant)
Subject: Re: POP3 module for WINDOWS32i86
Message-Id: <MPG.1247593114de0d07989cc2@news-server>

kik79@my-deja.com writes ..

>Does someone know if there is a POP3 interface
>module for windows 32 i86  already compiled?

assuming that you're using the ActiveState distribution (the standard 
for Win32) .. yes .. Mail::POP3Client is available via ppm

>Where could i find it?

ActiveState's ppm repository (look up ppm in the ActiveState help)

-- 
 jason - elephant@squirrelgroup.com -


------------------------------

Date: 14 Sep 1999 12:55:47 +1200
From: Andrew Gray <agray@infoscience.otago.ac.nz>
Subject: Re: Regular Expresions
Message-Id: <upuzmfh0s.fsf@infoscience.otago.ac.nz>

Michael Scheferhoff <m.scheferhoff@gmx.de> writes:
> I have:
> <1.part> <2.part> <...> <...> <last part>
> I need:
> <last part>
> including the brackets or without brackets.

Have a read of "perldoc prelre", especially the use of parentheses.
What you could do is match the end of the line, assuming that there is
nothing after the last '>' (if there is you could add another negated
expression before the $ or perhaps allow for white space characters).
I'm also assuming that '<' and '>' will not appear within the "parts".

#!usr/bin/perl -w
use strict;

my $string = '<1.part> <2.part> <...> <...> <last part>';
(my $wanted) = $string =~ /<([^>]+)>$/;
print $wanted."\n";

produces

last part

Cheers,
Andrew


------------------------------

Date: 14 Sep 1999 12:59:45 +1200
From: Andrew Gray <agray@infoscience.otago.ac.nz>
Subject: Re: Regular Expresions
Message-Id: <un1uqfgu6.fsf@infoscience.otago.ac.nz>

Jeff Pinyan <jeffp@crusoe.net> writes:
> On Sep 13, Rory C-L blah blah blah:
> > Sorry to be a bother, but could you point me to the modules in question?
> > The module 'long list' is rather awe-inspiring for a beginner.

Even if the list is indeed "awe-inspiring", browsing and searching are
still recommended.  How else will you ever learn what modules _are_
available?  CPAN offers search facilities if you have some idea of
what you are looking for.

Cheers,
Andrew


------------------------------

Date: Mon, 13 Sep 1999 16:08:33 -0700
From: David Cassell <cassell@mail.cor.epa.gov>
Subject: Re: running Perl files on Apache 1.3 running under Windows 95 ?
Message-Id: <37DD83F1.DCA6A42F@mail.cor.epa.gov>

Andrew Armstrong wrote:
[a reply accidentally placed above the post instead of after it, 
as normal people converse]
> Jonanthan Wrote: 
> >Have you read the section of the Win32 specific FAQ that comes with the
> >activestate Perl that discusses the configuration of various Web servers
> >to work with Perl.
> 
> Jon, where is this FAQ ?

If you have ActiveState Perl on your local PC or network
[as anyone even considering programming in Perl on win32 
certainly should], it is already local.  You can find it
by going to the Perl on-line docs on your Start Menu at the
bottom of your screen.

Otherwise, you can go to ActiveState's website 
[www.activestate.com , oddly enough] and read it there.

You'll find that most questions you might have are likely
to have been asked often enough to be included in the win32
Perl FAQ or the 'core' Perl FAQ.  And you'll find that the
'perldoc' program will let you search the FAQ for you, using
keywords.  A nice feature until you're ready to write your
own indexer.

HTH,
David
-- 
David Cassell, OAO                     cassell@mail.cor.epa.gov
Senior computing specialist
mathematical statistician


------------------------------

Date: Mon, 13 Sep 1999 16:19:08 -0700
From: lr@hpl.hp.com (Larry Rosler)
Subject: Re: Searching by date problem.
Message-Id: <MPG.1247264746c2eca7989f56@nntp.hpl.hp.com>

In article <7rjtf5$4ig$1@gellyfish.btinternet.com> on 13 Sep 1999 
22:22:29 -0000, Jonathan Stowe <gellyfish@gellyfish.com> says...
> On Mon, 13 Sep 1999 14:13:00 GMT Benjamin Franz wrote:
> > In article <MPG.12464835178f56b8989f44@nntp.hpl.hp.com>,
> > Larry Rosler <lr@hpl.hp.com> wrote:
> >>In article <P%%C3.761$814.51277@typhoon01.swbell.net> on Mon, 13 Sep 
> >>1999 05:32:31 GMT, Benjamin Franz <snowhare@long-lake.nihongo.org> 
> >>says...
> >>> In article <7rhpa7$ipm$1@m2.c2.telstra-mm.net.au>,
> >>> Adtec <adtec@vic.bigpond.net.au> wrote:
> >>...
> >>> >I'm asking the user to enter a date at the prompt, (dd/mm/yy)
> >>> 
> >>> I hope you meant dd/mm/yyyy....
> >>
> >>Why, he asked, naively but in all seriousness?

<SNIP> of useful discussion of the pros and (mostly) cons of forcing 
users to input four-digit years.

I'm glad that this thread has evolved this way.  I think there is an 
issue of the image of professional programmers involved here.

Explanatory anecdote:

When my previous employer (Bell Laboratories, reputedly a bastion of 
high tech), having assigned employee numbers sequentially and now 
running out of five-digit numbers, demanded that its employees 
henceforth prepend a zero to all uses of their employee numbers, I felt 
insulted as a programming professional.  The implication was that their 
IT staff, using COBOL or whatever vehicle, was unable to program their 
devices to accept five-digit or six-digit inputs and disambiguate them!

I never ever prepended the zero, and besides being branded as a kook and 
getting nasty looks from some cashiers and accounting clerks and such, I 
never saw any adverse effects of not doing so.

Nevertheless, the establishment thought it appropriate to demand that 
thousands of people change their habits to conform to their misperceived 
needs of the computer systems.

Although this issue might not have occurred to Benjamin Franz, I think 
that suggestions to reject two-digit year input for the huge majority of 
programs are misguided and injure our profession.  People have 'always' 
used two-digit years, and 'always' will continue to do so.

BTW, next year, which most people are calling 'two thousand', is better 
called 'twenty hundred' even though that is one syllable longer.  I 
never heard anyone say the year 1900 as 'one thousand nine hundred', and 
I don't see why this should be different.  

Advantages:

  Disambiguation from a common cardinal number.  Printed media still 
feel it necessary to refer to 'the year 2000', but this disambiguation 
can occur readily in speech.

  The succeeding year will naturally be called 'twenty oh one', etc. 
(same number of syllables as 'two thousand one', one fewer than 'two 
thousand and one') and input such as 1/1/01 ('one one oh one' or 
'January first, oh one') will be natural also.

Even the ISO 8601 standard will accept 010101 as the short form (YYMMDD, 
of course).  So let's not ask people to input 2001-01-01 or 01/01/2001 
(which is of course ambiguous per se, despite the four-digit year, as 
/J\ and I well know).

-- 
(Just Another Larry) Rosler
Hewlett-Packard Laboratories
http://www.hpl.hp.com/personal/Larry_Rosler/
lr@hpl.hp.com


------------------------------

Date: Tue, 14 Sep 1999 00:25:35 GMT
From: snowhare@long-lake.nihongo.org (Benjamin Franz)
Subject: Re: Searching by date problem.
Message-Id: <3CgD3.317$6i5.21591@typhoon01.swbell.net>

In article <MPG.1247264746c2eca7989f56@nntp.hpl.hp.com>,
Larry Rosler <lr@hpl.hp.com> wrote:
>
>Although this issue might not have occurred to Benjamin Franz, I think 
>that suggestions to reject two-digit year input for the huge majority of 
>programs are misguided and injure our profession.  People have 'always' 
>used two-digit years, and 'always' will continue to do so.

Welcome to the 'century bug'. Guess what happens in 2100 - one century
after everyone 'learns the lesson'. I would argue the opposite.
Thinking such as that above are why _billions_ of dollars are now
being spent to _fix_ the outcome of 'always' using two digit years.
And why a number of people are planning _not_ to take international
air flights on a certain night a few months from now. And I will
bet on it happening all over again (at even higher cost) in
a hundred years. Not counting the incremental cost of failures
spread over the next 50 years as various 'windowed fixes'
run out of their windows.

And I submit you have placed the cart before the horse. It was
the _programmers_ only providing room for two digits that resulted
in permanent records being made with only two digit years.
Legal and other permanent documents have 'always' used _four_
digit years - or even more verbose forms like 'The Year of Our
Lord nineteen hundred and twenty-five' (technically four digits,
but using ten words!). 

In those cases where shorter dates are apparently used, the four digit 
dates appear much like 'reference frames' in a compressed video - they 
appear _explicitly_ somewhere else to unambiguously frame the date.
And the text itself goes down to the _month_ and day. Thus I have
a ledger for _1998_. The entire ledger is _1998_. And the data within
says 'January', 'March' etc. With _no_ year immediately adjecent.

Unambiguous - and with four digit dates. 

>BTW, next year, which most people are calling 'two thousand', is better 
>called 'twenty hundred' even though that is one syllable longer.  I 
>never heard anyone say the year 1900 as 'one thousand nine hundred', and 
>I don't see why this should be different.  

Because 'twenty hundred' isn't a common name for the number 2000.

>Advantages:
>
>  Disambiguation from a common cardinal number.  Printed media still 
>feel it necessary to refer to 'the year 2000', but this disambiguation 
>can occur readily in speech.
>
>  The succeeding year will naturally be called 'twenty oh one', etc. 
>(same number of syllables as 'two thousand one', one fewer than 'two 
>thousand and one') and input such as 1/1/01 ('one one oh one' or 
>'January first, oh one') will be natural also.

Different issue. 'Spelled out' numbers live under different rules.
Notice that _even under those rules_ - twenty hundred isn't accepted.
It is 'twenty zero' or 'twenty aught' or even 'twenty double aught'.
And 2001 is much more likely to be called 'twenty one' in that system.

>Even the ISO 8601 standard will accept 010101 as the short form (YYMMDD, 
>of course).  So let's not ask people to input 2001-01-01 or 01/01/2001 
>(which is of course ambiguous per se, despite the four-digit year, as 

Let's leave the American perversion of out-of-sort-order dates aside.

These are all side points. The _right thing_ remains four digit years.
Two digit years and long term data processing are inherently incompatible.
If you want to argue against long term information processing - fine.

But once you accept that you are going to be storing and using information
for or covering long periods of time it becomes apparent that 2 digits
is not _and cannot be made_ adequate. Sliding windows and other sleight
of hand can't ultimately protect you against the _necessity_ to enter
four digit dates in the first place.  And greatly increase the final
costs of maintaining systems.

-- 
Benjamin Franz



------------------------------

Date: 14 Sep 1999 00:57:18 GMT
From: sholden@pgrad.cs.usyd.edu.au (Sam Holden)
Subject: Re: Searching by date problem.
Message-Id: <slrn7tr7ba.pi.sholden@pgrad.cs.usyd.edu.au>

On Tue, 14 Sep 1999 00:25:35 GMT, Benjamin Franz
	<snowhare@long-lake.nihongo.org> wrote:
>In article <MPG.1247264746c2eca7989f56@nntp.hpl.hp.com>,
>Larry Rosler <lr@hpl.hp.com> wrote:
>>
>>Although this issue might not have occurred to Benjamin Franz, I think 
>>that suggestions to reject two-digit year input for the huge majority of 
>>programs are misguided and injure our profession.  People have 'always' 
>>used two-digit years, and 'always' will continue to do so.
>
>Welcome to the 'century bug'. Guess what happens in 2100 - one century
>after everyone 'learns the lesson'. I would argue the opposite.
>Thinking such as that above are why _billions_ of dollars are now
>being spent to _fix_ the outcome of 'always' using two digit years.
>And why a number of people are planning _not_ to take international
>air flights on a certain night a few months from now. And I will
>bet on it happening all over again (at even higher cost) in
>a hundred years. Not counting the incremental cost of failures
>spread over the next 50 years as various 'windowed fixes'
>run out of their windows.

2100 can be represented at 30/5/00 perfectly assuming you have a reference
frame. You almost always do. When I fill out a cheque and write the date, I
obviously mean the date now, so when someone reads it they take the /99 to
be 1999. If someone looks at the cheque in 2100 they would assume it was
2099, except that the ink would have completely disapeared and the cheque would
have becomde invalid almost 100 years earlier and thus it wouldn't matter much.

If I say my sister was born in /76 then you should assume I mean 1976. Either
because she's probably around my age and I'm probably not over 120. Or because
if she was born in 1876 I would have said /1876 because /76 is just short-hand 
for 1976 (for the moment, in the future it will be shorthand for 2076).

>
>And I submit you have placed the cart before the horse. It was
>the _programmers_ only providing room for two digits that resulted
>in permanent records being made with only two digit years.
>Legal and other permanent documents have 'always' used _four_
>digit years - or even more verbose forms like 'The Year of Our
>Lord nineteen hundred and twenty-five' (technically four digits,
>but using ten words!). 

No one has claimed that storing dates with two digit years is good. That's not
the issue. There is a difference between storage and interface that you fail
to grasp. If somone enters 10/10/73 as their birthdate into a program the 
program should accept it and store their birthdate as 10/10/1973 (I'm ingoring
mm/dd vs. dd/mm confusions - locale should handle that)

>
>In those cases where shorter dates are apparently used, the four digit 
>dates appear much like 'reference frames' in a compressed video - they 
>appear _explicitly_ somewhere else to unambiguously frame the date.
>And the text itself goes down to the _month_ and day. Thus I have
>a ledger for _1998_. The entire ledger is _1998_. And the data within
>says 'January', 'March' etc. With _no_ year immediately adjecent.

That's right in a two digit date is the latest date that it could mean before
the current date for date inputs for past dates, and the closest date it could
mean after the current date for inputs for future dates.

I have never written a four digit year on a cheque I've filled out, or on
a deposit slip, or on my tax form. There is no need. 

>
>Unambiguous - and with four digit dates. 

Two digit years are unambiguous as well.

It lets computers do the work and people be lazy. This is the way it should
be. 10/10/73 is a valid date. It means 1973 not 2073, or 1873 or 0073. If I
wanted one of the other ones I would have written them out as above. 

Short-cuts are a good thing. They make interfaces easier to use. They make
poeple more efficient. They save money.

<snippage>

>These are all side points. The _right thing_ remains four digit years.
>Two digit years and long term data processing are inherently incompatible.
>If you want to argue against long term information processing - fine.

Two digit dates for data storage are evil. For data input though they are
exremely useful. That is how people write dates on a peice of paper, that's
how they should be able to enter dates into a computer. Of course four digit
dates are acceptable too, they should not be forced upon the user however.

If I enter 10/10/73 into my application it accepts it just fine, it converts
it to 10/10/1973 on the screen in front of me.	This is how it should be. There
is no problem caused by this.

Being able to use a two digit year just lets me enter dates faster and takes a
few more cpu cycles away from seti-at-home or whatever - the way computers
should work.

-- 
Sam

I took the initiative in creating the Internet. 
	--Al Gore


------------------------------

Date: Mon, 13 Sep 1999 23:39:59 GMT
From: nospam@nospam.com (Ryan Briggs)
Subject: Sort Multidimentional array?
Message-Id: <37dd8a75.109986029@news.speedchoice.com>

I have a multidimentional array, that is fed from a file like:

field1|field2|field3
field1|field2|field3

etc., and have the data stored in a multidimentional array so I can
access it via $items[0][1] and so on.  However I am having trouble
sorting the array based on one of the fields.  Ideally I would like to
sort it by field 3, which is a category, then by field 2, to sort the
items within the category, so it all outputs in order to a web page.

I've tried normal sort routines but the array remains unchanged and
just outputs the data in the order it was originally entered into the
flat file.

Any help would be appreciated,
Ryan


------------------------------

Date: Mon, 13 Sep 1999 17:42:03 -0700
From: lr@hpl.hp.com (Larry Rosler)
Subject: Re: Sort Multidimentional array?
Message-Id: <MPG.124739b9eb36d5a7989f59@nntp.hpl.hp.com>

In article <37dd8a75.109986029@news.speedchoice.com> on Mon, 13 Sep 1999 
23:39:59 GMT, Ryan Briggs <nospam@nospam.com> says...
> I have a multidimentional array, that is fed from a file like:
> 
> field1|field2|field3
> field1|field2|field3
> 
> etc., and have the data stored in a multidimentional array so I can
> access it via $items[0][1] and so on.  However I am having trouble
> sorting the array based on one of the fields.  Ideally I would like to
> sort it by field 3, which is a category, then by field 2, to sort the
> items within the category, so it all outputs in order to a web page.
> 
> I've tried normal sort routines but the array remains unchanged and
> just outputs the data in the order it was originally entered into the
> flat file.
> 
> Any help would be appreciated,

Search this newsgroup in www.deja.com for 'sort' as a keyword, with me 
as author if you wish.

It's not a bad idea to search Deja before posting in any case.  Or even 
to read the Perl documentation and FAQ. 

-- 
(Just Another Larry) Rosler
Hewlett-Packard Laboratories
http://www.hpl.hp.com/personal/Larry_Rosler/
lr@hpl.hp.com


------------------------------

Date: Mon, 13 Sep 1999 16:11:14 -0700
From: David Cassell <cassell@mail.cor.epa.gov>
Subject: Re: Statistics for comp.lang.perl.misc
Message-Id: <37DD8492.9FB3E376@mail.cor.epa.gov>

Jonathan Stowe wrote:
> 
> On Mon, 13 Sep 1999 17:24:55 GMT Kragen Sitaker wrote:
> > In article <7rj8ga$f70$1@info2.uah.edu>, Greg Bacon  <gbacon@cs.uah.edu> wrote:
> >>   69   107.0 ( 51.4/ 43.7/ 23.2)  Jonathan Stowe <gellyfish@gellyfish.com>
> >>   46    89.8 ( 32.9/ 47.5/ 31.8)  kragen@dnaco.net (Kragen Sitaker)
> >>   43    57.9 ( 26.6/ 27.6/ 16.6)  moseley@best.com (Bill Moseley)
> >>   42    74.3 ( 39.7/ 29.7/ 20.5)  Tom Phoenix <rootbeer@redcat.com>
> >>   35    55.1 ( 21.7/ 29.4/ 17.4)  lr@hpl.hp.com (Larry Rosler)
> >>   35    79.3 ( 40.6/ 23.3/ 21.8)  abigail@delanet.com
> >
> > Unbelievable.  I posted more than anybody except Jonathan Stowe! 

But only because I was on vacation.  :-)

> > Maybe I need to get a life.  :)

Funny, that's what I said the first time I topped the list.

> 
> Well you're not having mine OK ....
> 
> I'd recommend Mavis Beacon's Typing Tutor if your having trouble posting
> enough :)

<snort>

Nah, just do what the querents do.  Post the same message
three times.  See if Greg's autobot catches that.  :-)

David
-- 
David Cassell, OAO                     cassell@mail.cor.epa.gov
Senior computing specialist
mathematical statistician


------------------------------

Date: 13 Sep 1999 19:47:50 -0500
From: abigail@delanet.com (Abigail)
Subject: Re: UNCRAP project proposal
Message-Id: <slrn7tr6un.f00.abigail@alexandra.delanet.com>

Kai Henningsen (kaih=7OmpGtK1w-B@khms.westfalen.de) wrote on MMCCIV
September MCMXCIII in <URL:news:7OmpGtK1w-B@khms.westfalen.de>:
'' abigail@delanet.com (Abigail)  wrote on 12.09.99 in <slrn7tnq2a.e8k.abigail@alexandra.delanet.com>:
'' 
'' > Ken MacLeod (ken@bitsko.slc.ut.us) wrote on MMCCIII September MCMXCIII in
'' > <URL:news:m33dwkrqd9.fsf@biff.bitsko.slc.ut.us>:
'' > && "Alan J. Flavell" <flavell@mail.cern.ch> writes:
'' > &&
'' > && > but still the original assertion remains
'' > && > untouched.
'' > &&
'' > && My apologies, Alan.
'' > &&
'' > && Maybe you'd like to take a crack at explaining why requiring closing
'' > && tags in a version of HTML suddenly makes that version no longer HTML
'' > && when the HTML specifications and existing parsers both allow them and
'' > && assume that they are there if they are missing?
'' >
'' > Because that would invalidate hundreds of millions of documents out there.
'' 
'' And how many of those are valid today?
'' 
'' I know *I* validate my webpages. I know that Georg does. *No* other page  
'' I've ever tested has been valid.
'' 
'' Not one.
'' 
'' Now, obviously, I haven't tested every page. But given this record, valid  
'' pages must be an extremely small minority.

Your point being? It would still invalidate more pages than you will ever
validate.

'' > You could make a language that resembles Perl, but that requires you to
'' > always use parenthesis when calling functions. You could call it Perl,
'' > and programs written to that specification could be run by Perl, but it
'' > isn't Perl as it fails to run millions of valid Perl programs.
'' 
'' I think from a linguistic point of view, you'll find that you're wrong -  
'' it would still be Perl.
'' 
'' It's not that hard to prove, either. Say you take Perl, and take out some  
'' features - say, pseudo hashes, INIT, threads, (?<=, (?<!, \z, qr//,  
'' keyword overriding, stuff like that. By your reasoning, that would no  
'' longer be Perl, right?


Not the Perl as we know it now, right. It might resemble a previous Perl.
However, we weren't talking about taking away things from HTML that were
only present in the most recent version, but adding requirements that
have never been present in any version of HTML.

It would be like adding the requirement to Perl that all functions that
now operate on $_ if no argument is given, suddenly need to be called
with $_ as argument.

Would you still call it Perl if you no longer can do: if (/foo/) {..}, but
are required to write if ($_ =~ /foo/) {..}? Would you like it that programs
that have run since the days of perl4 without problem would suddenly stop
working when you upgrade Perl?

Would you think it's a useful requirement? Do you want to be a slave of
the computer?


[Followups set]

Abigail
-- 
perl -wleprint -eqq-@{[ -eqw\\- -eJust -eanother -ePerl -eHacker -e\\-]}-


  -----------== Posted via Newsfeeds.Com, Uncensored Usenet News ==----------
   http://www.newsfeeds.com       The Largest Usenet Servers in the World!
------== Over 73,000 Newsgroups - Including  Dedicated  Binaries Servers ==-----


------------------------------

Date: 13 Sep 1999 20:04:29 -0500
From: abigail@delanet.com (Abigail)
Subject: Re: UNCRAP project proposal
Message-Id: <slrn7tr7tv.f00.abigail@alexandra.delanet.com>

Uri Guttman (uri@sysarch.com) wrote on MMCCIV September MCMXCIII in
<URL:news:x7ogf6link.fsf@home.sysarch.com>:
== 
== sorry to disagree with you abigail,

Don't be silly. Don't apologize for disagreeing with me.

== the functions are very useful if you are processing a list of items
== (including other sub calls) which can't be nicely done in a here doc (i
== don't like to use the expression interpolation tricks). also it makes
== factoring some attributes over a list of items much easer, e.g. an
== alignment value can be applied to all columns of a table row without
== duplicating it for each column.

How many alignment values do you see in:

qq{<table>@{[map{qq{<tr>
          @{[map{qq{<td align="left">$_</td>}}@$_]}</tr>}}@table]}</table>};

Of course, real purists would use a style sheet anyway; one of its
benefits being no duplication of repetitive stuff. (As both with
CGI.pm and the have line, the 'align = "left"' attribute would be
repeated in the document.)

==                                 if it changes you only have one change
== to make. also using the html functions make sure you have correct html
== syntax and your script will break at the perl compile time which is
== easier to debug than waiting to see what the browser shows.

Eh? Hello? Did we just solve the halting problem? CGI.pm will determine
at *compile* time that the HTML you generate has the correct syntax?
AFAIK, there isn't any verfication build in in CGI.pm, and certainly not
at compile time.




Abigail
-- 
package Z;use overload'""'=>sub{$b++?Hacker:Another};
sub TIESCALAR{bless\my$y=>Z}sub FETCH{$a++?Perl:Just}
$,=$";my$x=tie+my$y=>Z;print$y,$x,$y,$x,"\n";#Abigail


  -----------== Posted via Newsfeeds.Com, Uncensored Usenet News ==----------
   http://www.newsfeeds.com       The Largest Usenet Servers in the World!
------== Over 73,000 Newsgroups - Including  Dedicated  Binaries Servers ==-----


------------------------------

Date: Mon, 13 Sep 1999 16:38:23 -0700
From: David Cassell <cassell@mail.cor.epa.gov>
To: David McKay <davidmck@earthlink.net>
Subject: Re: WHY???
Message-Id: <37DD8AEF.DCBCA23D@mail.cor.epa.gov>

[courtesy cc e-mailed to poster]

David McKay wrote:
> 
> Can someone that knows nothing about client/server on NT4 can develope a
> client/server app in C++ faster than in PERL?? 2 weeks screwing off endless
> hours trying to glue this piece of junk together in ActivePERL and then the
> same person sits down and has a first pass app. done in 2 hours in C++.
> 
> It has been extremely frustrating trying to put the pieces together in PERL
> to get this freaking thing together.  Reading piles of 'disconnected'
> documentation, examples that don't work, going through mind-numbing Perl
> newsgroups, and websites....argh!!  This is complete insanity.  PERL on
> Windows sux!
> 
> Flame my rump.  I need to be kicked while I'm down....

Why would I want to flame you?  It sounds like you've already 
had a bad enough experience.  Of course it is no fun being stuck
trying to make a mystifying collection of dweomers do what you
want.

But if it is possible to get a first-cut done in C++ in 2 hours,
then a good Perl programmer could probably do it in 15 minutes.
It is usually not a matter of handling the client/server issues
as much as it is a matter of knowing enough about Perl [and about
the Perl community] to know what to do and where to go.  Almost
any major task frequently done has modules already written and
posted at CPAN, so that you can avoid doing the hard parts.

In my personal experience, Perl for win32 has some important
limitations that are due to the underlying OS, but other than
those [which are all listed in the extensive documentation],
things work pretty well.  If you worked for 2 solid weeks and
couldn't get it working, then you may want to work on your
Perl [not PERL] skills first before tackling a similar problem
again.  If so, you might look at "Learning Perl for Win32
Systems" from O'Reilly.  Alternatively, I usually suggest
the following URL for true neophytes:
http://www.netcat.co.uk/rob/perl/win32perltut.html

If you really decide that Perl is just not your cup of
tea, then you might investigate Python, which is another
capable language.  I don't recommend your doing RAD using
C++ though...

David
-- 
David Cassell, OAO                     cassell@mail.cor.epa.gov
Senior computing specialist
mathematical statistician


------------------------------

Date: 1 Jul 99 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin) 
Subject: Digest Administrivia (Last modified: 1 Jul 99)
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" from
almanac@ruby.oce.orst.edu. The real FAQ, as it appeared last in the
newsgroup, can be retrieved with the request "send perl-users FAQ" from
almanac@ruby.oce.orst.edu. 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" from
almanac@ruby.oce.orst.edu. 

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 V9 Issue 784
*************************************


home help back first fref pref prev next nref lref last post