[12479] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 6078 Volume: 8

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Mon Jun 21 15:07:19 1999

Date: Mon, 21 Jun 99 12:00:27 -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           Mon, 21 Jun 1999     Volume: 8 Number: 6078

Today's topics:
    Re: Afraid to ask about Y2K! <revjack@radix.net>
    Re: Cure for document deficiency <d-edwards@uchicago.edu>
        DBI installation error. 110664025@my-deja.com
    Re: DBI installation error. <rg@fubar.net>
        DBI installation error (Dico Reyers)
        DBI installation error 110664025@my-deja.com
    Re: Different results when a cron job <upsetter@ziplink.net>
    Re: Different results when a cron job <cassell@mail.cor.epa.gov>
    Re: Fixed format fields: help needed! (Lee)
    Re: Fixed format fields: help needed! <aqumsieh@matrox.com>
        form handler using external SMTP? <kkoch@privat.circular.de>
    Re: form handler using external SMTP? (Dave Cross)
    Re: Formats (Lee)
    Re: HOW DO I PAD A STRING IN PERL?? (Philip 'Yes, that's my address' Newton)
    Re: how to do this in a perl program <cassell@mail.cor.epa.gov>
    Re: How to test if a subroutine exists? (Andrew Allen)
        How to write regexp? <pkotala@logis.cz>
    Re: How to write regexp? (Larry Rosler)
    Re: How to write regexp? (Tad McClellan)
    Re: Interpreting MS-ASCII - anyone have a filter? (Bart Lateur)
    Re: Interpreting MS-ASCII - anyone have a filter? <cassell@mail.cor.epa.gov>
    Re: Looking for 3D Array sort... (Dave Cross)
    Re: Perl "constructors" <jdporter@min.net>
    Re: Perl "constructors" <jdporter@min.net>
    Re: Perl "constructors" <jdporter@min.net>
    Re: Perl scripts slows down servers? (Abigail)
    Re: Perl scripts slows down servers? <cassell@mail.cor.epa.gov>
    Re: Perl scripts slows down servers? <cassell@mail.cor.epa.gov>
        Perl tutorial <jddemme@technologist.com>
        Special: Digest Administrivia (Last modified: 12 Dec 98 (Perl-Users-Digest Admin)

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

Date: 21 Jun 1999 18:05:13 GMT
From: Munson Minnie <revjack@radix.net>
Subject: Re: Afraid to ask about Y2K!
Message-Id: <7klusp$qi1$1@news1.Radix.Net>
Keywords: Hexapodia as the key insight

Abigail explains it all:
:Lee (rlb@intrinsix.ca) wrote on MMCXVII September MCMXCIII in
:<URL:news:B38FE5FE966887F4F6@0.0.0.0>:
:\\ She was gone for a bit (or her posts weren't making their way to my sorry
:\\ excuse for a news feed) but she's been posting here regularly this week.

:I was in the hospital for 25 days, hence my lack of postings in the
:month of May.

Well? Are you all right now?


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

Date: Mon, 21 Jun 1999 18:48:15 GMT
From: Darrin Edwards <d-edwards@uchicago.edu>
Subject: Re: Cure for document deficiency
Message-Id: <tgzp1twftc.fsf@noise.bsd.uchicago.edu>

abigail@delanet.com (Abigail) writes:

> 
> Uri Guttman (uri@sysarch.com) wrote on MMCXIX September MCMXCIII in
> <URL:news:x7r9n68x72.fsf@home.sysarch.com>:
> ## 
> ## tom c. reciting the perl docs on tape or cd.
> 
> In English, Spanish, French, German and Portuguese!
> 
> 
> [Batteries not included]
> [Void were prohibited]
> [Costs more in Canada]
> [5c value in DE]

I'm happy to help with the Russian translation. :)
Darrin


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

Date: Mon, 21 Jun 1999 16:32:06 GMT
From: 110664025@my-deja.com
Subject: DBI installation error.
Message-Id: <7klpe6$el4$1@nnrp1.deja.com>

On our test system I installed..
data-dumper-2.101.tar.gz
data-showtable-3.3.tar.gz
DBI-1_10_tar.gz
msql-mysql-modules-1_2200_tar.gz


And then did a test using 3 lines...
#!/usr/bin/perl
use Msql;
exit;


It gives these errors!!
Can't load
'/usr/lib/perl5/site_perl/i386-linux/auto/DBD/mSQL
/mSQL.so' for
modul
e DBD::mSQL:
/usr/lib/perl5/site_perl/i386-linux/auto/DBD/mSQL/
mSQL.so:
undefine
d symbol: msqlErrMsg at
/usr/lib/perl5/i386-linux/5.00404/DynaLoader.pm
line 166.
 at /usr/lib/perl5/site_perl/Msql.pm line 13
BEGIN failed--compilation aborted at ./test.pl
line 30.

Can anyone help me as to why these errors are
happening?

Thank you.

-Dico

dico@internetworks.ca


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


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

Date: Mon, 21 Jun 1999 11:08:07 -0700
From: "Rich G." <rg@fubar.net>
Subject: Re: DBI installation error.
Message-Id: <7klv3o$7hb$1@birch.prod.itd.earthlink.net>

110664025@my-deja.com <110664025@my-deja.com> wrote in message
<7klpe6$el4$1@nnrp1.deja.com>...
>It gives these errors!!
>Can't load
>'/usr/lib/perl5/site_perl/i386-linux/auto/DBD/mSQL
>/mSQL.so' for
>modul
>e DBD::mSQL:
>/usr/lib/perl5/site_perl/i386-linux/auto/DBD/mSQL/
>mSQL.so:


Did you _compile_ the mSQL and DBI modules, or did you just copy them into the
lib directory?  It looks as though the mSQL module was not compiled.

make
make test
make install

Rich G.






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

Date: Mon, 21 Jun 1999 16:57:37 GMT
From: dico@internetworks.ca (Dico Reyers)
Subject: DBI installation error
Message-Id: <376e7149.15689499@news.attcanada.net>

On our test system I installed..

data-dumper-2.101.tar.gz
data-showtable-3.3.tar.gz
DBI-1_10_tar.gz
msql-mysql-modules-1_2200_tar.gz


And then did a test using 3 lines...
#!/usr/bin/perl
use Msql;
exit;


It gives these errors...

Can't load '/usr/lib/perl5/site_perl/i386-linux/auto/DBD/mSQL/mSQL.so'
for
modul
e DBD::mSQL:
/usr/lib/perl5/site_perl/i386-linux/auto/DBD/mSQL/mSQL.so:
undefine
d symbol: msqlErrMsg at
/usr/lib/perl5/i386-linux/5.00404/DynaLoader.pm
line 166.
 at /usr/lib/perl5/site_perl/Msql.pm line 13
BEGIN failed--compilation aborted at ./test.pl line 30.

Could someone please explain how to fix them or what I am doing wrong?

Thanks,

Dico


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

Date: Mon, 21 Jun 1999 16:34:56 GMT
From: 110664025@my-deja.com
Subject: DBI installation error
Message-Id: <7klpjg$emd$1@nnrp1.deja.com>

On our test system I installed..
data-dumper-2.101.tar.gz
data-showtable-3.3.tar.gz
DBI-1_10_tar.gz
msql-mysql-modules-1_2200_tar.gz


And then did a test using 3 lines...
#!/usr/bin/perl
use Msql;
exit;


It gives these errors...

Can't load '/usr/lib/perl5/site_perl/i386-linux/auto/DBD/mSQL/mSQL.so'
for
modul
e DBD::mSQL: /usr/lib/perl5/site_perl/i386-linux/auto/DBD/mSQL/mSQL.so:
undefine
d symbol: msqlErrMsg at /usr/lib/perl5/i386-linux/5.00404/DynaLoader.pm
line 166.
 at /usr/lib/perl5/site_perl/Msql.pm line 13
BEGIN failed--compilation aborted at ./test.pl line 30.

Does anyone know why this is and how I can fix the problem?


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


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

Date: Mon, 21 Jun 1999 17:10:33 GMT
From: Scratchie <upsetter@ziplink.net>
Subject: Re: Different results when a cron job
Message-Id: <dmub3.782$7X1.199800@news.shore.net>

Richard Zilavec <rzilavec@tcn.net> wrote:
: The following works from command line but fails from a cron job.

: push(@data, `find . -name "*.dat"`, `find /usr -name "*.dat", `find
: /usr2 -name "*.dat");

: When I manually execute this program, the results are correct but when
: its executed by cron, only the first find is returned.  Any ideas?

You're probably not in the same working directory when the script runs
as a cron. Try doing a chdir first.

--Art


-- 
--------------------------------------------------------------------------
                    National Ska & Reggae Calendar
                  http://www.agitators.com/calendar/
--------------------------------------------------------------------------


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

Date: Mon, 21 Jun 1999 11:44:45 -0700
From: David Cassell <cassell@mail.cor.epa.gov>
Subject: Re: Different results when a cron job
Message-Id: <376E881D.387C3C0E@mail.cor.epa.gov>

Richard Zilavec wrote:
> 
> The following works from command line but fails from a cron job.
> 
> push(@data, `find . -name "*.dat"`, `find /usr -name "*.dat", `find
> /usr2 -name "*.dat");
> 
> When I manually execute this program, the results are correct but when
> its executed by cron, only the first find is returned.  Any ideas?

Yes.  cron doesn't run in the same environment as you do.  So
its idea about '.' is probably quite different from yours.  It
may have different privileges as well, which can hose your
search.

I would have done this using File::Find anyway.

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


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

Date: Mon, 21 Jun 1999 12:12:02 -0500
From: rlb@intrinsix.ca (Lee)
Subject: Re: Fixed format fields: help needed!
Message-Id: <B393DC929668DA2C97@204.112.166.88>

In article <1dtqyqs.tgy5b4kf3jd5N@roxboro0-0032.dyn.interpath.net>,
planb@newsreaders.com (J. Moreno) wrote:

>Assuming input more like:
>
>12-     .34-   456.0-   123-
>
>and this works better
>s/( ?)(\d*\.?\d+)-/-$2$1/g;

s/ ([\d.]+)-/-$1 /g

will do. The initial 12-, if found, can't be repaired without breaking the
format preservation spec.

>Of course if I'm wrong about the possible input, then it's not any
>better, and I should keep my mouth shut.

Where's the fun in that?

Lee





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

Date: Mon, 21 Jun 1999 11:12:00 -0400
From: Ala Qumsieh <aqumsieh@matrox.com>
Subject: Re: Fixed format fields: help needed!
Message-Id: <x3yyahdd1vj.fsf@tigre.matrox.com>


"Juan Riera" <juanriera@mx3.redestb.es> writes:

> I am new to perl. I need to format several spool files coming from an
> AS/400, unhappily the output format shows the minus sign after figures; I
> need to move it before the figures, without changing the figures column
> position (is a fixed field output). I mean, for example, changing
> 12     .34-   456.0-   123
> to
> 12    -.34   -456.0    123
> I have tried with split and join, but I do not get the result I need.

Well, without knowing the exact format of the output, I will assume
that each field will have at least a single space character before it
(which might or might not be true, but you don't give me enough info
to conclude). Then, you could do something like:

	$_ = '12     .34-   456.0-   123';
	s/ (\S+)-/-$1/g;

Now $_ == '12    -.34  -456.0   123'.

HTH,
Ala



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

Date: Mon, 21 Jun 1999 19:42:29 +0200
From: Klaus Koch <kkoch@privat.circular.de>
Subject: form handler using external SMTP?
Message-Id: <5itlk7.401.ln@psylo.wg>

Hello!

is it possible to create a cgi form handler that does not use the internal
mailserver, but sends the data over an external SMTP-account?

I have several forms on my page and want to be able to send the data to the
SMPT-account of my web-messaging provider who will then fax me the form
input. I have to use their SMTP-account because of authentication.

Any ideas? 

Thanks.

Klaus


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

Date: Mon, 21 Jun 1999 18:46:41 GMT
From: dave@dave.org.uk (Dave Cross)
Subject: Re: form handler using external SMTP?
Message-Id: <376e8871.3772196@news.demon.co.uk>

On Mon, 21 Jun 1999 19:42:29 +0200, Klaus Koch
<kkoch@privat.circular.de> wrote:

>Hello!
>
>is it possible to create a cgi form handler that does not use the internal
>mailserver, but sends the data over an external SMTP-account?
>
>I have several forms on my page and want to be able to send the data to the
>SMPT-account of my web-messaging provider who will then fax me the form
>input. I have to use their SMTP-account because of authentication.
>
>Any ideas? 

Net::SMTP

Available from CPAN <www.cpan.org>.

hth,

Dave...

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


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

Date: Mon, 21 Jun 1999 12:12:01 -0500
From: rlb@intrinsix.ca (Lee)
Subject: Re: Formats
Message-Id: <B393DC919668DA2C4F@204.112.166.88>

In article <7klkfh$cg8$1@nnrp1.deja.com>,
bernd1615@my-deja.com wrote:

>I got a syntax error "near write" .
>
>write  OLG;

I'm not entirely clear on what is supposed to be written. I expect perl may
be a little mystified, too.

Lee




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

Date: Mon, 21 Jun 1999 18:42:24 GMT
From: nospam.newton@gmx.net (Philip 'Yes, that's my address' Newton)
Subject: Re: HOW DO I PAD A STRING IN PERL??
Message-Id: <376dd65c.259631658@news.nikoma.de>

On Sun, 20 Jun 1999 11:24:12 GMT, dave@dave.org.uk (Dave Cross) wrote:

>Was there something in perlfaq4 - "How do I pad a string with blanks
>or pad a number with zeroes?" that was unclear?

This doesn't seem to be in my copy of perlfaq4 (5.005_02, ActiveState
build 509).

Cheers,
Philip
-- 
Philip Newton <nospam.newton@gmx.net>


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

Date: Mon, 21 Jun 1999 11:35:55 -0700
From: David Cassell <cassell@mail.cor.epa.gov>
Subject: Re: how to do this in a perl program
Message-Id: <376E860B.7218E6CC@mail.cor.epa.gov>

Jim Bell wrote:
> [snip]
> when a user hits the submit button, the corresponding
> cgi program will take the user to a page  which says
> " This will take about ten minutes, please wait..." immediately.
> At the same time, the cgi program works some data processing.
> and when it's done it will bring the user to
> another page which shows the results.

The redirect, is of course, a web-issue and more appropriate
for a group with www in its name.  But the first part seems
more relevant.  I would fork() a child process to do the extended
processing and close its STDOUT so it doesn't hang your browser.
THen I'd let the child do the tedious work while the parent
puts up the given notice.  When the child is done, you'll
have to have a way to tell the parent to get going.  Of course,
if you're on an NT box, you're fork()ed and you'll have to
try this with Win32::Process::Create and some of the flags
listed in the docs...

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


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

Date: 21 Jun 1999 17:03:47 GMT
From: ada@fc.hp.com (Andrew Allen)
Subject: Re: How to test if a subroutine exists?
Message-Id: <7klr9j$5fv$2@fcnews.fc.hp.com>

In comp.lang.perl.misc, Tom Christiansen <tchrist@mox.perl.com> wrote:
:In comp.lang.perl.misc, ada@fc.hp.com (Andrew Allen) writes:
::From 'perldoc -f defined':
::  You may also use C<defined()> to check whether a subroutine exists, by
::  saying C<defined &func> without parentheses

::a cursory check indicated that the "without parentheses" is not
::necessary.

:There's a tremendous difference between
:
:    defined &fn
:and
:    defined &fn()

Of course there is! I should have been more explicit (and the pod
probably should also be...)

What I meant was: it appears "defined(&func)" & "defined &func" behave
identically.

Andrew


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

Date: Mon, 21 Jun 1999 19:15:31 +0200
From: "Pavel Kotala" <pkotala@logis.cz>
Subject: How to write regexp?
Message-Id: <929985423.44546@gate.logis.cz>

In string '\n\\n' I want to replace '\n' to "\n", but not '\\n'.

s/\\n/\n/g replaces all occurences.

Can anybody help?

Thank You

Pavel Kotala





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

Date: Mon, 21 Jun 1999 11:15:32 -0700
From: lr@hpl.hp.com (Larry Rosler)
Subject: Re: How to write regexp?
Message-Id: <MPG.11d8211f34a13be8989c0e@nntp.hpl.hp.com>

[Posted and a courtesy copy mailed.]

In article <929985423.44546@gate.logis.cz> on Mon, 21 Jun 1999 19:15:31 
+0200, Pavel Kotala <pkotala@logis.cz> says...
> In string '\n\\n' I want to replace '\n' to "\n", but not '\\n'.
> 
> s/\\n/\n/g replaces all occurences.

Your use of '\\' is inconsistent, because the string you show as '\n\\n' 
is really '\n\n' or '\\n\\n'.  To get two consecutive backslashes, you 
need to insert four of them.

For consistency, I'll double all back slashes:

$_ = 'x\\ny\\\\nz';

s/(?<!\\)\\n/\n/g;     # negative look-behind for perl 5.005

s/(^|[^\\])\\n/$1\n/g; # for any perl version

Output:

x
y\\nz

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


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

Date: Mon, 21 Jun 1999 09:38:52 -0400
From: tadmc@metronet.com (Tad McClellan)
Subject: Re: How to write regexp?
Message-Id: <c9flk7.p1t.ln@magna.metronet.com>

Pavel Kotala (pkotala@logis.cz) wrote:

: In string '\n\\n' 


   Do you mean for that string to have 4 or 5 characters in it?

   In either case, if you could have been troubled to say that
   in Perl instead of in English it would have been Very Much Better:

      $_ = '\n\\n';  # four chars

   or

      $_ = '\n\\\n';  # five chars


   I will assume the 5 char variant.


: I want to replace '\n' to "\n", but not '\\n'.


   You want to replace 2 chars with 1 char (a newline), is that
   what your are struggling to say?

   Then you can use negative lookbehind (if you have a modern perl):

      s/(?<!\\)\\n/\n/g;


: Can anybody help?


   You surely could have made it easier for us to help you
   if you had give some Perl code instead of vague and ambiguous
   natural language...


--
    Tad McClellan                          SGML Consulting
    tadmc@metronet.com                     Perl programming
    Fort Worth, Texas


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

Date: Mon, 21 Jun 1999 18:27:13 GMT
From: bart.lateur@skynet.be (Bart Lateur)
Subject: Re: Interpreting MS-ASCII - anyone have a filter?
Message-Id: <376f8376.2118896@news.skynet.be>

Alan J. Flavell wrote:

>MS have a
>tendency to refer to their 8-bit codings as "ANSI", but I've never found
>anything from the ANSI that justifies this usage, either.

But yes. Windows uses a superset of ISO-Latin-1, AKA "Ansi", which is
the same as most Unices use. That is in contrast with plain DOS, which
uses a different character mapping for the upper character code half
altogether (AKA "OEM", Original Equipment Manufacturer).

	Bart.


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

Date: Mon, 21 Jun 1999 11:51:07 -0700
From: David Cassell <cassell@mail.cor.epa.gov>
Subject: Re: Interpreting MS-ASCII - anyone have a filter?
Message-Id: <376E899B.B452DE1F@mail.cor.epa.gov>

Bart Lateur wrote:
> [snip]
>         134     "dagger" (cross)        +
>         135     "double dagger"         er.. anybody ever used this?

Footnotes and endnotes.  For those people who can't understand
[1] and [2].

David

[1] Ezra Pound, "The Cantos", pp. 1078-1079.
[2] Ibid.
-- 
David Cassell, OAO                     cassell@mail.cor.epa.gov
Senior computing specialist
mathematical statistician


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

Date: Mon, 21 Jun 1999 18:51:54 GMT
From: dave@dave.org.uk (Dave Cross)
Subject: Re: Looking for 3D Array sort...
Message-Id: <3770898c.4055200@news.demon.co.uk>

On Mon, 21 Jun 1999 11:09:44 -0400, James Park
<park@nssdc.gsfc.nasa.gov> wrote:

>Hi everyone.
>
>I'm looking for a 3d array (list of lists) sorting module.  If you
>know the location of one, I would appreciate it.  I've noticed that
>standard module only has the 2d array sort.  I really don't want to
>program one myself, so any help would be great.

If you don't want to write one yourself then hire a programmer and ask
them to write it for you.

Good luck.

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


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

Date: Mon, 21 Jun 1999 17:05:51 GMT
From: John Porter <jdporter@min.net>
Subject: Re: Perl "constructors"
Message-Id: <7klrd6$ffk$1@nnrp1.deja.com>

In article <7kfb7r$k8k$1@nnrp1.deja.com>,
  armchair@my-deja.com wrote:
> I have never made any claims
> about C being better than assember based on the quantity/quality of
it's
> support tools.

That's a lie.  (Yet another.)


> > Actually C++ does a half-way decent job of trying to model something
> > a little more abstract than the real machine.
>
> What would C++ need to make it all the way to modeling an abstract
> machine?

I think it's too late for C++.
The "half-way decent"-ness of it is too fundamental in its design
and lack thereof.


> C++ is a superset of C. It
> compiles C code. C is portable assember per you, thus C++ must be
object
> oriented portable assember.

If you really believe this, then you are woefully ignorant of the
real, important differences between C++ and C.


> > > I hope you tell that to the programmers writing fields.pm and
other
> > > modules for function overloading and operator overloading.
> >
> > Some people, especially recovering C++ programmers, find these
things
> > desirable.  Necessary: not.
>
> So those modules were written by recovering C++ programmers, and now
> that they have recovered they no longer use them. Would you agree then
> that those modules should be removed from CPan and the Perl
> distribution?

Of course not.  There will always be new waves of recovering C++
programmers who will benefit from the crutches provided by those
modules, even when the original authors have long since moved on.


> > > I am glad to see that they agree with me, and not you.
> >
> > Rather than assume that they do, perhaps you should ask them.
>
> It doesn't surprise me that you would think that you would need to ask
> people adding features to Perl that I champion, whether we agree on if
> they are good things. After all, you are the "C is Portable Assembler"
> fellow.

It doesn't surprise me that you would rather make assumptions and
stick with them, than ask around and ascertain the truth.


> > > I have never programmed in assembler.
> >
> > Well that explains a lot.
>
> Ah, then assembler is what did it to you.

"It" being an expansion of my knowledge and abilities, yes.


> > > I give credit to Perl
> >
> > Heh, Perl doesn't need your credit.  Thanks anyway.
>
> But Perl graciously accepts my credit,

I think not, fool.


> Don't give up. There is still much more time to demonstrate that C is
> "merely portable assembler".

O.k., rather than give up, I will hold out hope that you will learn
assembly language, and as a consequence, also realize the equivalence
between it and C.  And more than that, I hope that you will learn
Perl, and realize how much more productive it can make you as a
professional programmer.

--
John Porter
Put it on a plate, son.  You'll enjoy it more.


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


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

Date: Mon, 21 Jun 1999 17:18:48 GMT
From: John Porter <jdporter@min.net>
Subject: Re: Perl "constructors"
Message-Id: <7kls5c$fps$1@nnrp1.deja.com>

In article <7kfbr4$kd5$1@nnrp1.deja.com>,
  armchair@my-deja.com wrote:
> > : In article <7k3d72$u1n$1@nnrp1.deja.com>,
> > :   John Porter <jdporter@min.net> wrote:
> > :> 	unshift @Foo::ISA, 'Quux';
>
> If Smalltalk doesn't allow classes in a heirarchy to be discarded at
> runtime, it is not alone.

Read the docs on unshift.  The above statement is *adding* a class
to the parent list of class Foo.  Not that that is particularly
relevant to my point.  Perl is not alone in allowing the modification
of the hierarchy at run-time.


> I don't see how Perl's object model is more flexible than C++. Can you
> describe it in terms of object oriented concepts like  "member data,
> methods, inheritance, instantiation"?

Sure.  Member data, methods, inheritance, and instantiation are all
dynamic in Perl.  They can be defined and manipulated at run time.
That's more flexible than C++, which has all of these things cast
into concrete at compile time.


> > Even if the asm was 100k LOC,
> > it would
> > still not prove that C is "higher level" then asm. -It is, but your
> > exercise would not prove it.
>
> Why would it not prove it?

Because the "level" of a language is not determined, or even
demonstrated, in the relative frequency of the 0x0D character in
typical source code.


> > The definition of a "high(er) level" language is one that more
> > closely resembles human thought, logic, and process then a machine's
> > logic and process.  Total LOC are irrelevant to that end.
>
> Then it wouldn't prove it because it is many many lines of code less,
> but by demonstrating how C code "more closely resembles human though,
> logic, and process then a machine's logic and process" than Assembler
> code.

"More closely" only by a very small measure.  C is still a long way
from a "natural" language for expressing thought.  In particular,
one is constrained to the data types and operations allowed by the
real machine.

--
John Porter
Put it on a plate, son.  You'll enjoy it more.


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


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

Date: Mon, 21 Jun 1999 17:28:50 GMT
From: John Porter <jdporter@min.net>
Subject: Re: Perl "constructors"
Message-Id: <7klso2$g2i$1@nnrp1.deja.com>

In article <7kfah8$k3b$1@nnrp1.deja.com>,
  armchair@my-deja.com wrote:
> In article <86vhcp8isk.fsf@research.johnson.cornell.edu>,
>   Doug Elias <dme7@cornell.edu> wrote:
> > 1: equal in force, amount, or value; also: equal in area or volume
but
> >    not admitting of superposition <a square equivalent to a
triangle>
> > 2a: like in signification or import
> >  b: having logical equivalence <equivalent statements>
> > 3: corresponding or virtually identical especially in effect or
> >    function
> > 4 (obsolete): equal in might or authority
> > 5: having the same chemical combining capacity<equivalent quantities
> > of two elements>
> > 6a: having the same solution set <equivalent equations>
> >  b: capable of being placed in one-to-one correspondence <equivalent
> >  sets>
> >  c: related by an equivalence relation
> >
> > My guess is that Mr. Porter is using definition-3

Rather than have you two arguing about which of the above is what
I mean when I say "C is equivalent to asm", let me tell you:
2b and 6c.  3 works too, but not as well.


> Although his uncle offered his mobile air compressor and
> spray gun, Mr. Porter insisted on using a 3 inch brush, claiming that
it
> was equivalent.

Yes, and I was right, because I was thinking of defs. 2b and 6c.

--
John Porter
Put it on a plate, son.  You'll enjoy it more.


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


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

Date: 21 Jun 1999 09:28:12 -0500
From: abigail@delanet.com (Abigail)
Subject: Re: Perl scripts slows down servers?
Message-Id: <slrn7msivm.k1b.abigail@alexandra.delanet.com>

Danny Aldham (danny@lennon.postino.com) wrote on MMCXX September MCMXCIII
in <URL:news:7kkejk$u4u$1@lennon.postino.com>:
%% X-Newsreader: TIN [version 1.2 PL2]
%% 
%% Larry Rosler (lr@hpl.hp.com) wrote:
%% : Kernighan & Pike, The Practice of Programming (1999), p. 81, has a 
%% : comparative performance and code-size chart for a particular program.  
%% : Here are excerpts:
%% :        250 MHz    400 MHz       Lines of
%% :        R10000     Pentium II   source code
%% : Java   4.9 sec    9.2 sec         105
%% : Perl   1.8 sec    1.0 sec          18
%% : A good book (as you can see :-)!
%% 
%% Huh?! Moving from the R1000 to the Pentium, Perl runs faster while
%% Java runs slower? Why do they not at least both move in the same 
%% direction? 


As explained on the same page, different implementations of Java.
The R10000 is an IRIX machine, while the Pentium ran Windows.


Not only is Java slower than Perl, MS-Java is even more slow.


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())))))))))))))))))))))))


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


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

