[13386] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 796 Volume: 9

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Tue Sep 14 17:17:18 1999

Date: Tue, 14 Sep 1999 14:10:36 -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           Tue, 14 Sep 1999     Volume: 9 Number: 796

Today's topics:
    Re: Greetings from a Newbie <mike@yawp.com>
    Re: how can i list a directory into a browser?? <gellyfish@gellyfish.com>
    Re: How to download page/image? <cassell@mail.cor.epa.gov>
    Re: Is perl Safe? <cassell@mail.cor.epa.gov>
    Re: libwww-perl <makkulka@cisco.com>
    Re: Looking for tools. <cassell@mail.cor.epa.gov>
    Re: Method=Post & frames <cassell@mail.cor.epa.gov>
    Re: output of backticks <cassell@mail.cor.epa.gov>
    Re: POST is not allowed <ceb012@lmpsil02.comm.mot.com>
        Question with moving string to array <hflynn@gibralter.net>
    Re: Question with moving string to array <makkulka@cisco.com>
    Re: rand questions (Iain Chalmers)
        Redirect STDOUT to variable bernfarr@my-deja.com
    Re: REQ: tell-a-friend script <flavell@mail.cern.ch>
    Re: Searching by date problem. (Abigail)
    Re: Searching by date problem. (Larry Rosler)
    Re: split comp.lang.perl.misc ? (Abigail)
    Re: split comp.lang.perl.misc ? <cassell@mail.cor.epa.gov>
        test ! ignore <sarf@zaz.com.br>
    Re: test ! ignore (Abigail)
    Re: UNCRAP project proposal (Abigail)
    Re: UNCRAP project proposal (Kai Henningsen)
    Re: Win32::MAPI problem - reading and sending shapirojNOSPAM@logica.com
        Digest Administrivia (Last modified: 1 Jul 99) (Perl-Users-Digest Admin)

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

Date: Tue, 14 Sep 1999 14:32:09 -0500
From: <mike@yawp.com>
Subject: Re: Greetings from a Newbie
Message-Id: <Pine.NEB.3.96.990914124523.10768A-100000@www.yawp.com>


> Hello Everyone, I am a Newbie.  I hate being a Newbie, but
> when one undertakes to learn a new language, be it computer
> based or otherwise, one has little choice.

suggestion 1:  get used to being a newbie.   everyone's a newbie in some
way or another.   if you're not a newbie at the fundamentals, like
grammar & syntax, you're a newbie at things like algorithms, data
structures, design, etc.   the only person who knows everything there is
to know about computer programming is Donald E. Knuth.. and he says he
doesn't because he's a very nice guy, and doesn't want the rest of us
dwelling needlessly on our inferiority.

one of the most important rules of technology is "a guru is anyone who's
two pages ahead of you in the manual".   if you don't believe it, wait
until someone calls you a guru, and see how all-wise you feel.    even the
most anal-retentive, manpage-chewing language lawyer can get hit with new
and interesting uses for some keyword they though they had cold.   that's
what makes programming so cool.



> As you all know, one of the main characteristics of a Newbie is that a
> Newbie asks lots of questions

so does a guru.. the difference is that fewer people can answer a really
good guru-level question.   a guru is just a newbie who's already hit most
of the easy questions.

the trick is to prepare for the hard questions while you're still working
on the easy ones.. learn the difference between asking questions as a way
to locate information of which you were not previously aware, and asking
questions as a substitute for thinking.   the former is laziness in the
service of research, the latter is just plain laziness.



> I was/am very good with Pascal, and could likely make it do things that
> would surprise even the wisest of the Gurus. 

not being much of a Pascal fan (though i do have great respect for Wirth),
i'd say that probably includes writing "hello, world."  ;-)



> 1. In what circumstances would you, as a multi-lingual
> programmer, use the  Perl language?   In what circumstances
> would you not?  What might you use instead?

that's more of a design issue than a language issue.. roughly like asking
what font is best for writing code.   if your program is well structured,
signals which cross its external interface will be well enough isolated
that they can be in any format you want.   by the same token, if you're
having trouble changing the i/o language of your program, it's a sign that
you need to overhaul your logic, not look for a new programming language.



> 2. As a strong advocate of Perl, what other languages do you
> recommend, and why?

C :  it's valuable to be forced to consider memory allocation and
management issues.   it's a pain in the ass when you're trying to write
code on a deadline, but coders who spend their entire lives letting a
garbage collector clean up after them tend to be like people who've always
had servants to clean up after them.   doing your own laundry now and
again is good for the soul.

