[10124] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 3717 Volume: 8

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Tue Sep 15 04:17:19 1998

Date: Tue, 15 Sep 98 01:00:21 -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           Tue, 15 Sep 1998     Volume: 8 Number: 3717

Today's topics:
    Re: COBOL and Perl (Walt Mankowski)
    Re: Copying hashes and arrays (Marc Liyanage)
    Re: finding out yesterdays date (Neil Kandalgaonkar)
    Re: help with perl reg. expr. (Abigail)
    Re: Hidden Input Types and Quote Marks (Larry Rosler)
        https problem <douglas@home.com>
    Re: https problem (Mads Toftum)
    Re: library <marc@eni.net>
        Long Int representation ? sjagadish@my-dejanews.com
        make DBD problem <schut@rugth5.phys.rug.nltheend>
    Re: Perl & Java - differences and uses <zenin@bawdycaste.org>
    Re: Perl & Java - differences and uses (Abigail)
    Re: Perl & Java - differences and uses (Abigail)
    Re: Perl & Java - differences and uses (Abigail)
    Re: Perl & Java - differences and uses (Abigail)
    Re: PERL and Updating files (Mark-Jason Dominus)
    Re: Perl for Win32 Problems balestra@ppg.com
        Please help <prozac@mindless.com>
        Please help <prozac@mindless.com>
        Searching a File for String <stevenmc@home.com>
        The system() call is stalled for several minutes (Mikael Skogstrom)
    Re: Who posts original posts on CLPM? (Larry Rosler)
        Special: Digest Administrivia (Last modified: 12 Mar 98 (Perl-Users-Digest Admin)

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

Date: 15 Sep 1998 03:19:48 GMT
From: waltman@netaxs.com (Walt Mankowski)
Subject: Re: COBOL and Perl
Message-Id: <6tkmck$l9v@netaxs.com>

Craig Berry (cberry@cinenet.net) wrote:
: That's actually a lot uglier than it needs to be.
: 
:   s/(\w+)/\u\L$1/g;
: 
: does the same thing more readably (at least IMO).
: 
: : Yes, I do realize how ugly this is.
: 
: As a general rule, when something easily expressible like "initial-cap,
: trailing-lowercase all words" ends up looking ugly as a Perl expression,
: it should indicate you've not found the best way to write the Perl
: expression.  "Making easy things easy," as the saying goes.

And as another saying goes, there's always more than one way to
do it!  (Not always true in Cobol.)

Walt



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

Date: Tue, 15 Sep 1998 09:41:45 +0200
From: liyanage@access.ch (Marc Liyanage)
Subject: Re: Copying hashes and arrays
Message-Id: <B223E6D996681417080@mirage.techno.ch>


In article <vulnnmpedz.fsf@otis.arraycomm.com>,
Farhad Farzaneh <ff@otis.arraycomm.com> wrote:

> Hello,
> 
> Suppose I have a structure kept in a hash with the following format:

 ...

> so as expected, because $a an $b have the same references as their keys
> values, changing one will change the other.  I would like a copy
> constructor that can make independent copies of arbitrary structures and
> arrays.  
> 
> Question:
>   Has anyone written a module that performs a recursive copy so that one get
>   independent structures?  I looked at CPAN and did not come up with
>   anything. 


How about this...

It returns a reference to the copy, but that could be changed too.
It will *not* detect circular references. If you have such structures,
you would need to save the references in an array or hash to check for
duplicates...




-Marc Liyanage



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

my(%a) = ( "x" => [1, 2 , 3],
       "y" => [4, 5, 6]);

my($b) = &dup_structure(\%a);

$b->{x}->[0] = 9;

print join(',',@{$a{x}}),"\n";

print join(',',@{$b->{x}}),"\n";



sub dup_structure {

    my($ref) = $_[0];

    my($ref_type) = ref($ref);

    if ($ref_type eq "ARRAY") {
        return(&dup_ARRAY($ref));

    } elsif ($ref_type eq "HASH") {
        return(&dup_HASH($ref));

    } elsif ($ref_type eq "SCALAR") {
        return(&dup_SCALAR($ref));

    } else {
        return($ref);
    }
}



sub dup_ARRAY {

    my($array_ref) = $_[0];
    my($current_element, @new_array, $index);

    foreach $current_element (@$array_ref) {
        $new_array[$index++] = &dup_structure($current_element);
    }
    return(\@new_array);
}

sub dup_HASH {

    my($hash_ref) = $_[0];
    my($current_key, %new_hash);

    foreach $current_key (keys(%$hash_ref)) {
        $new_hash{$current_key} =
&dup_structure($hash_ref->{$current_key});
    }
    return(\%new_hash);
}

sub dup_SCALAR {
    my($scalar_ref) = $_[0];
    my($new_scalar) = $$scalar_ref;
    return(\$new_scalar);
}





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

Date: 15 Sep 1998 04:09:00 GMT
From: neil@domingo.concordia.ca (Neil Kandalgaonkar)
Subject: Re: finding out yesterdays date
Message-Id: <6tkp8s$qv2$1@newsflash.concordia.ca>

In article <35fd5a3e.8691503@news.ais.net>, Steve . <syarbrou@ais.net> wrote:
>I have a system that outputs a comma delimited file and then is passed
>to my linux box.  The first field is the date like 09/14/98.  The date

hm, I wonder what would happen in the year 2000? 

come to think of it, there are a lot of programs out there like this...

it's 1998 -- use four digit years.




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

Date: 15 Sep 1998 04:17:37 GMT
From: abigail@fnx.com (Abigail)
Subject: Re: help with perl reg. expr.
Message-Id: <6tkpp1$msv$1@client3.news.psi.net>

david@ceres.ca.gov (david@ceres.ca.gov) wrote on MDCCCXLI September
MCMXCIII in <URL: news:6tkb2b$8on$1@nnrp1.dejanews.com>:
++ Hello
++ 	I was hoping someone out there has a perl script which can do the
++ following with each entry in a flatfile database. Change each pipe
++ delimited entry from:
++ 
++ http://html-resources.com| HTML Resources |10-Sep-1998|cgi/misc|Great place
++ for html resources |
++ 
++ to:
++ 1|HTML Resources|http://html-resources.com|10-Sep-1998|cgi/misc|Great place
++ for html resources |
++ 
++ The number at the beginning of the entry needs to increment by one for each
++ entry


perl -i -F\\\| -wape '$"="|";$_="$.|@F[1,0,2..5]"' file


And now you are off to the manuals and try to understand the above program.



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


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

Date: Mon, 14 Sep 1998 19:39:47 -0700
From: lr@hpl.hp.com (Larry Rosler)
Subject: Re: Hidden Input Types and Quote Marks
Message-Id: <MPG.1067734edd042741989856@nntp.hpl.hp.com>

[Posted to comp.lang.perl.misc and copy mailed.]

In article <3601b3ac.28648104@news.efn.org> on Mon, 14 Sep 1998 17:33:14 
-0700, Darren Hayes <darrenh@efn.org> says...
 ...
>     I was hoping to trap the quote
> marks either in the HTML value field before submitting them or in the
> Perl script right after the parse. I know I can substitute to a
> bizarre character but I would like to be able to maintain the quote
> marks integrated in the original text somehow.

Instead of substituting 'a bizarre character' you can use the standard 
HTML entity encoding, which will be interpreted and displayed correctly 
by any browser.  You can find a module on CPAN that does this, but I just 
use the following one-liner:

sub HTML_encoded        # HTML_encoded_string = HTML_encoded(string)
    { local $_ = shift; s/([^ !#$%''-;=?-~])/&#${\ord $1};/g; $_ }

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


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

Date: Tue, 15 Sep 1998 06:01:12 GMT
From: Douglas Galbraith <douglas@home.com>
Subject: https problem
Message-Id: <35FE0225.C596CE4@home.com>

Hello, and thanks for the help;

I've included the perl script with which I'm having a problem at the end
of
this message.

I'm trying to access a secure web site using HTTPS, but I'm failing with
the
following error message:

Can't locate Net/SSL.pm in @INC (@INC contains:
C:\PERL\5.005\lib/MSWin32-x86-object C:\PERL\5.005\lib
C:\PERL\site\5.005\lib/MSWin32-x86-object C:\PERL\site\5.005\lib
C:\PERL\site\lib .) at C:\PERL\site\5.005\lib/LWP/Protocol/https.pm line
7.

I've searched the activestate web site for the SSL.pm package (using
ppm.pl) and have not
been able to find it.  Does this package exist, or am I on a wild goose
chase looking for it?

Or is something fundamentally wrong in my perl script (my suspicion)?

Below is my system configuration:
 system:        Windows95 (4.00.950a)
 perl version:  version 5.005 built for MSWin32-x86-object
 perl download: http://www.ActiveState.com

thanks for the help in advance;
DGalbra862@aol.com


----------------------------------------------------------
#!perl -w

#use LWP::UserAgent;
 use LWP::Protocol::https; #is this line correct?
#use LWP;

$http_addr='https://www.schwab.com';

$ua = LWP::UserAgent->new;
$request = HTTP::Request->new(GET => $http_addr);
$response = $ua->request($request);
$content = $response->content();

if ($response->is_success) {
      print "hit2:", $response->content;
  } else {
      print "hit3:", $response->status_line, "\n";
  }
----------------------------------------------------------


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

Date: Tue, 15 Sep 1998 07:20:10 GMT
From: mt@dev.null (Mads Toftum)
Subject: Re: https problem
Message-Id: <35fe1444.2105119@news.inet.tele.dk>

On Tue, 15 Sep 1998 06:01:12 GMT, Douglas Galbraith <douglas@home.com>
wrote:

>
>I've searched the activestate web site for the SSL.pm package (using
>ppm.pl) and have not
>been able to find it.  Does this package exist, or am I on a wild goose
>chase looking for it?

What you need is
http://www.perl.com/CPAN/modules/by-module/Crypt/Crypt-SSLeay-0.06.tar.gz


vh.

Mads Toftum, (QDPH/JAPH)
---
A computer lets you make more mistakes faster than any other 
invention, with the possible exceptions of handguns and Tequilla.
        -- Mitch Ratcliffe


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

Date: Thu, 10 Sep 1998 08:44:38 -0700
From: Marc Northover <marc@eni.net>
To: Robert <colte@hem.passagen.se>
Subject: Re: library
Message-Id: <35F7F3E6.5AB248B4@eni.net>

Put a:

1;

at the end of your library

Robert wrote:
> 
> Hi
> 
> I'm trying to do a library, but things aint going to well.
> Here is my problem.
> 
> I want a subroutine that prints out some html.
> This subroutine should be in a file called "intranet.lib"
> and it look like this:
> 
> # Intranet Subroutines


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

Date: Tue, 15 Sep 1998 05:41:35 GMT
From: sjagadish@my-dejanews.com
Subject: Long Int representation ?
Message-Id: <6tkumf$v5v$1@nnrp1.dejanews.com>

Can I use Long Integer representation in Perl ? How do I do it ?

thanks

jagadish

-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/rg_mkgrp.xp   Create Your Own Free Member Forum


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

Date: 15 Sep 1998 07:47:31 GMT
From: Koos Schut <schut@rugth5.phys.rug.nltheend>
Subject: make DBD problem
Message-Id: <6tl62j$543$1@info.service.rug.nl>
Keywords: DBD, make, oracle

Hi all,

I have:

Solaris 5.5.1
root access
gcc-2.8.1
perl-5.004
/local/bin/oracle/blablabla-whatever-there-is-in-oracle
DBD-Oracle-0.47

I did a 
cd DBD-Oracle-0.47
perl Makefile.PL
make

Unfortunately I get the error:

------------- quote start --------------
make: Warning: Can't find `make.rules': No such file or directory
LD_RUN_PATH="/local/bin/oracle/lib:/lib" gcc -o blib/arch/auto/DBD/Oracle/Oracle.so -R/local/bin/oracle/lib -R/lib -G -L/usr/local/lib Oracle.o  dbdimp.o /local/bin/oracle/lib/__fstd.o   -L/local/bin/oracle/lib -lclntsh -lsql -lsqlnet -lncr -lsqlnet -lclient -lcommon -lgeneric -lsqlnet -lncr -lsqlnet -lclient -lcommon -lgeneric -lepc -lnlsrtl3 -lc3v6 -lcore3 -lnlsrtl3 -lcore3 -lnlsrtl3 -lsocket -lnsl -lm -ldl -lm 
ld: fatal: file values-Xa.o: cannot open file; errno=2
ld: fatal: File processing errors.  No output written to blib/arch/auto/DBD/Oracle/Oracle.so
*** Error code 1
make: Fatal error: Command failed for target `blib/arch/auto/DBD/Oracle/Oracle.so'
------------- quote end ----------------

There is no values-Xa.o to be found, not in the DBD-directory, nor
anywhere on the system (find /). Can anyone tell me what goes wrong
here, and how to solve it?

I should mention that the oracle directory-structure is not standard,
and I had to make some changes for running perl Makefile.PL
successfully.

-- Please remove 'the end' from my address for replies --

Mazzel, cheers, bye, tabe, moi, tot ziens, have a nice day,
Koos
__________________________to be Y999T-compliant___________________________
JJ Schut                             |  e-mail: schut@phys.rug.nltheend   |
Institute for Theoretical Physics    |  Phone: +31 15 2566804             |
University of Groningen              |  Phone: +31 70 3116092             |
P.O. Box 800                         |  Fax:   +31 70 3112583             |
9700 AV Groningen, The Netherlands.  |  Yell:  Very, Very loud            |
----------------------- use: yyyyyyyyyyyyyyy/mm/dd------------------------


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

Date: 15 Sep 1998 03:56:48 GMT
From: Zenin <zenin@bawdycaste.org>
Subject: Re: Perl & Java - differences and uses
Message-Id: <905831493.161331@thrush.omix.com>

A.M. Kuchling <amk@mira.erols.com> wrote:
        >snip<
: as for the more
: elaborate 5.005 features, such as recursive regexes and embedding Perl
: code in a regex, I'm willing to wait and see if Perl people use them
: very much before deciding to implement them.

        Just a personal commentary.  I've been playing with the features
        of the newest Perl through the beta and for many of the systems I
        build I don't think I could live without them anymore.  I primarily
        write application servers to intermix legacy systems and data stores
        with newer technologies.  These and Perl's many other advanced
        "data munging" abilities are a godsend for such work where all data
        need from all sources needs to be delivered to the client end
        looking the same.

        If anyone else is doing similar work in Python, I think they'd
        be *begging* for such power and freedom.

-- 
-Zenin (zenin@archive.rhps.org)           From The Blue Camel we learn:
BSD:  A psychoactive drug, popular in the 80s, probably developed at UC
Berkeley or thereabouts.  Similar in many ways to the prescription-only
medication called "System V", but infinitely more useful. (Or, at least,
more fun.)  The full chemical name is "Berkeley Standard Distribution".


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

Date: 15 Sep 1998 04:58:25 GMT
From: abigail@fnx.com (Abigail)
Subject: Re: Perl & Java - differences and uses
Message-Id: <6tks5h$nfk$1@client3.news.psi.net>

George Reese (borg@imaginary.com) wrote on MDCCCXL September MCMXCIII in
<URL: news:W%0L1.1418$E9.4990895@ptah.visi.com>:
++ 
++ Natural language is a superset of any computer language I certainly
++ have ever programmed in.  That would include both perl and python.  I
++ honestly do not know how a computer language could express something
++ that you could not express in English--how would you even talk about
++ such a thing?


Well, if you're communication skills are bounded to English, you certainly
have a problem.

Many mathematical problems are hard, if not impossible, to discuss using
just English (or French, or Russian), but are far, far easier with a
blackboard and a couple of fellow mathematicians.

English is not a superset of math. Neither is math a superset of English.

An Eskimoo will have a lot of words and phrases to describe snow and
ice in his natural language, but will find it impossible to say the
same things using the natural language of a desert people, while desert
people can't find the right words to describe their environment using
and Eskimoo language.



What's the English equivalent for a short circuitted ||, without falling
back to an elaborate description?



Abigail
-- 
perl  -e '$_ = q *4a75737420616e6f74686572205065726c204861636b65720a*;
          for ($*=******;$**=******;$**=******) {$**=*******s*..*qq}
          print chr 0x$& and q
          qq}*excess********}'


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

Date: 15 Sep 1998 06:23:57 GMT
From: abigail@fnx.com (Abigail)
Subject: Re: Perl & Java - differences and uses
Message-Id: <6tl15t$osc$1@client3.news.psi.net>

George Reese (borg@imaginary.com) wrote on MDCCCXL September MCMXCIII in
<URL: news:CLaL1.1514$E9.5234013@ptah.visi.com>:
++ In comp.lang.java.programmer Zenin <zenin@bawdycaste.org> wrote:
++ : George Reese <borg@imaginary.com> wrote:
++ 
++ :         Good programmers write good code.  Bad programmers write crap,
++ :         regardless of the language.  One can create write only code in
++ :         any language with the same ease.
++ :
++ :         In fact, it takes quite the experienced Perl programmer to write
++ :         really hard to read code.  This is the basis of the obfusted Perl
++ :         contests.  Of course no one does that in production code.  Such
++ :         code is for fun and not for practicality.
++ 
++ This is totally false.  While it takes an experienced perl programmer
++ to win an obfuscated perl contest, one of the drawbacks of languages
++ like perl, C, and C++ is that you have to be experienced to write
++ clear code.
++ 
++ In Python or Java (moreso Python than Java), you have to intentionally
++ set out to write unclear code.  That is one of their key
++ maintainability advantages. 

I strongly disagree. Writing clear code is mostly a matter of being an
experienced programmer. Where the language helps (or not) is the amount
of extra work you need to do to get the task done. Perl and Python win
here big time over C. 

++ : : Furthermore, my claim comes from
++ : : discussing this with people skilled at both perl and python
++ : : programming and with experience at getting people who know neither to
++ : : learn them.
++ 
++ :         I picked up the core of the Java language in a week of reading a
++ :         book just on my train ride to work.  I've been programming Perl
++ :         for the better part of the decade and still don't know all the
++ :         power it holds.  But guess what, I don't need to know all of it
++ :         to write good, clean, and productive code.  One doesn't even need
++ :         to know most of it.  
++ 
++ You have just made an argument against Perl.

Really? English is a bad language because 6 years olds can communicate
in a meaningful way, even if they haven't mastered enough of the language
to write Shakespearian plays?

++ :         Just because some something is "simple" (GUIs, AOL, toasters, etc),
++ :         or easy to understand without looking anything up in a manual at
++ :         all, does not in any way make it more *efficient* to use.  MS
++ :         Wordpad is by far one of the easiest to use editors around, however
++ :         it is also one of the most inefficient.  The same holds true for
++ :         computer languages and spoken languages.
++ 
++ The opposite is true.  Just because something is complex does not make
++ it in any way more efficient to use.

MIX is simple. But would you find it efficient to write large programs in it?

++ Complexity is certain, however, to guarantee you a smaller set of
++ people who can use the tool.

Cars are more complex than bicycles. Driving a car is more complex than
riding a bicycle. A larger percentage of people driving a car are able
to ride a bicycle than people riding a bicycle are to drive a car.

Why don't people abandon cars are start riding bicycles? Could it be that
the added complexity also comes with an advantage? Do you drive a car?

++ :         Perl requires more self control then other languages, I'll give
++ :         you that.  
++ 
++ That is bad.

Why? Afraid you can't handle it? Are R-rated moves bad too? PG-rated
movies? Are knives bad? Is highschool bad? Is university bad?  Is moving
away from your parents bad? Why do you need a language that pampers you
and holds your hand?

++ :         "Many computer scientists have fallen into the trap of trying to
++ :          define languages like George Orwell's Newspeak, in which it is
++ :          impossible to think bad thoughts. What they end up doing is killin
++ :          the creativity of programming."
++ 
++ Larry Wall was simply wrong.  Languages like Python and Java prove
++ that you can create well-structured programming languages that do not
++ in any way stifle creativity.

Maybe not for some. Others are stiffled by bondage languages. Some
artists can be creative by just using black dots on white paper.

I prefer to see a colourful painting.

++ You overestimate perl's pervasiveness.  Perl's evolution beyond system
++ administration is an accident of being in the right place at the right
++ time.  It is also an accident that is being rectified.

By you and which army?

++ This is 100% untrue.  First of all, humans are very logical.  In fact,
++ they are mostly logical.  Going further into this is to stray way off
++ topic, so I will just reference a few authors for you who discuss the
++ topic: Daniel Dennett, Donald Davidson, and Fred Dretske.  It is
++ called 'the principle of charity' (and a few other names).  It
++ basically comes in the form that humans are mostly rational.  You have
++ to grant them that since you would never be able to make tails of
++ the actions of others if they were not rational.
++ 
++ At any rate, the issue is that human thought differs from computer
++ thought simply because humans have many more inputs and thus need a
++ different mechanism for arriving at answers than do computer.  
++ 
++ And this is all irrelevant to computer programming.  At the level of
++ computer programs, humans can express their instructions in English.
++ The problem is not with the humans, it is with the computers not being
++ able to understand that language.

If natural language is all that good, than pray tell me, why is spec
writing an art, and why does it often take as much time to write the
specification as to write the program? (After which it gets patched
because the client realises that they didn't quite write down what 
they wanted).

I trade you 10 programmers if I get one person who can write a decent
specification.

++ Clearly, if I state the problem with human languages is their
++ ambiguity and then say that I think a human language would be an ideal
++ programming language I am implying that the problem has somehow been
++ dealt with.

I see.

"If I state that the problem with nuclear powerplants is the high
 radioactive waste and then say that I think nuclear powerplants are
 the ideal way to produce electricity I am implying that the problem
 has somehow been dealt with."

I would like to say one nation buying that kind of reasoning from
its goverment.

++ : : Perl is often a string of non-alphabetic characters that have contextual
++ : : meaning
++ 
++ :         Real World Perl code is anything close to this.
++ 
++ I think the best example I can offer to people is to read the source
++ code to majordomo and compare it to mailman.  These are two mailing
++ list programs, one perl, the other python.  

And Perl is a bad language because of.... ? 

I have seen many programs written by you, but that doesn't make me
convinced LPC is a bad language.

++ :         In what language?  If Python used Chinese symbols instead of Englis
++ :         words, would it still be so "easy to read and maintain"?  Not for
++ :         me, and probably not for you, but it would for 2 billion people tha
++ :         probably would find { block } a lot easier to read then begin/end
++ :         or similar English words.
++ 
++ :         These 2 billion people are going to have just as much if not more
++ :         of a problem with Python's constructs then the meening of {}, (),
++ :         et al that don't even have a "normal discourse" of use for them.
++ 
++ This is a non-sequitur.  First, Chinese in the programming world  uses
++ English characters for the most part--in any language.  Second, it
++ follows from my arguments that I do think python is going to be harder
++ for a Chinese person (or French person, for that matter) than for an
++ English person. 
++ 
++ That just makes perl much, much harder for those folks.

And that is because of what? The fact that the next version of Perl will
allow variables using Chinese symbols? That a while (<>) {} loop doesn't
need an explicit variable? What does make Perl more difficult for a Chinese
person than Python?

++ :         Quite a huge user base, including myself, would argue that the
++ :         implied behaviour you hate makes both reading and writing programs
++ :         much, much easier.
++ 
++ That is a statement neither you can support nor that I can argue
++ against.  I have maintained, however, that long time perl programmers
++ are not the best judges of perl maintainability and readability.

That must be because they have much more experience than you in
maintaining and reading Perl code.

++ People with equal perl/python experience or with no experience in
++ either (but with programming experience) are the best judges.

I see. And math exams are best rated by biology teachers. I don't care
if someone without Perl experience can't maintain my code - that isn't
going to happen. I do care about someone who will maintain my code.
Someone with Perl experience.

++ I can only assume you willfully misinterpreted me here for rhetorical
++ points. The set of people 'with any programming experience' is vastly
++ greater than the set of 'perl experts'.  No where did I mention
++ anything about monkeys.  I said the IDEAL language would be human
++ language with a disambiguation process so that EVERYONE could read and
++ write computer programs.  That is clearly not what python is.  I have
++ nowhere tried to argue that is what python is.  I have only argued
++ that python is a lot closer to that than perl is.

Wishing for a magic wand is quite nice, but not very realistic.

Look again at the first sentence of the paragraph you wrote. It mentions
misinterpreting. It seems we are far, far off from using a language that
can't be misinterpreted as our natural language.

++ In other words, to read python code, you need to be an experienced
++ programmer.
++ 
++ In order to read perl code, you need at least to be a perl
++ programmer--for a lot of it, you need to be an experienced perl programmer.
++ 
++ That is a huge difference--especially if you are busy trying to hire
++ people in this market.

Let's see, you're going to hire non-Python programmers to maintain Python
code? So, it would pay off to be a Perl programmer instead of a Python
programmer. ;)

Just the fact that I can watch a movie doesn't make me a director.

++ :         Quite true.  The integration system however, leaves much to be
++ :         desired.  It has nothing even remotely close to the power of
++ :         PAUSE and CPAN.pm, but then, nothing else on the planet currently
++ :         comes close to them.
++ 
++ How do you know?  What exactly do these modules do?

Do you actually have an argument against his claim? I mean, if he's
wrong, just point to the Python equivalent of CPAN. It ain't that hard
to jot down an URL.

++ : : And software reuse does not make something OO.
++ 
++ :         Quite correct.  The only correct thing I've seen you write, but
++ :         it is correct. :-)
++ 
++ :         And on the flip side, OO does not make something reusable.
++ 
++ If it is properly OO, it is very likely to be reusable.

Reusability has little to do with OO-ness. Flexible code does have to
do with reusability. 

++ :         You're right, it's not OO in the pure sense, but then neither is
++ :         Python and neither is Java.  Probably because every "pure" OO
++ :         language that has come around isn't flexible enough for the real
++ :         world (sorry, but SmallTalk is dieing out).  OO is a tool, and
++ :         just a tool.  It is not in anyway the end all be all best way
++ :         to program everything, nore is it even the best way *most* of
++ :         the time.
++ 
++ Java is pure OO.  Python  is close enough.  Python only supports the
++ weak encapsulation of data, which is where its OO credentials fall
++ apart.  For a scripting language (the way I recommend using Python),
++ this is a good design choice.

I agree that Perl's OO implementation sucks. But then, Perl is flexible
enough not to need a rigid frame work. It's true that when using OO
in the usual way, your data isn't encapsulated. But if you don't want
to touch that data of whatever you inherit, then don't touch it! Just
because the barbed fence isn't there till you build it doesn't mean you
have to touch the inherited data.

OO is just a tool. It isn't the be-all, end-all.

++ OO is not simply a tool.  It is a way of engineering applications from
++ the moment you conceive of doing something (in some cases, even
++ before) until you actually write the code.  A good OO language is an
++ important tool in maintaining the OO paradigm across the process.
++ 
++ :         While Perl is not pure OO, it is very easy to write highly OO
++ :         Perl code.  Just as easy infact as Python and just as "OO" as
++ :         Python, if not more so.  The arguable over use of OO code at CPAN
++ :         can prove that without a doubt.
++ 
++ :         Perl gives you the freedom to take or leave OO at any time as best
++ :         fits the particular part of the task at hand.
++ 
++ That is a freedom that has no place in an OO language.  You do not
++ combine a structured software engineering process with a weak link.
++ It is like sticking a pipe with a huge leak inside your plumbing.

No. It's using a flexible pipe to cut around tight corners instead
of restricting yourself to rigid pipes and cursing when you have
to connect them.

++ Perl is quite simply no where as OO as python.

That's a feature.



Abigail
-- 
perl -we '$_ = q ?4a75737420616e6f74686572205065726c204861636b65720as?;??;
          for (??;(??)x??;??)
              {??;s;(..)s?;qq ?print chr 0x$1 and \161 ss?;excess;??}'


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

Date: 15 Sep 1998 06:35:15 GMT
From: abigail@fnx.com (Abigail)
Subject: Re: Perl & Java - differences and uses
Message-Id: <6tl1r3$osj$1@client3.news.psi.net>

Zenin (zenin@bawdycaste.org) wrote on MDCCCXLI September MCMXCIII in
<URL: news:905830672.564598@thrush.omix.com>:
++ George Reese <borg@imaginary.com> wrote:
++
++ : That has nothing to do with pure OO.  Pure OO is defined by data
++ : abstraction, inheritance, polymophism, and encapsulation.
++ 
++         If this is all that is required, Perl *IS* pure OO!

Please show me an easy to use data encapsulation method to use with
Perl-OO. (Beyond the simple "Don't touch that!") I've been looking for years.



Abigail
-- 
perl -MTime::JulianDay -lwe'@r=reverse(M=>(0)x99=>CM=>(0)x399=>D=>(0)x99=>CD=>(
0)x299=>C=>(0)x9=>XC=>(0)x39=>L=>(0)x9=>XL=>(0)x29=>X=>IX=>0=>0=>0=>V=>IV=>0=>0
=>I=>$r=-2449231+gm_julian_day+time);do{until($r<$#r){$_.=$r[$#r];$r-=$#r}for(;
!$r[--$#r];){}}while$r;$,="\x20";print+$_=>September=>MCMXCIII=>()'


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

Date: 15 Sep 1998 06:40:43 GMT
From: abigail@fnx.com (Abigail)
Subject: Re: Perl & Java - differences and uses
Message-Id: <6tl25b$osj$2@client3.news.psi.net>

George Reese (borg@imaginary.com) wrote on MDCCCXL September MCMXCIII in
<URL: news:wfeL1.1594$E9.5405535@ptah.visi.com>:
++ In comp.lang.java.programmer George Reese <borg@imaginary.com> wrote:
++ : In comp.lang.java.programmer Zenin <zenin@bawdycaste.org> wrote:
++ : :         Has Python finally developed zero-width lookahead and lookbehind,
++ : :         assertion, both positive and negative?  Interlaced code in both
++ : :         the search and replace constructs?  Subexpressions?  Conditional
++ : :         expressions?  Inlined modifiers?
++ 
++ : I could not answer this question fully for either Perl or Python.  Hopefully
++ : someone else who knows Python well can answer it.
++ 
++ Sorry to followup my own post.  The answer is: yes.  Python 1.5
++ supports all of this.


Which shows that you don't know those terms.


Python 1.5 does not have those features. Python's regexes seems to lag
behind Perls. First there was Perl 5.004, then we got Python 1.5 with
Perl 5.004 regexes. Now there's Perl 5.005 with the above features.

I assume a next version of Python might catch up Perl. But a next version
of Perl might see new features again.



Abigail
-- 
sub _'_{$_'_=~s/$a/$_/}map{$$_=$Z++}Y,a..z,A..X;*{($_::_=sprintf+q=%X==>"$A$Y".
"$b$r$T$u")=~s~0~O~g;map+_::_,U=>T=>L=>$Z;$_::_}=*_;sub _{print+/.*::(.*)/s}
*_'_=*{chr($b*$e)};*__=*{chr(1<<$e)};
_::_(r(e(k(c(a(H(__(l(r(e(P(__(r(e(h(t(o(n(a(__(t(us(J())))))))))))))))))))))))


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

Date: 15 Sep 1998 00:12:30 -0400
From: mjd@op.net (Mark-Jason Dominus)
Subject: Re: PERL and Updating files
Message-Id: <6tkpfe$n3j$1@monet.op.net>

In article <35FDD6AB.FD3E9B76@bbnplanet.com>,
Elaine -HappyFunBall- Ashton  <eashton@bbnplanet.com> wrote:
>Tom Christiansen wrote:
>> That's what the find tool was created for.
>Well, find won't replace. 

Yes, it will.  It'll do anything you ask it to.  You let `find' do the
directopry recursing part, and it calls the subroutine which you
procivde, which can open each file and do the substitutions.



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

Date: Tue, 15 Sep 1998 07:42:26 GMT
From: balestra@ppg.com
Subject: Re: Perl for Win32 Problems
Message-Id: <6tl5p1$7q7$1@nnrp1.dejanews.com>

Check your code!!!

You defined the variable "%weekdays" and used "%weekday"

Bye



In article <35FCC634.A9BCE347@vei.net>,
  mod@vei.net wrote:
> Hello Perl World,
>
> My name is Mickey and I am planning on doing some CGI routines with Perl
>
> in the near future. I am using Windows 98 and have downloaded Perl for
> Win32
> from Activesite. I am having a couple problems with some of the
> functions that
> I can not find help for on thier web site.
>
> When i create an associated array such as
>
> %weekdays = (
>    '1', 'Monday',
>    '2', 'Tuesday',
>    '3', 'Wednesday',
>    '4', 'Thursday',
>    '5', 'Friday',
> );
>
> and try to use the keys or values function:
>
> foreach $key ( keys(%weekday)) {print "$key";}
> print "\n";
> foreach $value ( values(%weekday)) {print "$value;}
>
> I get nothing for a response... just a blank line.. and if i try to use
> the printf fucntion to
> print a character:
>
> printf("Hello there... print this char %c", 'W');
>
> everything but the W is printed... anyone have any ideas? I am running
> these all
> through .pl scripts with the latest version of Perl for Win32. If anyone
> can help.. please ICQ me or E-mail me... thanks
>
> --
> Mickey Frklic / Programmer
> --------------------------------------
> ICQ: 6837268 - AIM: AOHell MoD
> Web Page: http://users.vei.net/mod
> --------------------------------------
>
>


--
 Massimo Balestra     EMAIL: balestra@ppg.com
 System Engineer       Phone: +39-0131-770.507
PPG Ind

-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/rg_mkgrp.xp   Create Your Own Free Member Forum


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

Date: Tue, 15 Sep 1998 00:01:38 -0700
From: "Pr0z@c CaLm" <prozac@mindless.com>
Subject: Please help
Message-Id: <35FE10CA.97EE2160@mindless.com>

Trying to intigrate FrameIt.cgi with Guestbook.cgi (matt
write)
This is the original line of code from guestbook.cgi

print GUEST "<a
href=\"$FORM{'url'}\">$FORM{'realname'}</a>";

Trying to change to this

print GUEST "<a
href=\"http://server5.hypermart.net/prozacssanitarium/cgi-bin/frameit/FrameIt.cgi?url=$FORM{'url'}&text=Prozacs_Sanitarium&remove=yes\">$FORM{'realname'}</a>";

I have tried putting switches in front of the ? and & signs,
but I either end up with a server error or it prints the
line without the addition.

What this is doing is printing a line in guestbook.html with
the link that calls the FrameIt.cgi to open a link in 90% of
the browser while adding a link back to my page in the
bottom 10% of the browser.

Can somepne PLEASE tell me the correct way to add this to
the script?
Please send via email.
Thanks in advance

--
*******************************************************************************

*  If you reply to this email using the "REPLY" button
*  the mail will bounce. Please reply to prozac@mindless.com

*  or if you do use "REPLY" remove the "NO-SPAM" from the
email
*  address so that it reads "prozac@mindless.com"
*  Sorry, I'm just getting WAY TOO MUCH Spam mail!!!
*******************************************************************************





--
    Be careful who's toes you step on today.
    They may be connected to the ass you have to kiss
tomorrow!


 email prozac@mindless.com
 UIN# 2675620
 powwow:prozac@mindless.com
 HP http://www.geocities.com/SiliconValley/Lakes/1069 (UNDER
CONSTRUCTION)




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

Date: Tue, 15 Sep 1998 00:03:58 -0700
From: "Pr0z@c CaLm" <prozac@mindless.com>
Subject: Please help
Message-Id: <35FE1152.CD271EFE@mindless.com>

Trying to intigrate FrameIt.cgi with Guestbook.cgi (matt
write)
This is the original line of code from guestbook.cgi

print GUEST "<a
href=\"$FORM{'url'}\">$FORM{'realname'}</a>";

Trying to change to this

print GUEST "<a
href=\"http://server5.hypermart.net/prozacssanitarium/cgi-bin/frameit/FrameIt.cgi?url=$FORM{'url'}&text=Prozacs_Sanitarium&remove=yes\">$FORM{'realname'}</a>";

I have tried putting switches in front of the ? and & signs,
but I either end up with a server error or it prints the
line without the addition.

What this is doing is printing a line in guestbook.html with
the link that calls the FrameIt.cgi to open a link in 90% of
the browser while adding a link back to my page in the
bottom 10% of the browser.

Can somepne PLEASE tell me the correct way to add this to
the script?
Please send via email.
Thanks in advance

--
*******************************************************************************

*  If you reply to this email using the "REPLY" button
*  the mail will bounce. Please reply to prozac@mindless.com

*  or if you do use "REPLY" remove the "NO-SPAM" from the
email
*  address so that it reads "prozac@mindless.com"
*  Sorry, I'm just getting WAY TOO MUCH Spam mail!!!
*******************************************************************************





--
    Be careful who's toes you step on today.
    They may be connected to the ass you have to kiss
tomorrow!


 email prozac@mindless.com
 UIN# 2675620
 powwow:prozac@mindless.com
 HP http://www.geocities.com/SiliconValley/Lakes/1069 (UNDER
CONSTRUCTION)




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

