[8213] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 1831 Volume: 8

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Sun Feb 8 00:07:35 1998

Date: Sat, 7 Feb 98 21:00:16 -0800
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)

Perl-Users Digest           Sat, 7 Feb 1998     Volume: 8 Number: 1831

Today's topics:
    Re: "Teach Yourself Perl in 21 days" (Was: Re: substitu <lach@lach.net>
    Re: Generic Config-file maintenance <gampid@javanet.com>
        Help - Programming Perl cowboy@cnnw.net
    Re: Help - Programming Perl (David Efflandt)
        Installing Linux and Perl? <davidh@wwwpromote.com>
    Re: Installing Linux and Perl? (Camtech)
    Re: Installing Linux and Perl? (David Efflandt)
    Re: Is Perl 5 year 2000 compliant? (Gary L. Smith)
        looking for $ENV-converting script <Seven7Seas@ibm.net>
        Perl Documentation (Was Re: Is Perl 5 year 2000 complia <metallica@metal.net>
    Re: Perl documentation (was re: Perl Year 2000 ...) (Craig Berry)
    Re: Perl documentation (was re: Perl Year 2000 ...) (Michael Wang)
        Redirect problems... (Mike Rheinheimer)
    Re: search and replace (Craig Berry)
        This group active? (cdog)
    Re: Year 2000 Compliance: Lawyers, Liars, and Perl <kiblerj@aset.com>
    Re: Year 2000 Compliance: Lawyers, Liars, and Perl <kiblerj@aset.com>
    Re: Year 2000 Compliance: Lawyers, Liars, and Perl (Ilya Zakharevich)
    Re: Year 2000 Compliance: Lawyers, Liars, and Perl (Daniel P. B. Smith)
        Digest Administrivia (Last modified: 8 Mar 97) (Perl-Users-Digest Admin)

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

Date: Sat, 07 Feb 1998 21:18:13 -0600
From: Lachlan Dunlop <lach@lach.net>
Subject: Re: "Teach Yourself Perl in 21 days" (Was: Re: substitute...)
Message-Id: <34DD23F5.F09461AC@lach.net>

Tom,

A book I consider very good and enjoy very much is Advanced Perl
Programming.  But this book suffers from a terrible first release in the area
of errata, there is a span of 3 pages that have the error you discuss below.

Personally I feel that the publisher should send out revised copies of this
book to all purchasers of the first release.  I think the errata was 70 odd
pages when I printed it out :((  It took 2 hours to mark up my version of the
book with the first 50 errors.

It's an unfortunate scare on an otherwise very informative book!!

Lach



Tom Phoenix wrote:

> On 27 Jan 1998, Duane Lecky wrote:
>
> > My reference book for Perl was initially "Teach Yourself
> > Perl in 21 days" by David Till.  It was excellent.
>
> My experience with that book is somewhat less positive.
>
> I had heard Randal claim that he could start at any random page in that
> book and find a serious error of fact within four pages. It was hard for
> me to believe that it could be that bad. So, when a student in one of my
> classes had a copy, I asked to borrow it. I figured that, although I'm not
> up on every detail as much as Randal, maybe I could spot an error or two.
>
> I flipped it open at random.
>
> The first function described in the first paragraph of the first page I
> opened to listed the function's two parameters in the wrong order.
>
> I gave the book back.
>
> Although it's too small a sample to be statistically useful, I can now say
> that 100% of the information I've checked from that book is wrong. :-)
>
> --
> Tom Phoenix       Perl Training and Hacking       Esperanto
> Randal Schwartz Case:     http://www.rahul.net/jeffrey/ovs/





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

Date: Sat, 07 Feb 1998 23:33:52 -0500
From: Evan Henshaw-Plath <gampid@javanet.com>
To: Philip Freed <phil@freed.com>
Subject: Re: Generic Config-file maintenance
Message-Id: <34DD35AF.59B8@javanet.com>

> I'd like to maintain a number of config files to be used by various
> Perl utilities.  Before I start writing code, I thought I'd find out
> 
> 1)  If someone has done this already.
> 2)  If someone has done something even better that I haven't thought
> of.
> 3)  If anyone has ideas or suggestions.
> 4)  If someone has code that I might use - either in the interim
> (until I write this module), or as a starting point.