Haskell :  crappy data storage is the chronic bad breath of programming.
imperative languages get rid of the concept of 'storing data in a
variable' and force you to call everything as a function.   that, in turn,
forces you to think about what you're trying to do, rather than just
slamming out crud and hoping the mess doesn't get too bad.

Smalltalk/Python/C++/Java :  explicitly object oriented languages
encourage you to take a disciplined approach to data storage, and provide
convenient syntax for writing code with good coupling and cohesion.

UML :  an implementation-language-independent design language.  when you
get right down to it, one LR(1) language is pretty much like another.
by and large, the simplest and most effective way to do something is
also the way which is easiest to port to another language.   taking away 
specific language idioms makes it easier to see the overall logic.

Z :  failure to make sure that A) your data is valid, and B) your code can
handle any value it can possibly get at point X, go foot-in-mouth with
crappy data storage.   Z allows you to generate a rich set of data types,
and define constraints that those types have to meet, then throws a fit
if you try to pass, say, a POINTER_WHICH_MAY_BE_NULL to a function that
wants a NON_NULL_POINTER.


Perl is a loosely typed (to the point of being floppy), strongly idiomatic 
language which automatically binds variables as needed, uses a garbage
collector, and is fairly relaxed about scope.   that's the programming
equivalent to an incredibly comfortable set of jeans.   if you're already
in good shape, not only will those jeans be comfortable, they'll also look
good.   just having the jeans won't put you in good shape, though.



> 4. What is the expected life span of a Newbie?

hard to say.. the next stage is Wall-Chewing Zealot (aka: larval stage).
when you find yourself thinking that Perl contains all the secrets of the
known universe.. and are compelled to explain this at length, constantly..
you're no longer a newbie:  you're something *really* annoying.  ;-)

the larval stage lasts until you stop thinking you know The One True Way
and get back to asking questions.




-- 
mike

sub AUTOLOAD { $T{"$AUTOLOAD.$_[0]"} } $i = $C = unpack 'C', 0; 
for (split '&', join ' ', qw(00J& 5A=PBH&aDc&A6n&cEk&e;r?rGr&HCa&h:e&J1u
&kFe&lA &n7o&o8t&P>e&r< @lH&s3t&t4 9h&u2s)) { ($T, @T) = unpack 'C*', $_;
while (@T) { $t = "main::$T." . shift @T; $T{$t} = shift @T } } 
while ($C = &$C($i++)) { push @C, $C } print pack ('C*', @C), "\n";




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

Date: 14 Sep 1999 17:33:11 -0000
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: how can i list a directory into a browser??
Message-Id: <7rm0so$60o$1@gellyfish.btinternet.com>

On Tue, 14 Sep 1999 10:43:57 +0200 Abel Almazán wrote:
> I want to list a directory into a Netscape/Explorer browser, and each
> file i list will have a hyperlink.
> 

Something like :


#!/usr/bin/perl -w

use CGI qw(:standard);

my $filename = param('filename');

my $directory = param('directory') || '/home/gellyfish';

my $me = script_name();


if ($filename)
  {
    $fullpath = "$directory/$filename";

    if ($filename =~ /html*$/ )
      {
        $content = 'text/html';
      }
    elsif ( -T $fullpath )
      {
        $content = 'text/plain';
      }
    else
     {
        $content = 'application/x-unknown';
     }

    if ( open(INFILE,$fullpath) )
      {
        print header(-type => $content);
        while(<INFILE>)
          {
            print $_;
          }
        close INFILE;
       }
     else
       {
         print header,start_html('Oops');

         print h1('Couldnt open the file');

         print end_html;
       }
  }
else
  {
    print header,start_html("Directory of : $directory");

    if ( opendir(DIR,$directory ))
      {
        @files = grep {/^[^.]/ && -f "$directory/$_"} readdir(DIR);
        closedir(DIR);
        print "<UL>\n";
        foreach (@files)
          {
            print "<LI>\n";
            print "<A HREF='$me?filename=$_'>$_</A>\n";
            print "</LI>\n";
          } 
        print "</UL>\n";
        print end_html;
      }
    else
      {
        print h1("Cant open the directory");
        print end_html;
      }
   }


Of course using this could create a security hole big enough to drive a
space shuttle through - but there you go ...