Date: Tue, 15 Sep 1998 06:55:04 GMT
From: "Steven McPherson" <stevenmc@home.com>
Subject: Searching a File for String
Message-Id: <cboL1.1301$gp1.2923370@news.rdc1.sfba.home.com>

Hi all-

I was wondering if anyone might be willing to give me a suggestion of how to
open and read and file for a particular string and then display what is to
the right of the search string.

Thanks,

Steve




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

Date: Tue, 15 Sep 1998 09:13:35 +0200
From: mikael@techtalk.se (Mikael Skogstrom)
Subject: The system() call is stalled for several minutes
Message-Id: <B223E03F966814170@du57-5.ppp.algonet.se>

I'm managing a chat server that works the following way:
1. To create a chat room you have to use a web based interface.
2. The forms call a series of Perl scripts, which build the shell script
neccessary to start an instance of the server.
3. As the last step there is a Perl script that executes the shell script
via the system() call.
4. What happens is that the execution of the Perl script is stalled in the
same moment the system command is executed. After two or three minutes it
continues to run.
5. In the mean time, though, the connection between the Perl script and the
web server has been disconnected.

There's noting wrong with the shell script; it works fine when run from the
command line. 7. But if I run the calling Perl script from the command
line, giving it the parameters it would have got from the forms, the
process stalls at before.