Date: Mon, 21 Jun 1999 10:35:36 -0700
From: David Cassell <cassell@mail.cor.epa.gov>
To: Danny Aldham <danny@lennon.postino.com>
Subject: Re: Perl scripts slows down servers?
Message-Id: <376E77E8.F9BBA4F3@mail.cor.epa.gov>

[courtesy cc sent to poster]

Danny Aldham wrote:
> 
> X-Newsreader: TIN [version 1.2 PL2]
> 
> Larry Rosler (lr@hpl.hp.com) wrote:
> : Kernighan & Pike, The Practice of Programming (1999), p. 81, has a
> : comparative performance and code-size chart for a particular program.
> : Here are excerpts:
> :        250 MHz    400 MHz       Lines of
> :        R10000     Pentium II   source code
> : Java   4.9 sec    9.2 sec         105
> : Perl   1.8 sec    1.0 sec          18
> : A good book (as you can see :-)!
> 
> Huh?! Moving from the R1000 to the Pentium, Perl runs faster while
> Java runs slower? Why do they not at least both move in the same
> direction?

Possibly for the same reason that the Perl program beat the
C++ program on the Pentium.  Kernighan and Pike theorize that
the problem is the libraries used to compile the programs on
the Pentium.  Perl wasn't cursed by that problem, if that is 
the case.  And *I* certainly wouldn't disagree with Brian
Kernighan or Rob Pike...

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


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