/J\
-- 
Jonathan Stowe <jns@gellyfish.com>
<http://www.gellyfish.com>
Hastings: <URL:http://dmoz.org/Regional/UK/England/East_Sussex/Hastings>


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

Date: Tue, 14 Sep 1999 13:58:34 -0700
From: David Cassell <cassell@mail.cor.epa.gov>
Subject: Re: How to download page/image?
Message-Id: <37DEB6FA.9478644D@mail.cor.epa.gov>

Anton Klevtsov wrote:
[snip]
> does anybody know how to download page and image from another WEB server
> to my server?

Kragen already directed you to the libwww bundle, although he
suggested CPAN [www.cpan.org] .  Since you posted this from
a WinNT box, you may be running ActiveState Perl on win32.
In that case, get this bundle from ActiveState instead, using
the ppm program which came with your install.

Then check out the docs on LWP::Simple and LWP::UserAgent .

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


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

Date: Tue, 14 Sep 1999 13:49:14 -0700
From: David Cassell <cassell@mail.cor.epa.gov>
To: kragen@pobox.com
Subject: Re: Is perl Safe?
Message-Id: <37DEB4CA.92471ED9@mail.cor.epa.gov>

[courtesy e-mail cc to poster]

Kragen Sitaker wrote:
[snip of my usual garbage]

> I think I'll modify the news-scanning software to include a bottom 100
> OCR posts.  The post I'm quoting has one line of content, 13 lines of
> quotes, one line of attribution, four lines of normal cutlined
> .signature, 2 lines of something else that looks like a
> .signature, and three other blank lines.  Rough OCR: 1 line of content
> out of 23 nonblank lines, so 0.043.  Spectacular.

Ouch.  Would you rather I used "{}" as my quoting signifier
so that - like Abigail - I could rack up impressive OCR scores
in Greg Bacon's lists?  :-)

I was certainly off-topic, but I couldn't resist it when I saw
TomC's reply.  Even though I knew what he meant.  But when I saw
his quote from "2001 - A Space Odyssey" at the bottom, I just
had to comment on that too.  So my 'quote' there was really a
reply also.

I guess now you're sorry you welcomed me back to the ng.  :-)

[snip]
> alt.unix.wizards, which was originally a newsgroup for discussion of
> wizardly Unix matters, by the kinds of people who would be confident
> modifying their running kernels with adb.  It was full of people who
> wanted advice on getting vt100 emulation working correctly and
> partitioning their hard disk.

Or worse.  There was a question there the other day which 
was "What is unix?"  I kid you not.  The reply was so good
it made alt.humor.best-of-usenet .

[snip]
> displaces them.  I'll just nurse my sadness and try to create something
> better in the future.

Sorry to ruin your day.  I'm not always so OT.  I'm usually
one of the ones bugging people for doing this stuff.
 
David
-- 
David Cassell, OAO                     cassell@mail.cor.epa.gov
Senior computing specialist
mathematical statistician


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

Date: Tue, 14 Sep 1999 12:04:27 -0700
From: Makarand Kulkarni <makkulka@cisco.com>
Subject: Re: libwww-perl
Message-Id: <37DE9C3B.106DCDA9@cisco.com>

[ Don Stefani wrote:

> I have a perl script that I found that says it depends heavily on the
> libwww-perl.
> I went and got the libwww-perl tar file. How should the libwww-perl be
> installed, all of it of just part?

As these modules work closely together it is a good idea to install all of
it.

> How should my file be installed in relation to the libwww-perl?

Your existing script will remain in the same folder. You will find
installation instructions for the libwww-perl collection in a readme file.

==




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

Date: Tue, 14 Sep 1999 13:39:12 -0700
From: David Cassell <cassell@mail.cor.epa.gov>
Subject: Re: Looking for tools.
Message-Id: <37DEB270.70F1AE4B@mail.cor.epa.gov>

DF wrote:
> 
> "Sidney Orret" <orret@wmn.net> wrote:
> 
> >What are the best enviroment and tools for PERL's programming?
> 
> I'm personnally having a rather passionate love affair with Edit Plus,

Hmmm.  Maybe you need to get away from the computer a little.
Meet some new people.  :-)

> which you can search for at www.tucows.com. I use it for HTML, Perl,
> Java, and C++. Absolutely love it.

EditPlus is okay.  I find that I'm somewhat editor-neutral..
which is probably flamebait in itself.  There is a list of
editors with links at www.perl.com , and there is also a
list of editors for win32 in the ActivePerl FAQ which comes 
with win32 installs.  These two lists should be enough to
prevent yet another vi/emacs/etc editor-war.  I hope.

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


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