I've used the Perl debugger to make sure it is at the system() call the
execution goes wrong.
I've tried to use back tics but the problem remains. I've used these
commands in other scripts, on the same platform, and haven't had any
problems.

No, it's not likely we'll be able to get rid of the intermediate Perl
script. We're using Netscape Enterprise 2.1 and Perl 5.03 on the Solaris
2.6 platform.

Has anyone else experienced the same thing and found a remedy?

Mikael Skogstrvm





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

Date: Mon, 14 Sep 1998 22:05:49 -0700
From: lr@hpl.hp.com (Larry Rosler)
Subject: Re: Who posts original posts on CLPM?
Message-Id: <MPG.106795854e242299989858@nntp.hpl.hp.com>

In article <1dfddpq.7pp7lnos9f39N@bay1-248.quincy.ziplink.net> on Mon, 14 
Sep 1998 23:44:04 -0400, Ronald J Kimball <rjk@coos.dartmouth.edu> 
says...
> Asher <asher@magicnet.net> wrote:

 ...<some silly generalizations> 

> Your conclusion appears to be based on the assumptions that 'original
> posting' equals 'misguided posting' and 'followup posting' equals
> 'helpful posting'.
> 
> Do I really need to point out how ridiculous these assumptions are?

How about the ridiculous assumptions that the choice of a newsreader 
correlates with the choice of a primary programming environment, and that 
either correlates with programming experience or philosophy?  This thread 
can lead nowhere except to perpetuate prejudicial stereotypes.

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


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

Date: 12 Jul 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 Mar 98)
Message-Id: <null>


Administrivia:

Special notice: in a few days, the new group comp.lang.perl.moderated
should be formed. I would rather not support two different groups, and I
know of no other plans to create a digested moderated group. This leaves
me with two options: 1) keep on with this group 2) change to the
moderated one.

If you have opinions on this, send them to
perl-users-request@ruby.oce.orst.edu. 


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

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