There are several config programs out there, I ended up writing my own
because I needed nested data structures, and other werid requirements...
and I needed it to be pretty fast. It is actually pretty easy if you use
the storable module you can write up some accessor sub's and off you
go... What I did wasn't of high enough quality to be worth posting on
CPAN, but i could send you a copy if you want. 

Of the modules already out there Resources is the most complete but it's
also a little top heavy with some extensive object type support, and was
intended for perl applications rather than cgi's.

What you wrote reminds me of xml, perhaps you should look at atleast
using psuedo xml for your module.

- Evan Henshaw-Plath


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

Date: Sun, 08 Feb 1998 01:09:22 GMT
From: cowboy@cnnw.net
Subject: Help - Programming Perl
Message-Id: <34dd05a4.84908407@news.cnnw.net>

Hello, 

Can someone help me here...I'm reading the book Programming Perl and
I'm at the beggining and i'm working on the excercise Grades....when I
try to run it I get this message...

Illegal division by zero at document.pl line 17, <GRADES> chunk 10.

then if I take this section....

foreach $student (sort keys %grades) {
    $scores = 0;
    $total = 0;

 and change it to this...

foreach $student (sort keys %grades) {
    $scores = 1;
    $total = 1;

It works, except it doesnt average the grades it gives each student an
average of one....do they explain any of this later on? or is
something wrong...I have been thru the script several times to make
sure that I wrote it out right....if they do explain this please dont
give me the answer....if they dont can someone help?? Thanx :)

James L. Taylor


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

Date: Sun, 08 Feb 1998 03:46:49 GMT
From: efflandt@xnet.com (David Efflandt)
Subject: Re: Help - Programming Perl
Message-Id: <34e02795.11285650@flood.xnet.com>

cowboy@cnnw.net wrote:

>Hello, 
>
>Can someone help me here...I'm reading the book Programming Perl and
>I'm at the beggining and i'm working on the excercise Grades....when I
>try to run it I get this message...
>
>Illegal division by zero at document.pl line 17, <GRADES> chunk 10.
>
>then if I take this section....
>
>foreach $student (sort keys %grades) {
>    $scores = 0;
>    $total = 0;
>
> and change it to this...
>
>foreach $student (sort keys %grades) {
>    $scores = 1;
>    $total = 1;
>
>It works, except it doesnt average the grades it gives each student an
>average of one....do they explain any of this later on? or is
>something wrong...I have been thru the script several times to make
>sure that I wrote it out right....if they do explain this please dont
>give me the answer....if they dont can someone help?? Thanx :)
>
>James L. Taylor

I don't see anything wrong with the script if you typed it correctly.
If it is dividing by zero it means it has not found any grades.  Are
you sure you have a file called 'grades' with name, space and number
on each line?

Make sure you are not missing a $, " or ; somewhere.  Sometimes
temporary print statements can be helpful for troubleshooting.  Try
something like this in the first block to make sure it is reading
something in and splitting it properly:

while ($line = <GRADES>) {
	print "line: $line\n";
	($student, $grade) = split(" ", $line);
	print "student: $student\tgrade: $grade\n";
	$grades{$sudent} .= $grade . " ";
}

If that works, try printing variables farther down in the script.


David Efflandt/Elgin, IL USA
efflandt@xnet.com    http://www.xnet.com/~efflandt/


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

Date: Sat, 07 Feb 1998 18:35:33 -0600
From: David Hasbrouck <davidh@wwwpromote.com>
To: davidh@wwwpromote.com
Subject: Installing Linux and Perl?
Message-Id: <886897766.456654854@dejanews.com>

I am looking to install Linux and Perl on my own pc so I am able to test
and debug Perl code before uploading to the server.

I guess my question is, can this be done?  Can I install Perl in a Linux
environment?

If so, what 'distribution' of Linux?  I checked out www.linux.org and
there are quite a few different choices...  If you could point me to a
website to get further information regarding Linux.  I believe there is a
slackware/free version somewhere..

Thanks!

David Hasbrouck

-------------------==== Posted via Deja News ====-----------------------
      http://www.dejanews.com/     Search, Read, Post to Usenet


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

Date: Sun, 08 Feb 1998 12:20:57 +1030
From: "Anatoly Osiko (Camtech)" <anatoly@camtech.net.au>
To: davidh@wwwpromote.com
Subject: Re: Installing Linux and Perl?
Message-Id: <34DD0F80.5EAE36A5@camtech.net.au>

David, this page contains different sites with various Linux distributions.
http://www.ssc.com/linux/ftp.html
I am using Linux Slackware, and recently installed 5.004 of Linux.
That was not the "latest"  5.004.04 version, because I had trouble with it
compilation on my Linux, though 5.004 eventually installed.


David Hasbrouck wrote:

> I am looking to install Linux and Perl on my own pc so I am able to test
> and debug Perl code before uploading to the server.
>
> I guess my question is, can this be done?  Can I install Perl in a Linux
> environment?
>
> If so, what 'distribution' of Linux?  I checked out www.linux.org and
> there are quite a few different choices...  If you could point me to a
> website to get further information regarding Linux.  I believe there is a
> slackware/free version somewhere..
>
> Thanks!
>
> David Hasbrouck
>
> -------------------==== Posted via Deja News ====-----------------------
>       http://www.dejanews.com/     Search, Read, Post to Usenet



--
Anatoly Osiko
Consultant, Camtech Group (SA) Pty Ltd
work: anatoly@camtech.com.au
home: tolya@senet.com.au




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

Date: Sun, 08 Feb 1998 03:21:21 GMT
From: efflandt@xnet.com (David Efflandt)
Subject: Re: Installing Linux and Perl?
Message-Id: <34df2193.9747532@flood.xnet.com>

The Linux versions should all come with Perl.  While Linux is free for
download, it may take about 10 or 12 hours at 28.8K.  For about $17
including shipping I got 7 CD's with 3 different distributions
(Slackware, RedHat and Debian) plus many applications that you would
find at a sunsite mirror from www.cheapbytes.com.

The first time you may want to get a package with a book to lead you
through, unless you are already familiar with UNIX.  You also may want
a book on UNIX system administration since there may be questions you
do not think about when simply logging onto an ISP.

Apache is a free webserver that runs under Linux (www.apache.org) for
testing your Perl CGI locally.

David Hasbrouck <davidh@wwwpromote.com> wrote:

>I am looking to install Linux and Perl on my own pc so I am able to test
>and debug Perl code before uploading to the server.
>
>I guess my question is, can this be done?  Can I install Perl in a Linux
>environment?
>
>If so, what 'distribution' of Linux?  I checked out www.linux.org and
>there are quite a few different choices...  If you could point me to a
>website to get further information regarding Linux.  I believe there is a
>slackware/free version somewhere..
>
>Thanks!
>
>David Hasbrouck
>
>-------------------==== Posted via Deja News ====-----------------------
>      http://www.dejanews.com/     Search, Read, Post to Usenet


David Efflandt/Elgin, IL USA
efflandt@xnet.com    http://www.xnet.com/~efflandt/


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

Date: Sun, 08 Feb 1998 01:54:01 GMT
From: gls@infinet.com (Gary L. Smith)
Subject: Re: Is Perl 5 year 2000 compliant?
Message-Id: <Ze8D.190$kh1.9024911@news2>

John Alderson (metallica@metal.net) wrote:
: Gary L. Smith wrote in message ...
: >Have you ever used a Microsoft product?  A good deal of what's worth
: >knowing is not in any documentation, and when it is there, you often
: >can't find it.   Responding to a question with "look in the documentation
: >under strange-term-you'd-never-come-up-with-on-your-own" can be
: >trememdously helpful.

First of all, as Dr. John has previoused noted, posting and mailing the 
same responsed witout indicating you've done so is annoying.  Please 
don't do that.

: MS's docs are as good as any others, although it is quite trendy to hack on
: MS.   For instance, with little programming background (Fortran and Basic...
: does Basic even count?), I taught myself how to design and build Access db
: applications using only the Help file.  Same with VBA and Excel.  Are they
: perfect?  Surely not.  Have I seen any others that are?  Nope.

Unfortunately, MS tends to set the standard, and a very low standard it 
is, too.  Although one can work with inadaquate tools, that doesn't mean 
that the tools should not be improved.

: Because you couldn't find what you were looking for on the first try hardly
: constitutes bad documentation.  If having different ways to refer to things
: between products or platforms annoys you, you must be often annoyed.  Root
: around a bit more in the resources available for most products and ye shall
: be rewarded.

Nonsense!  Being unable to find what you're looking for quickly is the
defining characteristic of bad documentation.  Most software documentation
is so bad that many people won't even attempt to use it, which leads 
directly to higher support costs for the software producers.

Curiously, you've wound up agreeing with my point the RTFM is not
necessarily an unhelpful response by suggesting in effect that I RTFM. 

--
 
Gary L. Smith                    gls@infinet.com
Columbus, Ohio                 Gary_Smith@oclc.org


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

Date: Sat, 07 Feb 1998 22:55:25 -0500
From: {as signed} <Seven7Seas@ibm.net>
Subject: looking for $ENV-converting script
Message-Id: <34DD2CAD.937@ibm.net>

hi,

would anyone have a script for extracting the equivalent
of the timezone variable from those browsers that supply
only localtime and zulutime instead?

I'm thinking of maybe using a diff type routine if no one
has any already written.  

Any suggestions?


thanks a meg.


========================================
Please remove 7 from Seven7Seas@ibm.net
========================================


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

Date: Sat, 7 Feb 1998 22:51:33 -0500
From: "John Alderson" <metallica@metal.net>
Subject: Perl Documentation (Was Re: Is Perl 5 year 2000 compliant?)
Message-Id: <6bj9nm$2hq@news-central.tiac.net>

Gary,

I apologize for the unannounced cc and the bogus address.  Sloppy.  I'm
cc'ing you again, though.

I agree with you wholeheartedly on the concept of RTFM.  In some of the
other groups that I participate in, RTFM is a taboo answer to posts.  As you
can imagine, questions and often responses can try one's patience.

What I disagreed with was what I interpreted as a knee jerk statement heard
'round the newsgroups.  MS is the worst ever.  That simply is not the case
here.

>Unfortunately, MS tends to set the standard, and a very low standard it
>is, too.  Although one can work with inadaquate tools, that doesn't mean
>that the tools should not be improved.
>
>: Because you couldn't find what you were looking for on the first try
hardly
>: constitutes bad documentation.  If having different ways to refer to
things
>: between products or platforms annoys you, you must be often annoyed.
Root
>: around a bit more in the resources available for most products and ye
shall
>: be rewarded.
>
>Nonsense!  Being unable to find what you're looking for quickly is the
>defining characteristic of bad documentation.  Most software documentation
>is so bad that many people won't even attempt to use it, which leads
>directly to higher support costs for the software producers.
>

Back to my for instance, I very often found exactly what I was looking for
very rapidly and often with code examples to show syntax in both Access and
Excel.  A vastly different experience than I take it that you have had with
whatever products you were using.  I found the documentation to be good
perhaps because I knew how things were referred to in the environment that I
was working.

My productivity with Perl's docs is certainly not at the same level.  Why?
because I don't know the lingo of the Unix world and I have to learn where
the resources are.  I am enthusiastically trying to get past my ignorance in
those areas.  But that doesn't mean that the docs are bad, does it?  By your
definition, yes.  Mine, no.  What it means to me is that I will have to look
a bit more to find the solution that I am really looking for.

>Curiously, you've wound up agreeing with my point the RTFM is not
>necessarily an unhelpful response by suggesting in effect that I RTFM.
>
>--
>
>Gary L. Smith                    gls@infinet.com
>Columbus, Ohio                 Gary_Smith@oclc.org




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

Date: 8 Feb 1998 00:47:59 GMT
From: cberry@cinenet.net (Craig Berry)
Subject: Re: Perl documentation (was re: Perl Year 2000 ...)
Message-Id: <6bivbv$8ci$1@marina.cinenet.net>

Michael Wang (mwang@alhena.ibk.ml.com) wrote:
: John Alderson <metallica@metal.net> wrote:
: >As for Perl's docs, being new to Perl, I have found them to be well done.
: >Am I as comfortable navigating them as I am with a packaged help file?  No,
: >but so what.  Adapt.  I'll learn to be proficient with Perl and this style
: >of documentation too.
: 
: It would be helpful to have a man page for each perl functions, like
: C does. Because sometimes people just want to find the syntax. 
: 
: As I do not understand texinfo, neither do I understand perldoc format.

That's one reason it's better to use the perldoc command (rather than 
man) to view perl documentation; you can get doc on a single function by 
doing e.g. 'perldoc -f length'.

---------------------------------------------------------------------
   |   Craig Berry - cberry@cinenet.net
 --*--    Home Page: http://www.cinenet.net/users/cberry/home.html
   |      Member of The HTML Writers Guild: http://www.hwg.org/   
       "Every man and every woman is a star."


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

Date: 8 Feb 1998 03:53:36 GMT
From: mwang@alhena.ibk.ml.com (Michael Wang)
Subject: Re: Perl documentation (was re: Perl Year 2000 ...)
Message-Id: <6bja80$rrn$1@news.ml.com>

Craig Berry <cberry@cinenet.net> wrote:
>That's one reason it's better to use the perldoc command (rather than 
>man) to view perl documentation; you can get doc on a single function by 
>doing e.g. 'perldoc -f length'.

Thanks for the info. The problem with creating another documentation format
is having to learn it. I have learned MANPATH, sending man page to Postscript
printer, etc, now I have to learn the same. Is that PERLDOCPATH? and is there
a utility called POD2PS? What is the advantage of perldoc over man? Thanks.


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

Date: 7 Feb 1998 18:23:46 -0600
From: rott@cs.utexas.edu (Mike Rheinheimer)
Subject: Redirect problems...
Message-Id: <6bitui$9mt$1@gimme.cs.utexas.edu>

This is a curious problem:

I have a script that emails several users in a data file specified by the
html file that calls it.  Also, the redirect option is specified by the
html file.  The problem is that whenever email is sent, the redirect option
does not work (Server 500 error).  If I eliminate the call to the send_mail
subroutine the redirect option does work.  Below is a snippet of the code.
Any help would be appreciated.



#####################################
#!/usr/bin/perl
   
# $mailprog defines the location of your sendmail program on your unix
# system.
$mailprog = '/usr/lib/sendmail'; 
   
# Set the files that all info is stored in
@files = ("ivcf.dat", "exec.dat", "sgleaders.dat");

# Set the domains that are allowed to call this script
@referers = ("utexas.edu");

# Retrieve Date
&get_date;
   
# Parse Form Contents
&parse_form;

# Get and check referers
&check_referers;  
 
# Check for valid user
&check_user;
 
# Send E-Mail
&send_mail;
   
# Return HTML Page or Redirect User
&return_html;


##############
#
#  Several subroutines were left out
#  because I know for a fact that they
#  work as they should.
#
##############


sub send_mail {

   open (ADDRESSES,"./List_data_files/$FORM{'addressfile'}");
   $#temparray = -1;
   while (<ADDRESSES>) {
     chop;
     $#temparray = $#temparray + 1;
     $temparray[$#temparray] = $_;
     }
   close(ADDRESSES);

   $#tolist = -1;
   for $index (0..$#temparray) {
     #get the addresses out of the array
     @temp = split (/:/,$temparray[$index]);
     $recipient = $temp[2];
     $#tolist = $#tolist + 1;
     if ($recipient) {$tolist[$#tolist] = $recipient;}
     }
 
   if ($FORM{'addressfile'} eq "ivcf.dat")
     {$to = "IVCF at UT Austin";}
   elsif ($FORM{'addressfile'} eq "exec.dat")
     {$to = "InterVarsity Executive Committee";}
   elsif ($FORM{'addressfile'} eq "sgleaders.dat")
     {$to = "Small Group Leaders";}
     
   # Check for Message Subject
   if ($FORM{'subject'}) {
      $subject = "$FORM{'subject'}";
   }
   else {
      $subject = "IVCF mail form submission";
   }

     
   # Open The Mail Program 
   open(MAIL,"|$mailprog -bs");
   print MAIL "HELO cc.utexas.edu\n";
   print MAIL "ONEX\n";
   # From is set to ivcf so that notification of bad email addresses
   #   will be sent to ivcf for deletion from the list
   print MAIL "MAIL From: <ivcf\@www.utexas.edu>\n"; #<$FORM{'email'}>\n";
   for $index (0..$#tolist) {
     print MAIL "RCPT To: <$tolist[$index]>\n"; 
     }
   print MAIL "DATA\n";
   print MAIL "From: $FORM{'email'} ($FORM{'realname'})\n";
   print MAIL "Subject: $subject\n";
   print MAIL "\n";             # need an extra space after header
   print MAIL "$date\n";
   print MAIL "Message from $FORM{'realname'} to $to:\n\n";
   print MAIL "$FORM{'message'}";   
   print MAIL "\n";
   print MAIL ".\n";
   close (MAIL);
    
}


sub return_html {
   
   if ($FORM{'redirect'} =~ /http\:\/\/.*\..*/) {
      
      # If the redirect option of the form contains a valid url,   
      # print the redirectional location header.
       
      print "Location: $FORM{'redirect'}\n\n";
      exit;
   }
   else {
     &error ('bad_redirect');
   }   
   
}

################################


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

Date: 7 Feb 1998 23:37:03 GMT
From: cberry@cinenet.net (Craig Berry)
Subject: Re: search and replace
Message-Id: <6bir6v$2r8$1@marina.cinenet.net>

Rob W. Walls (wallsr@jcave.com) wrote:
: I WANT the code below to read a line of text from file and change any text
: between quotes to lowercase.
[snip]
: so the script operates on all text between the 1st and LAST quotes on the
: line instead of BETWEEN PAIRS of quotes on a line.
: the script also makes backup of orig file...
[snip]
:                 $line=~ s/\042(.*)\042/\042\L\1\E\042/g;

Your problem is greediness, and easily dealt with using a non-greedy 
quantifier.  Also, there's no need to use character escapes for ".  So 
your expression becomes:

  $line =~ s/(".*?")/\L$1/g;

Note also that you should use $1 rather than \1 in the replacement part 
of an s///.

Hope this helps!

---------------------------------------------------------------------
   |   Craig Berry - cberry@cinenet.net
 --*--    Home Page: http://www.cinenet.net/users/cberry/home.html
   |      Member of The HTML Writers Guild: http://www.hwg.org/   
       "Every man and every woman is a star."


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

Date: Sun, 08 Feb 1998 04:15:23 GMT
From: admin@badger1.net (cdog)
Subject: This group active?
Message-Id: <34dd3145.10796691@news.badger1.net>

Is this group active?


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

Date: Sat, 07 Feb 1998 20:30:13 -0800
From: "Jon R. Kibler" <kiblerj@aset.com>
Subject: Re: Year 2000 Compliance: Lawyers, Liars, and Perl
Message-Id: <34DD34D5.E863FB16@aset.com>

RandallBart wrote:
> 
> Tom Christiansen wrote:
> >
> > The first lie routinely recounted is that the Y2K problem historically
> > derived from expensive computers of yesteryear whose memory was so
> > dear that programmers maintained dates in a two-digit format to keep
> > costs under control.
> >
> > This assertion is demonstrably false.  Think about it.  A two-digit
> > number requires how much storage?  Two bytes, that is, sixteen bits?
> > No, much less: numeric data are seldom stored in text format, since a more
> > compact representation is readily available.  A two-digit year would be a
> > number ranging between 00 and 99.  That can be represented in just 7 bits.
> 
> No lie:  The data enters the system in decimal.  Historically the date
> was punched on a card, later it was entered by key to tape and later
> interactive terminals, but the dates are typed in decimal by a human
> being.  Punching two more digits on a card would be expesive -- every
> keystroke is an opportunity for error.  Further input formats grew to
> fit the card.  It was terribly traumatic when data had to be split
> accros two cards.  So it would have been preposterous to get them to
> punch four digit years on cards.
> 
> Once you read in this decimal data, why change its format?  Converting
> decimal to binary and back was a very expensive operation.  It would add
> extra code to your program, and in olden days it was a constant battle
> to keep programs in core.  Extra code to convert a date, using extra
> tape and disk space was simply viewed as a waste of time.
> 
<SNIP!>

Apparently neither of you are old enough to remember the IBM 1401s. On
those machines we used single digits to represent years in the current
decade (which caused a mini-70s date crisis!) and two digit years only
when not dealing with years in the current decade. Memory was that
tight. 

Programs with dozens of overlays were common. It was often a more
difficult task to properly structure the program overlays than it was to
write the original program code. Linker experts were far more valuable
than 'regular programmers.'

A "BIG" 1401 had all of 16K of 6-bit magnetic core memory. That's right,
6-bit bytes. The code set was called "BCD" -- which was the parent of
EBCDIC. IBM called the new code set "Extended BCD Interchange Code"
because they "extended" the character set by adding two more bits to the
old byte.

A "BIG" disk drive was really big -- 17" platters -- and held (if I
remember correctly) about 5MB on 10 platters with 19 usable surfaces. I
still have an old platter out of one -- makes a nice hat for toga or UFO
parties. 

Tapes were written at 110BPI. IBM actually supplied a clear plastic disk
about the size of a silver dollar. It was full of fine iron particles
that you could use to view of the actual magnetic stripes written on the
tape -- which was 7 track!

The machines didn't even have fixed length words -- you had to set 'word
marks' to define your own length word. There was something really funky
about how you had to define binary numbers that made using them REALLY
difficult to use! I can't remember what -- I wonder if I still have my
1401 manuals somewhere?. 

The machines didn't even have hardware multiply and divide capability --
you had to load multiply/divide tables if you wanted to do
multiplication and division! 

I don't remember the machine's speed rating (like MIPS -- or more like
IPS), but I do remember that instruction speeds were measured in
tens-of-miliseconds.

And (this is really important) decimal arithmetic was actually faster
for some operations than was binary arithmetic on the same numbers. 

The 1401 was IBM's first really widespread and successful commercial
computer. This is the machine from which so many of our bad habits
originated. AND YES IT *IS* TRUE THAT:
a) Because of the machine's architecture, it WAS MORE EFFICIENT
storage-wise to use decimal numbers than binary numbers.

b) Programs that operated on decimal numbers RAN SIGNIFICANTLY FASTER
than the same programs written using binary numbers.

THEREFORE DECIMAL NUMBERS WERE USED! AND THEY SAVED STORAGE!

Jon (I'm showing my age) Kibler
Jon.Kibler@aset.com


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

Date: Sat, 07 Feb 1998 20:51:19 -0800
From: "Jon R. Kibler" <kiblerj@aset.com>
Subject: Re: Year 2000 Compliance: Lawyers, Liars, and Perl
Message-Id: <34DD39C7.DB6C230A@aset.com>

Jon R. Kibler wrote:
> <SNIP!>
> 
> Apparently neither of you are old enough to remember the IBM 1401s. On
> those machines we used single digits to represent years in the current
> decade (which caused a mini-70s date crisis!) and two digit years only
> when not dealing with years in the current decade. Memory was that
> tight.
> 

<SNIP!>

I forgot to say that the ONLY way of entering data into these beasts was
by knocking air holes in cardboard. We called them "Punched Cards." They
would hold all of 80 characters of information. 

(Actually, I lied. Punched cards weren't the only way of entering data
into the computer. You also could have used the maintenance panel and
set data directly into memory one bit at a time!)

Disk and tape were thought of primarily as temporary storage. This was
especially true for the first models of disk and tape drives that IBM
released for the 1401. (Some machines also had "drums" for temporary
storage -- but that's another story.) 

Disk and tape was so flaky (unreliable) that it was actually more common
to have the computer punch updated data onto a deck of cards and feed
these cards back into the computer than it was to store data long-term
on either disk or tape. If data was stored on disk or tape, the common
means of backing it up was to create a punched card backup of the disk
or tape.

Man, THE TREES WE WASTED in those days...

Jon Kibler


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

Date: 8 Feb 1998 02:41:35 GMT
From: ilya@math.ohio-state.edu (Ilya Zakharevich)
Subject: Re: Year 2000 Compliance: Lawyers, Liars, and Perl
Message-Id: <6bj60v$6r1$1@mathserv.mps.ohio-state.edu>

[A complimentary Cc of this posting was sent to Jon R. Kibler
<Jon.Kibler@aset.com>],
who wrote in article <34DD39C7.DB6C230A@aset.com>:
> Man, THE TREES WE WASTED in those days...

You mean that it was not the fall of punchcard technology which
facilitated junk-snail-mail mountains at the dumpsters?  1/2 ;-)

I *really* do not know: how heavy were Sunday papers those days?

Ilya


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

Date: Sun, 8 Feb 1998 03:24:25 GMT
From: dpbsmith@world.std.com (Daniel P. B. Smith)
Subject: Re: Year 2000 Compliance: Lawyers, Liars, and Perl
Message-Id: <Eo1Isq.G60@world.std.com>

In article <34DD39C7.DB6C230A@aset.com>,
Jon R. Kibler <Jon.Kibler@aset.com> wrote:
>
>I forgot to say that the ONLY way of entering data into these beasts was
>by knocking air holes in cardboard. We called them "Punched Cards." They
>would hold all of 80 characters of information. 
>
>Man, THE TREES WE WASTED in those days...

But the robust, high quality, dense stock used for punch cards made them
highly desirable and sought-after by recyclers...
-- 
Daniel P. B. Smith
dpbsmith@world.std.com


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

Date: 8 Mar 97 21:33:47 GMT (Last modified)
From: Perl-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin) 
Subject: Digest Administrivia (Last modified: 8 Mar 97)
Message-Id: <null>


Administrivia:

The Perl-Users Digest is a retransmission of the USENET newsgroup
comp.lang.perl.misc.  For subscription or unsubscription requests, send
the single line:

	subscribe perl-users
or:
	unsubscribe perl-users

to almanac@ruby.oce.orst.edu.  

To submit articles to comp.lang.perl.misc (and this Digest), send your
article to perl-users@ruby.oce.orst.edu.

To submit articles to comp.lang.perl.announce, send your article to
clpa@perl.com.

To request back copies (available for a week or so), send your request
to almanac@ruby.oce.orst.edu with the command "send perl-users x.y",
where x is the volume number and y is the issue number.

The Meta-FAQ, an article containing information about the FAQ, is
available by requesting "send perl-users meta-faq". The real FAQ, as it
appeared last in the newsgroup, can be retrieved with the request "send
perl-users FAQ". Due to their sizes, neither the Meta-FAQ nor the FAQ
are included in the digest.

The "mini-FAQ", which is an updated version of the Meta-FAQ, is
available by requesting "send perl-users mini-faq". It appears twice
weekly in the group, but is not distributed in the digest.

For other requests pertaining to the digest, send mail to
perl-users-request@ruby.oce.orst.edu. Do not waste your time or mine
sending perl questions to the -request address, I don't have time to
answer them even if I did know the answer.


------------------------------
End of Perl-Users Digest V8 Issue 1831
**************************************

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