Date: Tue, 14 Sep 1999 13:55:16 -0700
From: David Cassell <cassell@mail.cor.epa.gov>
Subject: Re: Method=Post & frames
Message-Id: <37DEB634.8ECF73B@mail.cor.epa.gov>

Maen Suleiman wrote:
> 
> Hi to all ,
> 
>     I have this weird phenomena :  i have html page with a form inside ,
> this form call another cgi program that create a html page WITH FRAMES . the
> frames sources are both cgi and html pages  !
> 
> the weird thing is , that when the form action method=post , it works well
> in the Netscape , but in Explorer it give me "Page not found " Error
> messages in all of the frames and when i do refresh it it show the frames
> well !
> 
> when the method is not post , it works well ! ,
> 
> any suggestions ?!

Yes.  Your description of the problem indicates that this is
a browser-related phenomenon, not a CGI or Perl one.  So
you'll probably get the most helpful response in one of the
Usenet groups which focuses on browsers.  This is most likely
one of those irritating not-quite-conforming-to-the-spec
problems that constantly crop up with Nyetscape and
Internet Exploder.

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


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

Date: Tue, 14 Sep 1999 13:52:35 -0700
From: David Cassell <cassell@mail.cor.epa.gov>
Subject: Re: output of backticks
Message-Id: <37DEB593.BCD2BDA@mail.cor.epa.gov>

Kragen Sitaker wrote:
> 
> In article <37DD86B9.3C58666B@mail.cor.epa.gov>,
> David Cassell  <cassell@mail.cor.epa.gov> wrote:
> >perl -lne '$x++ if !/^\s*$/;}{print $x' netlog.txt
> 
> That *is* a cute trick; I was intrigued the first time I saw it in
> Abigail's .signature.  IMHO, though, it's much too tricky to appear
> outside a .signature.  :)
> 
> You are, of course, welcome to argue.

I think I will.  The first time I saw Abigail's trick, I
could actually hear the Monty Python Australians groaning
"Moy brain huuurts!"  But I looked into it, and it's a nice
technique for avoiding an END block in a one-liner.

>                                       Welcome back from vacation!  :)

Thanks.  I think.  :-)

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


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

Date: Tue, 14 Sep 1999 14:54:14 -0500
From: Eric Brummer <ceb012@lmpsil02.comm.mot.com>
Subject: Re: POST is not allowed
Message-Id: <37DEA7E6.27C2FA64@lmpsil02.comm.mot.com>

I am not using any modules.  Any packages either on the servers

Eric

Anthony Adams wrote:
> 
> What modules are you using?
> 
> Maybe some updates could make it work again.. Had the same..
> 
> Grtz Anthony


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

Date: Tue, 14 Sep 1999 16:21:44 -0400
From: Hal Flynn <hflynn@gibralter.net>
Subject: Question with moving string to array
Message-Id: <37DEAE58.B034882@gibralter.net>

Hi.  This is my first time posting here, and I'm still a bit new to
perl.

I'm using Perl on Solairs, and piping an ls -g into an array.  After
that, i use substitution to get rid of some of the informationI don't
need.  My question is this:

After I get rid of the information I don't need through substitution,
how do I split up what's left of the string into another array?  Here's
what I'm doing in respect to editing:

$count = 0;

while ($list[$count] ne "") {
            $list[$count] =~ s/^[\W]+[\w]+[\W]+//;
            $count++;
            }

From this point in the code, I'm trying to take what's in @list and
break each string into another array of values.  Can anybody point me in
the right direction to find the answer or perhaps some sample code to
work from?

Thanks;
Hal



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

Date: Tue, 14 Sep 1999 13:37:11 -0700
From: Makarand Kulkarni <makkulka@cisco.com>
Subject: Re: Question with moving string to array
Message-Id: <37DEB1F6.36C71457@cisco.com>

[ Hal Flynn wrote:

> From this point in the code, I'm trying to take what's in @list and
> break each string into another array of values.  Can anybody point me in
> the right direction to find the answer or perhaps some sample code to
> work from?

You will use split() to "break" the string. The regular expression
you pass to split() will depend on how you want to split this string.
refer to
perldoc -f split()
==




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

Date: Tue, 14 Sep 1999 13:17:34 -0700
From: bigiain@mightymedia.com.au (Iain Chalmers)
Subject: Re: rand questions
Message-Id: <bigiain-1409991317340001@dhcp-135.goop.org>

Larry Rosler wrote:


> Haven't seen any googols for a while, let alone googolplexes.  Can you 
> come up with one of those?  :-)
> 

