[12212] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 5812 Volume: 8

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Fri May 28 04:07:17 1999

Date: Fri, 28 May 99 01: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           Fri, 28 May 1999     Volume: 8 Number: 5812

Today's topics:
        [Fwd: Checking case of a variable]-Found Answer <info-spamstopper@animenet.com>
        directory file list into html conversion junsc@sysic.hei.co.kr
    Re: gettin a "file" argument in perl (ARNOD-PRIN Samuel)
    Re: Help explain @_ <ebohlman@netcom.com>
    Re: Help explain @_ (Dave Cross)
    Re: help <cassell@mail.cor.epa.gov>
        How the heck does mkdir work in PERL? <kal@valistech.com>
    Re: How the heck does mkdir work in PERL? <devans@radius-retail.kom>
        IPC on Win32? <pkotala@logis.cz>
        London.pm Meeting (Dave Cross)
    Re: Perl "constructors" armchair@my-deja.com
    Re: Perl "constructors" armchair@my-deja.com
    Re: perl script as an executable (Larry Rosler)
        Q:  use File::Copy; my  $my_dir = "C:/";chdir($my_dir)  <bakulin@eximb.kiev.ua>
        Question about date <nicolabo@prof.it>
    Re: Question about date <ebohlman@netcom.com>
    Re: why doesn't my first program work?? (ok , third or  <office@asc.nl>
    Re: Y2K infected Perl code (J. Moreno)
    Re: Y2K infected Perl code (Charles R. Thompson)
        Special: Digest Administrivia (Last modified: 12 Dec 98 (Perl-Users-Digest Admin)

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

Date: Fri, 28 May 1999 02:47:35 +0100
From: The Anime Network <info-spamstopper@animenet.com>
Subject: [Fwd: Checking case of a variable]-Found Answer
Message-Id: <780A83616B05D31196800020484025003FC515@SEUBPEBAS54>

This message is in MIME format. Since your mail reader does not understand
this format, some or all of this message may not be legible.

------_=_NextPart_000_01BEA8D7.74828B60
Content-Type: text/plain;
	charset="iso-8859-1"

Sorry for bothering the group, no sooner than I posted the message I
found the answer...

Thanks!


------_=_NextPart_000_01BEA8D7.74828B60
Content-Type: message/rfc822

Newsgroups: comp.lang.perl.misc
From: The Anime Network <info-spamstopper@animenet.com>
Subject: Checking case of a variable
Message-ID: <374DF255.C1CB51F7@animenet.com>
Sender: The Anime Network <info-spamstopper@animenet.com>
Reply-To: info-spamstopper@animenet.com
Date: Fri, 28 May 1999 02:33:09 +0100
MIME-Version: 1.0
Lines: 11
X-Newsreader: Microsoft (R) Exchange Internet News Service Version 5.5.2448.0
Content-Type: text/plain

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


------_=_NextPart_000_01BEA8D7.74828B60--



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

Date: Fri, 28 May 1999 06:53:25 GMT
From: junsc@sysic.hei.co.kr
Subject: directory file list into html conversion
Message-Id: <7ileh4$13r$1@nnrp1.deja.com>

Hi, All

Our intranet web server administrator has forbidden plain directory
browsing by the web browser.

I have quite large directory hierarchy structure that are full of
document and reference files and I want to avoid making index file in
each directory manually. Is there any easy way to convert file structure
in a directory into html index file?

Utility or Workaround in server are welcomed.

Thanks in advance.

Sungchun


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


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

Date: Fri, 28 May 1999 07:42:21 GMT
From: samfra@mygale.org (ARNOD-PRIN Samuel)
Subject: Re: gettin a "file" argument in perl
Message-Id: <374e486f.157244438@miage.univ-lyon1.fr>

On Wed, 26 May 1999 14:59:39 +0200, Olivier Maas
<olivier.maas@at-lci.com> wrote:

>Hello,
>I am trying to get a file from a form,
>I use the
><INPUT NAME="FichierATraiter" TYPE="FILE" VALUE="">
>syntax, but when trying to get this file (or file handle?) to a perl
>script for further treatment, but when I use
>$FichAT=CGI::param(FichierATraiter);
>and try to print $FichAT ... nothing
>the same with @FichAT
>
>Any clues, or place to get doc on howto?
>thank for any answer...
>if you could send a copy of your reply to
>maas@ensae.fr, it would be appreciated...
>olivier
>
>
>
>

<form action="yourscript.pl" method=post
ENCTYPE="multipart/form-data">

try to put this first in your html code...

then watch STDIN to see how it comes..



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

Date: Fri, 28 May 1999 06:05:10 GMT
From: Eric Bohlman <ebohlman@netcom.com>
Subject: Re: Help explain @_
Message-Id: <ebohlmanFCFI8M.2B6@netcom.com>

John Lathrop <lathropj@elite.net> wrote:
: I am new to perl and I was trying to understand how and what is passed
: to a subroutine.  This is some code I was experimenting with:

: my $N;
: $N = <STDIN>;
: chomp($N);
: &fib($N);

: sub fib
: {
: 	my ($n, $fn2) = @_;

This takes place in list context, so it copies the first element of @_ 
into $n and the second (which is, in this case, undefined) element into $fn2.

: 	my $fn3 = @_;

This takes place in scalar context, so it assigns the number of elements 
(1, in this case) in @_ to $fn3.

: 	my $fn4 = scalar(@_);

This does the exact same thing (other than assigning the result to a 
different variable) as the previous statement.  The fact that you're 
assigning to a scalar variable forces the assignment into scalar context, 
so the use of scalar() is redundant.

: 	my $fn5 = $_;

$_ has never been set to anything, so this sets $fn5 to undef.  $_ and @_ are
*completely separate* variables.

: 	my $fn6 = $_[0];

Sets $fn6 to the first element of @_.  Although a beginner might think 
that the variable $_ is somehow involved here, it just plain isn't.  $_ 
is a scalar, so its name can't be followed by a subscripting bracket.  
Therefore perl can tell that "$_" here really means "one of the elements 
of @_".


: 	my $fn7 = $_[1];

Same as above, except sets $fn7 to the second element of @_.

: 	my ($fn) = @_;

This forces the assignment into list context, copying everything from one 
list (@_) to another ($fn).  Since the destination list is shorter than 
the source list, not all the elements are copied.

This sort of construct can get you in trouble if you aren't careful:

my $line=<FILE>;

reads one line from a file into $line.  But:

my ($line)=<FILE>;

reads *every* line from the file into a temporary list (because the input
operator is being called in list context) and then assigns the *first*
line to $line, throwing away the rest.  If you try to read from the file
again, you'll get nothing. 



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

Date: Fri, 28 May 1999 06:28:34 GMT
From: dave@dave.org.uk (Dave Cross)
Subject: Re: Help explain @_
Message-Id: <374e36cf.1627941@news.demon.co.uk>

On Fri, 28 May 1999 05:30:14 GMT, lathropj@elite.net (John Lathrop)
wrote:

>I am new to perl and I was trying to understand how and what is passed
>to a subroutine.  This is some code I was experimenting with:
>
>my $N;
>$N = <STDIN>;
>chomp($N);
>&fib($N);
>
>sub fib
>{
>	my ($n, $fn2) = @_;
>	my $fn3 = @_;
>	my $fn4 = scalar(@_);
>	my $fn5 = $_;
>	my $fn6 = $_[0];
>	my $fn7 = $_[1];
>	my ($fn) = @_;
>
>etc...
>
>The value of $n = 5 is what I entered at the command line.  The
>resulting values were as follows:
>
>$n: 5
>$fn: 5
>$fn2: 
>$fn3: 1
>$fn4: 1
>$fn5: 
>$fn6: 5
>$fn7: 
>
>
>My real confusion is with the value of $fn3.  I expected $fn3=5.  Can
>anyone help to explain this?

The lines 

my $fn3 = @_;

and

my $fn4 = scalar(@_);

are doing the same thing. In both cases you are evaluating an array in
a scalar context. This always returns the length of the array (in this
case 1).

You should reread 'perldoc perldata' to refresh your understanding of
context.

hth,

Dave...


--
Dave Cross <dave@dave.org.uk>
<http://www.dave.org.uk>


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

Date: Thu, 27 May 1999 23:05:45 -0700
From: David Cassell <cassell@mail.cor.epa.gov>
To: Wilbur <wilbur@hknet.com>
Subject: Re: help
Message-Id: <374E3239.BE35F233@mail.cor.epa.gov>

Wilbur wrote:
> 
> Dear friends,
> 
> hi!  I got a problem.  I download a activeperl run in win98 with dos
> windows. I don't know how to start writing.

Okay, I'm going to assume that you already followed the directions
and double-clicked on the downloaded file, and thus got ActiveState
Perl to install itself for you.  And that you let it do its job.

Then you have an HTML tree in your perl directory which has a
shortcut placed in your Start menu.  Click on that shortcut
and you'll get your preferred browser up, with the index page
showing.  Now read the pages, starting with the ones at the
top of the left-hand frame.

But this information, for the most part, assumes you already
know how to 'start writing'.  Here's what you want to do.

[1] Pick an ordinary text editor you like.  Notepad or Wordpad
will do.  Perl is a'scripting' language, so you don't need
a special write-compile-link-run-debug thingy like you need
for, say, C.
[2] Type a simple program for starters.  You can use this
one if you want:

#!perl -w
use strict;
use diagnostics;
# the above lines are there to help you with your 
# programming and to catch embarrassing mistakes
my $scalar = 'Hello';
my @array = ('w','o','r','l','d');
print $scalar, ' ', @array, "\n";

Then save it as howdy1.pl .
[3] Go to the command prompt (MS-DOS) window and type:
perl howdy1.pl
[4] You've done it!  A working Perl program.  Congrats.

To learn more, you'll probably want to read one of the
'starter' sort of tutorials, which don't assume any
programming experience.  Perhaps
http://www.netcat.co.uk/rob/perl/win32perltut.html

And if you want to use Perl to enhance your CGI scripts,
you'll need to learn how to run Perl on your webserver
of choice (there's info on this in the HTML pages I
mentioned above, but you may have to talk to your ISP
or go to a newsgroup dedicated to your particular
server.  Then you'll want to read in the HTML pages how
to use the PPM program to download things, like the
CGI.pm module which will make your weblife a lot easier.

If you have any questions, you'll want to look in the
pages which have 'faq' in their names, as they have the
answers to the Frequently Asked Questions already on
your hard disk, so you don't have to waste days waiting
for some expert to talk to you here.

And finally: read the e-mail you get from gnat, and
pay careful attention to everything in it.  There's
a wealth of info in there, and the experts in this
newsgroup expect posters to 'do their homework' before
posting.

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


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

Date: Fri, 28 May 1999 00:31:05 -0700
From: "kal@valistech.com" <kal@valistech.com>
Subject: How the heck does mkdir work in PERL?
Message-Id: <374E4639.378C0DEE@valistech.com>

I'm trying to automate downlaod of text files from one system to another

using a script that utilizes Net:FTP.
The script uses mkdir on the local machine (where it's running) to copy
or
mirror the romote machine. If the dir is new, it's created, but the
attributes are
screwed up. I use

mkdir SOMEFILE, 755

I get 001 ??? The damn dir is only readable to the world?

If I resolve this problam manually, the ftp'd files are created with
size 0.
What am I doing wrong?

I run the process as myself (no web server involved)
I'm running Redhat 5.2, Perl 5.004.



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

Date: Fri, 28 May 1999 08:46:08 +0100
From: "Dave Evans" <devans@radius-retail.kom>
Subject: Re: How the heck does mkdir work in PERL?
Message-Id: <374e460a.0@nntp.mmi.org>

[mailed+posted]

You need to use:

mkdir whatever, 0755

Octal numbers, such as those used as the permissions in "mkdir", begin with
a zero, as in C.

kal@valistech.com wrote in message <374E4639.378C0DEE@valistech.com>...
>I'm trying to automate downlaod of text files from one system to another
>
>using a script that utilizes Net:FTP.
>The script uses mkdir on the local machine (where it's running) to copy
>or
>mirror the romote machine. If the dir is new, it's created, but the
>attributes are
>screwed up. I use
>
>mkdir SOMEFILE, 755
>
>I get 001 ??? The damn dir is only readable to the world?
>
>If I resolve this problam manually, the ftp'd files are created with
>size 0.
>What am I doing wrong?
>
>I run the process as myself (no web server involved)
>I'm running Redhat 5.2, Perl 5.004.
>
>



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

Date: Fri, 28 May 1999 09:15:57 +0200
From: "Pavel Kotala" <pkotala@logis.cz>
Subject: IPC on Win32?
Message-Id: <927872287.662026@gate.logis.cz>

Which are methods of inter process communication on Win32 (better, then
primitive file-communication) written in eg. C++, VB, Delphi? And which Perl
module or standard function supports them?

Thank You

Pavel Kotala





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

Date: Fri, 28 May 1999 06:36:43 GMT
From: dave@dave.org.uk (Dave Cross)
Subject: London.pm Meeting
Message-Id: <378e3972.2303486@news.demon.co.uk>

June's meeting of the London Perl M[ou]ngers will be next Thursday
(June 3rd). As usual we'll be meeting in the downstairs bar of
Penderel's Oak on High Holborn at about 6:30pm. Some of us may be
drinking Thirsty Camel. Most of us will be drinking beer.

Special Events For The June Meeting

1/ The results of Dave, Greg and Dave's "let's think up the stupidest
set of rules to a Perl programming competition possible whilst heavily
underthe influence of alcohol" competition (assuming, of course, that
anyone bothered to enter).

2/ The first Perl Monger hats to go on sale anywhere in Europe. Just
seven and a half of your Earth pounds.

Anyone vaguely connected with Perl who lives, works or (on the night)
can be in London will be made very welcome.

Dave...

p.s. I *really* don't know why I'm advertising this, but photos of
previous meetings can be found on our web site at
<http://london.pm.org>

--
Dave Cross <dave@dave.org.uk>
<http://www.dave.org.uk>


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

Date: Fri, 28 May 1999 06:35:04 GMT
From: armchair@my-deja.com
Subject: Re: Perl "constructors"
Message-Id: <7ildep$dj$1@nnrp1.deja.com>

In article <slrn7khv24.b8g.sholden@pgrad.cs.usyd.edu.au>,
  sholden@cs.usyd.edu.au wrote:
> On Mon, 24 May 1999 05:11:36 GMT, armchair@my-dejanews.com wrote:
> >In article <slrn7kh4dk.6qs.sholden@pgrad.cs.usyd.edu.au>,
> >  sholden@cs.usyd.edu.au wrote:
> >> On Sun, 23 May 1999 16:41:48 GMT, armchair@my-dejanews.com wrote:
> >> >
> >> >I did a wc the other day and I am up to 2000 lines
> >> > (counting comments
> >> >and blanks and { } etc., of Perl. If it wasn't for this
> >> > thread I would
> >> >be well over a 100,000 by now!
> >>
> >> So without this thread you would have written code an
> >> order of magnitude
> >> or so faster than any measurement of programming rates I
> >> have ever seen.
> >> Do you test your code? Do you cut and paste or something to
> >> increase your
> >> lines of code / day? Or do you make numbers up?
> >
> >Are your programming metrics based on international data, or just
> >figures gathered in Australia? Don't forget that America is taking in
> >hundreds of thousands of young A grade average programming
> >  students from
> >Asia each year. Not to mention James Gosling, Linus Torvalds
> > and Bjarne
> >Stroustrup. It's really competitive over here - I'm actually one
> > of the
> >slow ones. But despite advancing age, I have used my
> > resourcefulness to
> >raise my lines of code (LOC) output threefold recently. Since
> > you're an
> >ocean away and not a threat, I can let you in on a part of my new
> >technique:
>
> The old data I have is for American programmers...
>
> In 1969 John Harr from Bell Labs reported coding rates of
> 500-2300 words/year
> for the average programmer. That is finished code though, and
> doesn't count
> code written that was not used in the final product.
>
> Data from OS/360 at IBM gave productivities in the range of
> 6-800 debugged
> instructions per year perl person for control program code.
> For language
> translation code the rate was 2-300 debugged instructions.
>
> For non-assembly programming there is MIT's data on MULTICS with
> gives 1200
> lines of debugged PL/I statements per year per person. Note this
> is in the
> same ball-park as Harr's results for assembler except it is
> lines not words.
>
> As for linux, I just downloaded kernel 2.2.3 and ran the command
> wc -l `{find . -name '*.c'} #excuse the shell syntax....
> Giving :
>
> 1399646 total
>
> So 1.4 million lines of code
>
> grepping for ^N:' in the CREDITS file gives about 280 names.
>
> Linux was released in 1991 so it has been written over 8 years.
>
> So we have a rate of 175000 lines of code per year.
>
> But it has not been written by one person it has been written
> by 280 people.

Here's where I think you tripped up in your calculations. Linux was
written over a period of 8 years, but most of it was written by one
fellow. No need to include all his pizza buddies and hangers on. And I
happen to know that he has been resting on his laurels for quite a few
years now. Like most great talents, his output was far from constant.
The last few years has found him watching more Nick at Night than
coding. My estimates are that he wrote 70% of the 1.4 million lines of
code in in first two years, and 50% in the first year. That would be a
first year rate of 700K per year. But that is debugged and tested and
kept code, versus all code, whether used or usable or not. I am just
talking about any old Perl code I would write to learn a concept, which
comes out a much faster rate. Were it to be fully usable and marketable
Perl code, I would estimate my rate at 20,000 per 10 day period which is
very close to what Torvalds was putting out back in that first year,
when he had the excitement of starting out.

As far as those other studies, apparently they are including various
testers, managers, staff relatives and HR types in the coding headcount.
That really lowers the numbers.



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


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

Date: Fri, 28 May 1999 06:43:06 GMT
From: armchair@my-deja.com
Subject: Re: Perl "constructors"
Message-Id: <7ildtr$nv$1@nnrp1.deja.com>

In article <7ibtsd$5qk$1@nnrp1.deja.com>,
  John Porter <jdporter@min.net> wrote:
> In article <7i5e9d$76$1@nnrp1.deja.com>,
>   armchair@my-dejanews.com wrote:
> > In article <7i46he$5cc$1@nnrp1.deja.com>,
> >   John Porter <jdporter@min.net> wrote:
> > > In article <7hu1qs$o54$1@nnrp1.deja.com>,
> > >   armchair@my-dejanews.com wrote:
> > > > > > Or perhaps I have done something that most Perl programmers
> > > > > > have not:
> > > > > > had to modify other people's code.
> > >
> > > Perhaps.  Or more likely, you need to get out more, and take
> > > a look around.
> > >
> > > Last project I was on, I had to maintain/enhance a 10,000-line
> > > system, on which at least five people had worked before me.
> > > 100% Perl.
> >

>
> > But since you are, give me the percentage breakdown
> > on how Perl is being used (CGI-BIN, database scripts, sysadmin
> > functions) and what percentage of their time Perl programmers are
> > maintaing the code of others? And what is a typical size for a Perl
> > program? How many people are using objects
> > exstensively? inheritance?
> > Is
> > the stuff on CPAN getting good usage at each site?
>
> Sorry, I don't know what the real numbers are.
> But I do know that your guess about what "most Perl programmers"
> have done was really arrogant.

Without real numbers how could you know? Are we to go on your last
project as evidence of what most Perl programmers are doing? And what of
your CPAN code usage and that of the five programmer who preceded you on
your last project?


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


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

Date: Thu, 27 May 1999 23:11:36 -0700
From: lr@hpl.hp.com (Larry Rosler)
Subject: Re: perl script as an executable
Message-Id: <MPG.11b7d36353312eee989b1c@nntp.hpl.hp.com>

[Posted and a courtesy copy mailed.]

In article <374e2971.91109889@news.aurum.net.au> on Fri, 28 May 1999 
05:32:49 GMT, Steve Vertigan <vertigan@bigfoot.com> says...
> Tom Christiansen <tchrist@mox.perl.com> wrote thus:
> >In comp.lang.perl.misc, therzog@knotech.com (Tim Herzog) writes:
> >:   read STDIN, $_, $ENV{'CONTENT_LENGTH'};
> >
> >That code is evil and wrong.  You are, in effect, recreating
> >a broken wheel.
> 
> Could someone tell me why this is evil and wrong?  I've been using a
> parse_form routine derived from this for a while now and haven't had
> problems to my knowledge.  If possible I would rather just fix my code than
> using a module as it's part of a larger library I've grown accustomed to
> using.

No need to use a module -- just use sound coding practices.

   read(STDIN, $_, $ENV{CONTENT_LENGTH}) == $ENV{CONTENT_LENGTH} or
       die "Didn't read $ENV{CONTENT_LENGTH} bytes from STDIN. $!\n";

General principle:  *Always* check the success of system calls.

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


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

Date: Fri, 28 May 1999 08:21:14 +0300
From: "Boris Bakulin" <bakulin@eximb.kiev.ua>
Subject: Q:  use File::Copy; my  $my_dir = "C:/";chdir($my_dir) || die "Can't change directory! $!"; From Unix I want to read DOS directory
Message-Id: <2.07b3.QEEH.FCFG7E@eximb.kiev.ua>

I read FAQ but didn't find answer

If anybody can help ,please

Boris



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

Date: Thu, 27 May 1999 15:11:46 +0200
From: "Nicola" <nicolabo@prof.it>
Subject: Question about date
Message-Id: <7ijgck$pli$1@serv1.iunet.it>

I use the following code to obtain the current date on my server:

   $tempo = time;          # Time in seconds from 1 Jan. 1970 on server
   ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime
($tempo);

I'd want to know:
Can this to create problems with the year 2000 ?

Thank you.
Nicola




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

Date: Fri, 28 May 1999 07:45:31 GMT
From: Eric Bohlman <ebohlman@netcom.com>
Subject: Re: Question about date
Message-Id: <ebohlmanFCFMvv.7Hv@netcom.com>

Nicola <nicolabo@prof.it> wrote:
: I use the following code to obtain the current date on my server:

:    $tempo = time;          # Time in seconds from 1 Jan. 1970 on server
:    ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime
: ($tempo);

: I'd want to know:
: Can this to create problems with the year 2000 ?

Not by itself.  Just don't do anything stupid with $year.  The best way
not to do anything stupid with $year is to read *and believe* the
documentation for localtime(), which you can do with a simple "perldoc -f
localtime". 



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

Date: Fri, 28 May 1999 08:44:08 +0200
From: "Bastiaan S van den Berg" <office@asc.nl>
Subject: Re: why doesn't my first program work?? (ok , third or something)
Message-Id: <7ile24$sr2$1@zonnetje.NL.net>

hehe , this is cewl :)

well , i personnally hate it when you look up a keyword (like seek()) in the
perlbook.pdf and find out it's full synopsis with all kinds of weird
parameters..

the only help files that ever really helped me were the qb 4.5 helpfile and
some visual basic help files

they were the only ones that were written in good plain english and had
descriptive hyperlinks to details and examples and stuff

when i browse through the perlbook.pdf , i feel like there's a 1500 page
book laying on my lap , and i need to find that one page without ctrl+f :)

well , cul8r guys

tnx for some constructive help , at least 1 tip from this whole thread was
really worthwhile..

buZz



Tom Christiansen heeft geschreven in bericht <374d4467@cs.colorado.edu>...
>     [courtesy cc of this posting mailed to cited author]
>
>In comp.lang.perl.misc, therzog@knotech.com (Tim Herzog) writes:
>:The volume of perl documentation doesn't mean that
>:the language is accessible.  Quite the contrary.
>
>I guess you'd say the same thing about the Oxford English Dictionary,
>the Encyclopaedia Britannnica, Tolstoy's War and Peace, Thoreau's
>Walden, Bach's Bm Mass, Mendelssohn's Midsummer Night's Dream, or
>Mozart's Requiem.
>
>Too many words.  Too many notes.
>
>Too much documentation.  Oh good.  Let's delete most of it then.
>Nominations please?  I'm in a position to fix this problem.  Please
>tell me which man pages I should delete.  I'm sure people will
>benefit greatly from knowing less.  Ignorance has always helped
>in the past.
>
>--tom
>--
>"Software engineering phase plans are something you make so your manager
>can explain to his manager how things are going"
>    --Rob Pike (On the subject of managerial "bullshit")




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

Date: Fri, 28 May 1999 02:16:03 -0400
From: planb@newsreaders.com (J. Moreno)
Subject: Re: Y2K infected Perl code
Message-Id: <1dshrps.hr100j1i8dto6N@roxboro0-0059.dyn.interpath.net>

<finsol@ts.co.nz> wrote:

> 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
-snip-

The key is "CGI programming" not "programming in CGI" -- what is being
requested of you is for you to program in "CGI" and show a Y2K problem.

Not, repeat NOT, use perl, c, pascal, java, smalltalk, applescript,
effiel, lisp, or any other language to write a cgi *program* that has a
Y2K problem.

Programming is incredibly detail oriented, and this isn't a small or
unimportant detail.  I wrote in another post that people "think" there
is a Y2K problem in perl because their brain shuts down when seeing a
year value using 2 digits.  Your site has a similar problem -- it has
stupid, blindly obvious mistakes; people see these mistakes and they
stop reading for information and blow you off as an idiot, just as if
you'd said "green peas vegetables have a Y2K boobytrap".

So, on <http://www.y2kinfo.com/journal/features/0499_amona.html> (please
include the brackets next time), you should /remove/ "CGI" from the
line:

Perl, MacPerl, CGI using localtime

In fact what you should do is rewrite that as:

Perl (all implementations including MacPerl and ActivePerl) using
localtime

I would also suggest not referring to it as a "booby-trap", because
while that is accurate (it only catches the boobies), it's a bit
insulting.  Instead you should say there is a potential "gotcha" with
localtime (javascripts inconsistent usage on the other hand sounds like
a real problem -- if what you are saying is accurate, which based upon
your calling "CGI" a programming language I'm not willing to stipulate).

With these and a few other changes that page could be marginally useful
-- it doesn't really say much that is applicable to an experienced
programmer (they will be aware of the issues surrounding their
languages), but its not a bad introduction to the neophyte.

-- 
John Moreno


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

Date: Fri, 28 May 1999 06:19:56 GMT
From: design@raincloud-studios.com (Charles R. Thompson)
Subject: Re: Y2K infected Perl code
Message-Id: <MPG.11b800e7a4cd3c1b9896d5@news>

[ Congratulations, Uri Guttman you could be a winner! Return to comp.lang.perl.misc to claim your prize. ]

> 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.

Until I hung out here for a few months, I had no clue what was wrong with 
my scripts. I look back at some of my older stuff for clients now and 
just shudder. Frankly, I'm amazed they even work.

Those two beanpoles really brainwashed me, it's been harder to learn the 
second time after using their crap. After about the 3rd week posting here 
I realized I was a newbie all over again.

It's funny you should mention one of those goobs, I tried to convert a 
database routine from one of their old scripts today... I found 3 lines 
of code out of 68(!) that were 'useful'. Of course, I already knew I was 
going to need a few print statements! :)

Seriously... after removing the inefficient open file while do crap usual 
suspect.. converting the 60 bazillion memory-bloating arrays to a hash 
and also converting a picasso inspired set of nested if statements to a 
hash I ended up with 10 lines of code.

So far the rewrite result has been a reduction of lookup times for unique 
items in 2000 records from 14 seconds to 2.6 ... and it's dropping. 
That's alot of overhead gone. Obviously there are better ways out there 
if people would just friggin try and quit treating scripts like they come 
on a floppy disc ready to install. 

Darn... I didn't yell. :)

CT


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

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 5812
**************************************

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