Date: Mon, 21 Jun 1999 10:48:16 -0700
From: David Cassell <cassell@mail.cor.epa.gov>
Subject: Re: Perl scripts slows down servers?
Message-Id: <376E7AE0.B3FA9654@mail.cor.epa.gov>

Matt Sergeant wrote:
> David Cassell wrote:
> > [some tedious drivel, as usual :-]
> >
> > Is it?  The examples I have been shown are the artificial
> > optimized-Java-situation vs Perl-with-no-optimization-and-no-
> > mod_perl kind of cases.  You can always slow Perl down if you
> > try.. or if you use scripts from Matt Wright.  :-)
> 
> The recent example I'm thinking of are the perl vs Java vs Python for
> XML parsing tests done on xml.com. Java was about 10-20% faster.

Like I said.  Isn't XML one of the areas where the Perl modules
need work?  Just a rumor I heard.  Most of the fast-Java-example
things I've heard about are the Java servlets running on a highly-
optimized webserver system, vs Perl with no optimizations.  Isn't
this just one more such case?

That's the trouble with anecdotal evidence.  It's more than
adequate to convince the True Believer.  It's totally
inadequate to answer the question.  You'd never guess I'm a
statistician, now would you?  :-)

You're active in the Perl-Win32-users listserv, so you've seen
the web-speed postings that have appeared there over the past
few months.  Those are nice, but it's still anecdotal.  And
none answer someone else's specific question about using
sever Foo and database Bletch and...

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


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

Date: Mon, 21 Jun 1999 14:21:09 -0400
From: JDDemme <jddemme@technologist.com>
Subject: Perl tutorial
Message-Id: <376E8295.52CFD687@technologist.com>

I'm too cheap to buy a perl book, so does anybody know of a really good
perl tutorial. More than just CGI and files. more that what
www.cgi-101.com has.

Thanks,
JDDemme
jddemme@technologist.com


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

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


Administrivia:

Well, after 6 months, here's the answer to the quiz: what do we do about
comp.lang.perl.moderated. Answer: nothing. 

]From: Russ Allbery <rra@stanford.edu>
]Date: 21 Sep 1998 19:53:43 -0700
]Subject: comp.lang.perl.moderated available via e-mail
]
]It is possible to subscribe to comp.lang.perl.moderated as a mailing list.
]To do so, send mail to majordomo@eyrie.org with "subscribe clpm" in the
]body.  Majordomo will then send you instructions on how to confirm your
]subscription.  This is provided as a general service for those people who
]cannot receive the newsgroup for whatever reason or who just prefer to
]receive messages via e-mail.

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

	subscribe perl-users
or:
	unsubscribe perl-users

to almanac@ruby.oce.orst.edu.  

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

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

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

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

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

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


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

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