Ummm, <http://www.google.com/>???

No, I didn't think so either...

big :-)


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

Date: Tue, 14 Sep 1999 20:52:18 GMT
From: bernfarr@my-deja.com
Subject: Redirect STDOUT to variable
Message-Id: <7rmchu$3t5$1@nnrp1.deja.com>

I want to use the CGI.pm module to create some HTML output. Rather than
output the result to STDOUT, or a disk file, I need to store the
resulting HTML in memory (BIG string variable, or some such thing).

Does anyone have a way to do this? I've searched for redirect and
STDOUT, etc., in the normal forums without any success.

Thanks

Bernard


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


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

Date: Tue, 14 Sep 1999 21:09:32 +0200
From: "Alan J. Flavell" <flavell@mail.cern.ch>
Subject: Re: REQ: tell-a-friend script
Message-Id: <Pine.HPP.3.95a.990914210740.5673B-100000@hpplus03.cern.ch>

On Tue, 14 Sep 1999 chetohevia@my-deja.com wrote:

> does anyone know how to
> identify referring page from a script? 

Anyone who's bothered to look at a CGI tutorial, I reckon.

This was not a perl language question - f'ups set



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

Date: 14 Sep 1999 14:27:14 -0500
From: abigail@delanet.com (Abigail)
Subject: Re: Searching by date problem.
Message-Id: <slrn7tt8hj.g83.abigail@alexandra.delanet.com>

Benjamin Franz (snowhare@long-lake.nihongo.org) wrote on MMCCV September
MCMXCIII in <URL:news:j7sD3.129$UA3.7475@typhoon01.swbell.net>:
() In article <slrn7tr7ba.pi.sholden@pgrad.cs.usyd.edu.au>,
() Sam Holden <sholden@cs.usyd.edu.au> wrote:
() >
() >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).
() 
() Only if the operators know _how big your window is_. And they probably don't. 
() You've created a 'magical fixer upper' that will break without warning. 
() The operator wants to enter historical, current and future events on a timeline. 
() (Lets say visits of a comet). The last was in 1940. The next was 1990 and
() the one after that will be 2040. Today is 1999. Which date should '40'

Even in the sentence "the next visit of the comet will be in '40,
and the previous visit of the comet before the last one was in '40",
it's very clear which 40 is which 40.

Of course, in an astrological database, those dates will be stored as
1940 and 2040 (or perhaps as Julian Days). But for humans it's easy to
disambiguate between an upcoming '40 and a previous '40.


() 'Intuitive behavior 1') Prepend the current century.
() 'Intuitive behavior 2') Prepend the century that would make the date _closest
() 'Intuitive behavior 3') Prepend the century that will place the date _before_
() 
() Great. Now which one does the _operator_ guess you did? Remember you wrote th
() code 15 years ago, left the company 14 years ago, your manager moved on to 
() greener pastures 5 years ago and the tech writer for the manual joined the 
() company 2 years ago. And some idiot lost the source code. (Been there - I 
() wrote a package for a company on contract and two months later they managed 
() to blow away the source completely. Still wanted the software though.)

That depends on the question, doesn't it? Asking when someone got married
would for instance imply 3. I can answer that question without ever seeing
the code, talking to the coder or be aware of the existance of the manual.
If I tell you that I got married in '73, and your brain goes in overload
mode because you don't know whether I got married in 73 AD, 1973 AD,
2073 AD, or perhaps 73 BC, that's your problem, not mine.

I really don't see the need to throw common sense out of the window now
that the year 2000 is approaching.

() >Short-cuts are a good thing. They make interfaces easier to use. They make
() >poeple more efficient. They save money.
() 
() Y2K is costing _tens of billions of dollars_. Funny kind of 'saving time
() and money'. I could quite reasonably lay at least a few of those billions 
() of dollars of _cost_ at the feet of the unknown person who thought 'y-1900' 
() (two digits for 'convienence' on the short term) in tm_struct. A decision 
() that is unlikely to have _saved_ anything close to what it _cost_.

Let me ask you a question. If you invite people over for dinner tonight,
and they ask you when to show up, what would you say "8 o'clock" or
"Tuesday, 14 September 1999 AD, at 20.00"? After all, "8 o'clock" is
ambiguious, in the same sense 2 digit years are.

() People don't quite as neatly compartmentize what they do as you and
() Larry suggest. And the person writing a user interface spec may
() not even be talking to the final coder. "Ah. A two digit date field.
() Ok." There are mis-communications, failure to ask the right questions,
() and endless other things that interfere with the creation of useful
() software.

Oh, and that only happens with dates? If you have such a form of
miscommunication, and such a stupid coder who doesn't take into account
what he is coding, you have far worse problems than dates.

() The guy asking his question provided no context for his date usage.
() _YOU AND I DON'T KNOW_ what date ranges his users will enter.

Really? Do you honestly think that if I ask for the date when someone,
who is still alive today, got married, I should not interpret "73" as
1973, but rather as 73 AD? Or should I reject it because it is unclear
that 73 is 1973 or 2073?

If I ask someone on what day they got married, I *DO* know the date
ranges they will enter. I know it, because if I ask the question, I
*KNOW* the question. 

() But you want to suggest it is _ok_ in general to use two digit
() dates on user interfaces. 

Hmmm. If there is a question, "in which year did you graduate",
and someone enters "63", you claim you cannot figure out which year
is meant? I would call a program that does *NOT* accept 63 as being
equivalent to 1963 broken.

() It isn't. "Hey George, what major events happened in 58 AD"?
() 
() "Uh....I don't know. The computer won't let me list it. It keeps
() trying to start at 1958....."

Once again, you are trying to take things out of context. Of course,
an entry screen to a historical database that doesn't take 2 digit
years doesn't make much sense. But in many cases, two digit dates do
make sense.

    "Hey Frank, who was president of the USA in '58?"

    "Uhm, the USA didn't exist in 58."

Silly answer, don't you think?

() >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
() >is no problem caused by this.
() >
() >Being able to use a two digit year just lets me enter dates faster and takes
() >few more cpu cycles away from seti-at-home or whatever - the way computers
() >should work.
() 
() And how do you enter 99 AD?


For an application? As answer to the question "when were you born"? It's
only needed when both 1999 AD and 99 AD are plausible answers. If 99 AD
is not a plausible answer (it would be a funny expire day of a credit
card), a program that takes 99 and treats is as 99 AD is *BROKEN*.



Abigail
-- 
tie $" => A; $, = " "; $\ = "\n"; @a = ("") x 2; print map {"@a"} 1 .. 4;
sub A::TIESCALAR {bless \my $A => A} #  Yet Another silly JAPH by Abigail
sub A::FETCH     {@q = qw /Just Another Perl Hacker/ unless @q; shift @q}


  -----------== 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 13:02:16 -0700
From: lr@hpl.hp.com (Larry Rosler)
Subject: Re: Searching by date problem.
Message-Id: <MPG.124849a41a16a94b989f62@nntp.hpl.hp.com>

In article <slrn7tt8hj.g83.abigail@alexandra.delanet.com> on 14 Sep 1999 
14:27:14 -0500, Abigail <abigail@delanet.com> says...
 ...
> For an application? As answer to the question "when were you born"? It's
> only needed when both 1999 AD and 99 AD are plausible answers. If 99 AD
> is not a plausible answer (it would be a funny expire day of a credit
> card), a program that takes 99 and treats is as 99 AD is *BROKEN*.

This is one of the famous Unix gotchas.  It isn't *BROKEN*, though; it's 
documented.  :-)


% cal 9 99
   September 99
 S  M Tu  W Th  F  S
 1  2  3  4  5  6  7
 8  9 10 11 12 13 14
15 16 17 18 19 20 21
22 23 24 25 26 27 28
29 30


Excerpted from `man 1 cal`:

SYNOPSIS
      cal [[month] year]

DESCRIPTION
 ... *year* can be between 1 and 9999. ...

WARNINGS
 ... Beware that 'cal 83' refers to the early Christian era, not the 20th 
century.

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


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

Date: 14 Sep 1999 15:41:01 -0500
From: abigail@delanet.com (Abigail)
Subject: Re: split comp.lang.perl.misc ?
Message-Id: <slrn7ttcrv.gcd.abigail@alexandra.delanet.com>

Michel Combes (michel.combes@hl.siemens.de) wrote on MMCCV September
MCMXCIII in <URL:news:37DE0ADC.A8C09BE0@hl.siemens.de>:
?? All,
?? 
?? Can we split comp.lang.perl.misc
?? to have a clear separation of the Perl articles related to Web/CGI stuff

There has been a group for CGI stuff for years. In fact, it was created
not long before or after the creation of comp.lang.perl.misc.
It's called comp.infosystems.www.authoring.cgi.

?? and the Perl articles for others utilities /scripts ...
?? because misc is just too big!
?? 
??    may I suggest :
?? + comp.lang.perl.cgi or comp.lang.perl.web
?? + comp.lang.perl.util
?? 
?? can we have a Call for Vote

No. You cannot have a CFV without an RFD. You are free to start the process.
Get yourself to the news.groups group, make yourself familiar with the
procedures, write an RFD, and follow the other procedures.



Abigail
-- 
perl -wlne '}print$.;{' file  # Count the number of lines.


  -----------== 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 14:01:34 -0700
From: David Cassell <cassell@mail.cor.epa.gov>
Subject: Re: split comp.lang.perl.misc ?
Message-Id: <37DEB7AE.DBED58E3@mail.cor.epa.gov>

Michel Combes wrote:
> 
> All,
> 
> Can we split comp.lang.perl.misc
> to have a clear separation of the Perl articles related to Web/CGI stuff
> 
> and the Perl articles for others utilities /scripts ...
> because misc is just too big!
[snip]

There are many reasons why this is not a good idea.

I covered a large number of them in a post in this newsgroup
just a few short weeks ago.  (This suggestion crops up about
once a month.)  Check the archives at deja.com and you'll
find my somewhat longer exposition on the inherent issues 
and problems involved.

The short form:  The people who ought to be re-directed
don't take direction from anyone, so it doesn't work.

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


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

Date: Tue, 14 Sep 1999 16:52:28 -0300
From: "sarf" <sarf@zaz.com.br>
Subject: test ! ignore
Message-Id: <7rm95d$adg$1@srv4-poa.zaz.com.br>

testing




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

Date: 14 Sep 1999 15:42:12 -0500
From: abigail@delanet.com (Abigail)
Subject: Re: test ! ignore
Message-Id: <slrn7ttcu4.gcd.abigail@alexandra.delanet.com>

sarf (sarf@zaz.com.br) wrote on MMCCV September MCMXCIII in
<URL:news:7rm95d$adg$1@srv4-poa.zaz.com.br>:
// testing


*ploink*



Abigail
-- 
%0=map{reverse+chop,$_}ABC,ACB,BAC,BCA,CAB,CBA;$_=shift().AC;1while+s/(\d+)((.)
(.))/($0=$1-1)?"$0$3$0{$2}1$2$0$0{$2}$4":"$3 => $4\n"/xeg;print#Towers of Hanoi


  -----------== 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: 14 Sep 1999 14:34:38 -0500
From: abigail@delanet.com (Abigail)
Subject: Re: UNCRAP project proposal
Message-Id: <slrn7tt8vf.g83.abigail@alexandra.delanet.com>

Chris Nandor (pudge@pobox.com) wrote on MMCCV September MCMXCIII in
<URL:news:pudge-1409990753040001@192.168.0.77>:
<> 
<> 
<> <CENTER></CENTER> is now illegal HTML (in 4.0).

That is an strange statement. There isn't just "HTML 4.0", there are 3
versions of HTML 4.0. CENTER deprecated in both the HTML 4.0 transitional,
and HTML 4.0 frameset DTDs. It's not present in the HTML 4.0 strict DTD.



Abigail
-- 
               split // => '"';
${"@_"} = "/"; split // => eval join "+" => 1 .. 7;
*{"@_"} = sub {foreach (sort keys %_)  {print "$_ $_{$_} "}};
%{"@_"} = %_ = (Just => another => Perl => Hacker); &{%{%_}};


  -----------== 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: 14 Sep 1999 21:57:00 +0200
From: kaih=7Os6Ro5Hw-B@khms.westfalen.de (Kai Henningsen)
Subject: Re: UNCRAP project proposal
Message-Id: <7Os6Ro5Hw-B@khms.westfalen.de>

abigail@delanet.com (Abigail)  wrote on 13.09.99 in <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.

Given that I've as good as given up validating other people's pages unless  
I have to work on them because it's so frustrating, that may well be true;  
OTOH, given that (1) it's certainly easy to automatically convert pages  
from one DTD to another that is just more strict in expecting closing tags  
and so on, and (2) no non-trivial page is valid unless it's written by  
someone who cares about this stuff, I can't see there being all that many  
pages in danger.

Now, you may have missed that I wasn't arguing for actually making this  
change. That was someone else. I was just arguing that the idea of  
"hundreds of millions of documents" that are currently valid HTML, and  
would then not be, doesn't seem to agree with the reality that I see from  
here.

In fact, the existence of even tens of millions of valid HTML documents  
would surprise me no end. From what I see, a single million is probably  
too high unless you count auto-generated stuff - where the guy who hand- 
crafted the generator cared.

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

As described, it's between 5.004 and 5.005. It would be exactly 5.004  
except the list grew too long. (Everything taken from perldelta.)

And those differences are *each* as large as the parentheses thing you  
claimed makes something "not 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.

So? Why does that have anything to do with it? HTML certainly has no  
wonderful tradition of never doing such a thing.

> 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/) {..}?

Certainly.

Just like I still call it C when I can no longer do, say,

#define stringize(x) "x"

Just like I still call it Pascal when I can no longer use procedural  
parameters, but instead I have procedure variables. (No, they're not a  
superset.)

>Would you like it that programs
> that have run since the days of perl4 without problem would suddenly stop
> working when you upgrade Perl?

Of course I wouldn't (supposing I used such stuff; never having used  
perl4, I can't say much on that score).

But does that mean I would, for only this reason, think such a change is  
evil? Certainly not.

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

I'd want to hear an argument for it. I've had similar things happen to me,  
and usually I haven't thought "what a moron" even absent such arguments  
(because in those cases, it was usually obvious what the benefits were).

And I certainly don't think this comes even remotely near making me a  
slave of the computer.

> [Followups set]

Given the direction this seems taking, I'm not sure that's the right  
group, so I'm adding perl back in. (If it does go exclusively HTML, I'm no  
longer interested - I've already said all I wanted to say on that score, I  
could only repeat it.)

Kai
-- 
http://www.westfalen.de/private/khms/
"... by God I *KNOW* what this network is for, and you can't have it."
  - Russ Allbery (rra@stanford.edu)


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

Date: Tue, 14 Sep 1999 16:34:49 -0400
From: shapirojNOSPAM@logica.com
Subject: Re: Win32::MAPI problem - reading and sending
Message-Id: <MPG.12487b759991133989686@news.logica.co.uk>

In article <7rer9h$17j$1@gellyfish.btinternet.com>, 
gellyfish@gellyfish.com says...
> On Fri, 10 Sep 1999 16:43:44 -0400 shapirojNOSPAM@logica.com wrote:
> > 
> > Well, I wanted to do some automated processing of the mail I receive at 
> > work, where everything is done via Microsoft Exchange/Outlook, so I was 
> > delighted to find Win32::MAPI. But it's acting a bit wacky. I don't know 
> > if it's the module, or imapi.dll, or my system's mapi dll.
> > 
> 
> I would try out using Win32::OLE with the MAPI provider as described in
> the Activestate documentation - but that is only a bias on my part.
> 
> /J\
> -- 
> Jonathan Stowe <jns@gellyfish.com>

Well, I want and looked at the MAPI.Session and MAPI.Messages 
documentation that I could find, and I got the same feeling I always do 
when I start to contemplate OLE. There's (at least) two alternatives:

- if Win32::MAPI actually works, I'll be calling the functions in the 
mapi.dll, and I've got fairly explicit documentation on the 'The 
Messaging Application Program Interface for C' from M$'s site, which 
seems to make sense, except for a specification of exactly which message 
you get when you call MAPIFindNext.

- if I use OLE, then I have to bounce around the VB documentation, which 
always seems to me like a recipe with only the ingredients list, no 
instructions on how they go together. Plus, I (think that I) will be 
introducing another layer of translation in my code; I don't know how 
much I can rely on the particular version of MAPI.Session and 
MAPI.Messages that I get to work on my machine will work elsewhere. It 
often seems that which commands you can use with OLE depend on what 
version of Word, access, office, MSmail, exchange, outlook, etc.. you 
have installed. Lastly, if I use OLE, I'm wary that Win32 will start-up 
Outlook each time I run my script, which should be about every 10 
minutes. I'd rather just call functions in a dll.

Anyways, that's why I'm biased against OLE. But I'm just an 
unreconstructed C programmer. I'm going to try OLE->MAPI a la ActiveState 
FAQ, but I'd still appreciate it if anybody could advise me about 
Win32::MAPI.


Thanks,
Jonathan Shapiro



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

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


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