[10206] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 3800 Volume: 8

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Wed Sep 23 14:07:26 1998

Date: Wed, 23 Sep 98 11:01:36 -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           Wed, 23 Sep 1998     Volume: 8 Number: 3800

Today's topics:
    Re: Perl & Java - differences and uses <jdporter@min.net>
    Re: Perl & Java - differences and uses <borg@imaginary.com>
    Re: Perl & Java - differences and uses <borg@imaginary.com>
    Re: Perl & Java - differences and uses <borg@imaginary.com>
        Perl on OS/2: complains about missing autosplit.ix (Erik Huelsmann)
        Poll: How Did You Learn Perl? <jdporter@min.net>
    Re: Poll: How Did You Learn Perl? (Matt Knecht)
    Re: Poll: How Did You Learn Perl? <ckc@dmi.dk>
    Re: Poll: How Did You Learn Perl? (Philip T. Kasiecki)
    Re: Poll: How Did You Learn Perl? <barnett@houston.Geco-Prakla.slb.com>
    Re: Poll: How Did You Learn Perl? <merlyn@stonehenge.com>
    Re: Poll: How Did You Learn Perl? <upsetter@ziplink.net>
    Re: Poll: How Did You Learn Perl? <evonzee@tritechnet.com>
    Re: Poll: How Did You Learn Perl? <eashton@bbnplanet.com>
    Re: Poll: How Did You Learn Perl? (Snowhare)
        printing to a file - variables cause carriage returns?? <smadams@ozemail.com.au>
    Re: printing to a file - variables cause carriage retur <barnett@houston.Geco-Prakla.slb.com>
    Re: Q: Picking an element from a hash (not knowing whic <jdporter@min.net>
    Re: question about variable interpolation in search pat <eashton@bbnplanet.com>
    Re: question cgi droby@copyright.com
    Re: speed of subroutine call vs. call by function refer <sugalskd@netserve.ous.edu>
    Re: speed of subroutine call vs. call by function refer <sugalskd@netserve.ous.edu>
        undefined value as ARRAY reference <ff@creative.net>
    Re: win32:ODBC/Oracle->terrible perormance (Eisen Chao)
        Special: Digest Administrivia (Last modified: 12 Mar 98 (Perl-Users-Digest Admin)

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

Date: Wed, 23 Sep 1998 11:32:48 -0400
From: John Porter <jdporter@min.net>
Subject: Re: Perl & Java - differences and uses
Message-Id: <360914A0.3B892429@min.net>

George Reese wrote:
> 
> Zenin <zenin@bawdycaste.org> wrote:
> : What if Java had closures.  Would it be "wrong" to actually use them?
> : Or would Java some how be less of a language for even supporting
> : such a paradigm?
> 
> Java has method pointers.  A similar concept that does work in an OO
> paradigm.

The argument is not about whether Java does *in fact* have closures,
or *should* have closures.

The question is, IF java supported functional programming to some
extent, would it be wrong to use those features?  Or perhaps would
Java be less of a good choice for doing OO programming because of it?

Now, I don't particularly care what your answer might be.
I just was bothered by your misapprehension of the question.

-- 
John "Many Jars" Porter


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

Date: Wed, 23 Sep 1998 17:10:49 GMT
From: George Reese <borg@imaginary.com>
Subject: Re: Perl & Java - differences and uses
Message-Id: <tY9O1.1579$Ge.5238473@ptah.visi.com>

In comp.lang.java.programmer John Porter <jdporter@min.net> wrote:
: George Reese wrote:
:> I have provided premises which you can debate or not.  You have not
:> chosen to debate those premises.  What exactly do you want?
:> 
:> If I say:
:> 
:> All Americans speak French.
:> I am American.
:> Therefore I speak French.
:> 
:> As this argument follows from the premises, I have provided an
:> argument with support.  You can either choose to debate my premises or
:> concede that I speak French.

: (To continue using your analogy)
: You originally stated "I speak French".
: Others said, "Oh yeah? Prove it!"
: You responded: "I am American, and all Americans speak French".

: Now clearly, this is logically consistent, but it is not satisfactory.

: Others said, "All Americans speak French?!?!?!  Prove it!"
: And you have not responded, other than to say,
: "I speak French, All Americans speak French, and I have already
: proved it."

: So we (some of us) are still waiting for the proof that 
: all Americans speak French.  Maybe you could cite some Bureau of
: Census statistics.

No, this is not the case at all.  Only one person has actually
challenged any of my premises.  And that appears to be the only
constructive line of discussion going on in this thread.

:> I forget the exact context, but this says to me that someone was
:> claiming that the sole goal of OO is reuse.  A lot of people do in
:> fact make that claim and my general response to that is that reuse
:> does not render something OO.  It is not a comment on the primacy of OO.

: Mokay... But I'm still unclear as to how the claim
: "The sole goal of OO is reuse" can be interpreted to mean
: "The sole path to reuse is OO" -- which is what your response
: actually rebuts.

It is more complex than that and as I said, I don't remember the exact
context here.  Do we really need to spend all this time analyzing this
if you concede I am not arguing that everything should be OO?

:> You are taking my quotes out of context again.  I was talking about
:> you not taking my statements of proof of what I think.  My statements
:> are most definitely proof of what I think.  In other words, if I state
:> "my kitty cat is purple" that is good proof I think my cat is purple.

: If you think playing these semantic games will win you arguments,
: then have fun.  I won't waste my time with it.

What semantic games????  You fucking asked if "we were not clear on my
stand" to which I responded "shouldn't my statements be proof of what
my stand is". What the hell is the semantic game here?

:> :> For those things where taking an OO approach will not work, perl,
:> :> python, and java are all bad solutions.
:> 
:> : Which is to say, in the problem domain in which perl, python, and
:> : java are not bad solutions, OO is the best approach.
:> : Again, close enough to "OO is Everything" as makes no difference.
:> : (Yes, let's ignore embedded real-time systems.  Fair enough?)
:> 
:> If you say "ignore everything in which OO is not a good solution",
:> yes, my response will be "OO is everything".

: What I find interesting is that this clearly betrays that you
: think all non-[embedded/real-time/etc] domains are inherently
: best approached with OO.  That is the claim about which I am
: skeptical.

I knew you were going to state that, but I had hoped contrary to your
performance in this thread that you would not be so rude as to
intentionally take an extremist position on what I stated.

Because I say that real-time systems are not well suited to OO
programming, that does not imply ANYTHING about my thoughts on other
realms.

:> Any group development product or any development product that has a
:> chance of a long life cycle whose functionality could be accomplished
:> in perl should be approached from an OO point of view and not in fact
:> be done in perl.
:> 
:> I think the premises I have offered in this past support this
:> statement.  

: Yes, since I understand that by "support" you mean "restate".

No, I do not mean restate.  Go back and look at my formalized
argument.  Otherwise I am done with your deliberate misinterpretions
of me.

:> And no language absolutely positively forces
:> you to program in an OO manner.

: Hmm. Care to comment on Smalltalk specifically?

What about it?  I can write one class and build an entire application
from methods in that class by calling those methods procedurally.

No behaviour, no objects.  There is nothing a language can do to
enforce that.

:> For the type of program in question, the goal was that someone wanted
:> me to mimic some perl code.

: Well, Jim Woodgate asked:
:> how would you code the following
:>...
:> Please show me how using python would make this easier.

: For whatever reason (and I'm not faulting you), you chose to
: map the code verbatim into Python, rather than craft an idiomatic
: Python solution, thus passing by the opportunity to show
: "how using python would make this easier".

I believe I said something that it was ridiculous to ask how to make a
small program like that easier.

:> Furthermore, any hello world program in any language will appear
:> procedural unless you do something really bizarre.  And that was
:> nothing more than a fancy hello world program.

: Point well taken; although I challenge you on the "any language" bit.

Well, you have the answer.

-- 
George Reese (borg@imaginary.com)       http://www.imaginary.com/~borg
PGP Key: http://www.imaginary.com/servlet/Finger?user=borg&verbose=yes
   "Keep Ted Turner and his goddamned Crayolas away from my movie."
			    -Orson Welles


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

Date: Wed, 23 Sep 1998 17:25:38 GMT
From: George Reese <borg@imaginary.com>
Subject: Re: Perl & Java - differences and uses
Message-Id: <maaO1.1583$Ge.5238473@ptah.visi.com>

In comp.lang.java.programmer John Porter <jdporter@min.net> wrote:
: George Reese wrote:
:> 
:> Zenin <zenin@bawdycaste.org> wrote:
:> : What if Java had closures.  Would it be "wrong" to actually use them?
:> : Or would Java some how be less of a language for even supporting
:> : such a paradigm?
:> 
:> Java has method pointers.  A similar concept that does work in an OO
:> paradigm.

: The argument is not about whether Java does *in fact* have closures,
: or *should* have closures.

: The question is, IF java supported functional programming to some
: extent, would it be wrong to use those features?  Or perhaps would
: Java be less of a good choice for doing OO programming because of it?

: Now, I don't particularly care what your answer might be.
: I just was bothered by your misapprehension of the question.

I did not misunderstand the question.  I answered it.  I said that in
fact it had something similar and that the concept was captured in an
OO framework--not in a functional framework.

Method pointers/closures/functionals etc are not inherently
functional.

-- 
George Reese (borg@imaginary.com)       http://www.imaginary.com/~borg
PGP Key: http://www.imaginary.com/servlet/Finger?user=borg&verbose=yes
   "Keep Ted Turner and his goddamned Crayolas away from my movie."
			    -Orson Welles


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

Date: Wed, 23 Sep 1998 17:24:04 GMT
From: George Reese <borg@imaginary.com>
Subject: Re: Perl & Java - differences and uses
Message-Id: <U8aO1.1581$Ge.5238473@ptah.visi.com>

In comp.lang.java.programmer John Porter <jdporter@min.net> wrote:
: George Reese wrote:
:> 
:> Zenin <zenin@bawdycaste.org> wrote:
:> : With the exception of the last few
:> : posts from you, the only thing you have done throughout this entire
:> : thread is prove yourself a zealot.
:> 
:> No, you have tried to characterize me as such.  You don't have the
:> first bit of evidence to back up that characterization.

: All the evidence resides in a globally accessible repository.
: It is a mere excercise to cut and paste samples from it.

He is claiming I said one thing.  I state another.  I clearly can
never prove that I never said something.  Therefore the burden of
proof is on him.  Saying you can look it up in Deja News is not
evidence.  Without providing actual evidence, it is nothing more than
bullshit.

:> : Your own assertions do not equal "support".
:> 
:> In fact, they do.  You can argue with those assertions.  But a
:> supported argument is one in which the premises lead to the
:> conclusion.  I have provided premises that do lead to my conclusion.
:> 
:> You can argue the premises, but you cannot argue that I have failed to
:> provide support.

: I can and will.

: Given: A & B => C
: Which is to say: A and B implies C
: Or: if A and B then C.

: This is a statement in propositional logic, which complete and
: consistent.

: Now if I claim that C is true, and as "support" I also claim that
: A and B are true, I really have done nothing to validate my claim
: that C is true, unless I also demonstrate that A and B are true.
: This is not necessarily difficult; for example, I could find
: a way of reducing A and B to tautologies.

: In any case, your C is unsupported because of the very fact that your
: A and B are unsupported.  Your logical framework has no underpinning.
: (Or, if it does, you haven't provided it in this forum.)

THEN STATE WHETHER YOU HAVE A PROBLEM WITH A OR B OR BOTH AND THEN SAY
WHY.  You have made no effort to do so.  You have simply taken issue
with my conclusion without even presenting why you take issue with it.

:> ...you should determine your language
:> based on the requirements of your system.  So if your problem requires
:> paradigm A, you use a language that supports paradigm A.  If it
:> instead requires paradigm B, you use a language that supports paradigm
:> B.
:> 
:> How hard is this principle for you to understand?

: Not hard at all.

: I am particularly gratified that you encourage the use of a language
: which *supports* the chosen paradigm, rather than *enforces* it.
: By your statement above, Perl is an acceptable choice (perhaps not
: the best) when the paradigm is OO.

Supports and enforces are the same thing in this context.  Perl is a
particularly shitty choice of a language in an OO environment.

:> My statements alone are not proof of where I stand?  

: That's not the issue.
: No one wants proof of where you stand.
: We want proof for your claims.

Look, dumbass, you asked "Now are we clear on where you stand?" To
which I responded as above.  This bullshit about taking a statement I
CLEARLY made to support a direct question about being clear on where I
stand and placing it as if it were supposed to be used as evidence in
the argument ads a whole is 100% disingenuous and I have had enough of
it.

:> : : : (Of course, I admit that that is faulty, since in fact Python does
:> : : : not enforce OO any more than Perl does. But that's a different
:> : : : argument...)
:> : :
:> : : Would you care to back this up?

: By the way, I may have left a loose end in my other response to this.

: The point I was trying to make was that Python does not enforce OO
: any more than Perl does, and that some sample Python programs
: presented in this thread provide supporting evidence.
: The mere fact that non-OO Perl code can be transliterated directly
: into Python proves that Python does not enforce OO programming.

: This, of course, should not be taken as a suggestion that Python
: does not *support* OO much better than Perl; I have no doubt
: that it does!

As I stated before, no language can enforce OO along the lines you are
speaking of.

Now drop the line of thread about assigning me beliefs I do not hold
and claiming I am trying to argue from authority.  It is clear both
you and Zenin are intentionally misrepresenting me and it has pissed
me off to the boiling point.  I will not engage in any other
discussions on that topic.

-- 
George Reese (borg@imaginary.com)       http://www.imaginary.com/~borg
PGP Key: http://www.imaginary.com/servlet/Finger?user=borg&verbose=yes
   "Keep Ted Turner and his goddamned Crayolas away from my movie."
			    -Orson Welles


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

Date: 23 Sep 1998 16:21:12 GMT
From: ErikH@Bitsmart.com (Erik Huelsmann)
Subject: Perl on OS/2: complains about missing autosplit.ix
Message-Id: <wzgSQd1pdrdd-pn2-2P4ls1Z23dXh@localhost>


I have installed Perl 5.004-55 (which has been compiled for OS/2) on 
top of that I have installed the MIMETools (and the packages it 
needs).

One of the packages MIMETools needs is MailTools. When using any of 
the examples in MIMETools, Perl complains that it cannot find 
auto/Mail/Internet/autosplit.ix. This error is generated in one of the
Mailtools modules (Mail/Internet.pm).

What can I do to get rid of this error?

bye, Erik

--
Want to link your Psion to OS/2? Check out
http://www.bitsmart.com/erikh/PSI.html currently relayed to
http://www.oprit.rug.nl/hulsmann/PSI.html

[Don't mail posts, I will see them here just fine]



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

Date: Wed, 23 Sep 1998 12:38:04 -0400
From: John Porter <jdporter@min.net>
Subject: Poll: How Did You Learn Perl?
Message-Id: <360923EC.8E9919D0@min.net>

Matt Knecht wrote:
> 
> Jonathan Feinberg <jdf@pobox.com> wrote:
> >It really depends on your learning style. I'll wager that most of the
> >Perl hackers around learned Perl from the O'Reilly book _Learning
> >Perl_, which is now in its second edition.
> 
> I'll take that bet.  I'm placing my money on the online docs, with
> _Programming_Perl_ as a side companion.


I learned from the Pink Camel.

So here's a poll for everyone.

>From what resource(s) did you learn Perl?

 . Llama v.1
 . Llama v.2
 . Camel v.1
 . Camel v.2
 . Other book (give name)
 . Docs included in the distribution
 . Something on the WWW
 . Studying existing code
 . Class/tutor

-- 
John "Many Jars" Porter


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

Date: Wed, 23 Sep 1998 17:03:25 GMT
From: hex@voicenet.com (Matt Knecht)
Subject: Re: Poll: How Did You Learn Perl?
Message-Id: <xR9O1.320$7Q6.3411843@news2.voicenet.com>

John Porter <jdporter@min.net> wrote:
>So here's a poll for everyone.
>
>From what resource(s) did you learn Perl?

When I'm done learning perl, I'll let you know!  So far I've been at it
for almost 7 months now.  I have a feeling I have quite of bit time left
to go.

-- 
Matt Knecht - <hex@voicenet.com>


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

Date: Wed, 23 Sep 1998 19:13:40 +0200
From: Casper Kvan Clausen <ckc@dmi.dk>
Subject: Re: Poll: How Did You Learn Perl?
Message-Id: <Pine.GSO.3.92.980923190948.6326c-100000@edb>

I added one obvious category, and expanded the question to include more
than just the basics.

>From what resource(s) did you learn (are you still learning) Perl?

 . Llama v.1
 . Llama v.2
 . Camel v.1
X Camel v.2
X Other book (Advanced Perl Programming)
X Docs included in the distribution
X Something on the WWW
X Studying existing code
 . Class/tutor
X comp.lang.perl.misc

Plus I think Mastering Regular Expressions has had so much of an impact on
my coding that it deserves to be cited as a source for learning Perl, even
though technically it isn't Perl, but regular expressions in general.

Kvan.

-------Casper Kvan Clausen------ | 'Political correctness: Has it had
----------<ckc@dmi.dk>---------- |  its day? We interview a leading
           Lokal  544            |  poof.'
I do not speak for DMI, just me. |        - Mel Smith.



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

Date: 23 Sep 1998 17:04:32 GMT
From: pkasieck@cognex.com (Philip T. Kasiecki)
Subject: Re: Poll: How Did You Learn Perl?
Message-Id: <6ub9n0$33k$1@cognex.cognex.com>

In article <360923EC.8E9919D0@min.net>,
John Porter (jdporter@min.net) wrote:
: Matt Knecht wrote:
: > Jonathan Feinberg <jdf@pobox.com> wrote:
: > >It really depends on your learning style. I'll wager that most of the
: > >Perl hackers around learned Perl from the O'Reilly book _Learning
: > >Perl_, which is now in its second edition.

: > I'll take that bet.  I'm placing my money on the online docs, with
: > _Programming_Perl_ as a side companion.

: I learned from the Pink Camel.
: 
: So here's a poll for everyone.
: 
: From what resource(s) did you learn Perl?
: 
: . Llama v.1
: . Llama v.2

    Some from v.2.

: . Camel v.1
: . Camel v.2

    Some from v.2.

: . Other book (give name)

    Perl 5 Interactive Course (Jon Orwant), Waite Group Press

: . Something on the WWW

    A little from here.

: . Studying existing code

    Some of this- studying CGI scripts done by another engineer in the
department.

        Phil Kasiecki

-- 
Philip T. Kasiecki
Hardware Engineering Co-op, Cognex Corporation
pkasieck@cognex.com
pkasieck@ieee.org
http://lynx.dac.neu.edu/p/pkasieck/


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

Date: Wed, 23 Sep 1998 12:16:21 -0500
From: Dave Barnett <barnett@houston.Geco-Prakla.slb.com>
Subject: Re: Poll: How Did You Learn Perl?
Message-Id: <36092CE5.45C24438@houston.Geco-Prakla.slb.com>

John Porter wrote:
> 
> I learned from the Pink Camel.
> 
> So here's a poll for everyone.
> 
> From what resource(s) did you learn Perl?
> 
I learned by using:

> . Llama v.1
> . Camel v.2
> . Other book (give name)
'Learn Perl in 21 Days' by David Till ...
Has some errors, but it was a good tutorial for me.  I had very limited
experience with C/C++ when I started learning Perl, so I needed a bit
more hand-holding than was provided in the Camel.  The tutorial helped
fill in the gaps so that then reading the Camel made sense to me.

> . Docs included in the distribution
When I have questions that aren't in the Camel, or I don't have my Camel
handy.

> . Something on the WWW
Sometimes, but I usually use the distribution-contained documentation or
the Camel.

> 
> --
> John "Many Jars" Porter

Cheers,
Dave

-- 
Dave Barnett	Software Support Engineer	(281) 596-1434


Smile.  It makes people wonder what you're up to.


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

Date: Wed, 23 Sep 1998 17:36:49 GMT
From: Randal Schwartz <merlyn@stonehenge.com>
Subject: Re: Poll: How Did You Learn Perl?
Message-Id: <8cd88mybms.fsf@gadget.cscaper.com>

>>>>> "John" == John Porter <jdporter@min.net> writes:

John> I learned from the Pink Camel.

John> So here's a poll for everyone.

John> From what resource(s) did you learn Perl?

John> . Llama v.1
John> . Llama v.2
John> . Camel v.1
John> . Camel v.2
John> . Other book (give name)
John> . Docs included in the distribution
John> . Something on the WWW
John> . Studying existing code
John> . Class/tutor

Playing with Perl version 1 and 2, then being an alpha tester for Perl
3, then writing the Pink Camel.  (You learn a lot when you have to
write about it. :)

Most of my students learn it from me though. :)

-- 
Name: Randal L. Schwartz / Stonehenge Consulting Services (503)777-0095
Keywords: Perl training, UNIX[tm] consulting, video production, skiing, flying
Email: <merlyn@stonehenge.com> Snail: (Call) PGP-Key: (finger merlyn@teleport.com)
Web: <A HREF="http://www.stonehenge.com/merlyn/">My Home Page!</A>
Quote: "I'm telling you, if I could have five lines in my .sig, I would!" -- me


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

Date: Wed, 23 Sep 1998 17:45:12 GMT
From: Scratchie <upsetter@ziplink.net>
Subject: Re: Poll: How Did You Learn Perl?
Message-Id: <IsaO1.588$_c5.5369367@news.shore.net>

Pink Llama. It was many months before I even came up against a problem
that required cracking open the Camel.

--Art

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


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

Date: Wed, 23 Sep 1998 12:43:50 -0500
From: Eric Von Zee <evonzee@tritechnet.com>
Subject: Re: Poll: How Did You Learn Perl?
Message-Id: <36093355.CC506620@tritechnet.com>

Well...

 . Llama v.1
 . Llama v.2
 . Camel v.1
 . Camel v.2
x Other book (give name) Perl5 Quick Reference
 . Docs included in the distribution
 . Something on the WWW
 . Studying existing code
 . Class/tutor

I don't know if this is something to be ashamed of or not, but I 've never
even looked at a Llama/Camel book.  From the general opinion, though, that
might explain why I have yet to understand stuff like dereferencing,  <=>,
and pack()...

Ah, well, I'll learn someday.. as soon as I raise pocket $ to go buy a
Camel...

Cheers,

-Eric





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

Date: Wed, 23 Sep 1998 17:50:49 GMT
From: Elaine -HappyFunBall- Ashton <eashton@bbnplanet.com>
Subject: Re: Poll: How Did You Learn Perl?
Message-Id: <3609328D.58F0D0DF@bbnplanet.com>

John Porter wrote:

> From what resource(s) did you learn Perl?

>From the blowtorch that happened to be warming my chair at the time. We
had a project, we had to do it in Perl and we had a deadline. I will
admit being with two other people who knew a bit more than I did at the
time and xemacs' syntax highlighting made it much easier to deal with.
The online perldocs and the Llama/Camel also were invaluable resources,
though I doubt that I would have learned it as fast on my own being a
recovering C++ jerky-girl. Perl is cool.

e.

"All of us, all of us, all of us trying to save our immortal souls, some
ways seemingly more round-about and mysterious than others. We're having
a good time here. But hope all will be revealed soon."  R. Carver


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

Date: 23 Sep 1998 11:34:21 -0600
From: snowhare@xmission.xmission.com (Snowhare)
Subject: Re: Poll: How Did You Learn Perl?
Message-Id: <6ubbet$7fl$1@xmission.xmission.com>



Nothing above this line is part of the signed message.

In article <360923EC.8E9919D0@min.net>, John Porter  <jdporter@min.net> wrote:
>Matt Knecht wrote:
>> 
>> Jonathan Feinberg <jdf@pobox.com> wrote:
>> >It really depends on your learning style. I'll wager that most of the
>> >Perl hackers around learned Perl from the O'Reilly book _Learning
>> >Perl_, which is now in its second edition.
>> 
>> I'll take that bet.  I'm placing my money on the online docs, with
>> _Programming_Perl_ as a side companion.
>
>
>I learned from the Pink Camel.
>
>So here's a poll for everyone.
>
>From what resource(s) did you learn Perl?

[...]

>. Camel v.1

Bingo. I find electronic docs to generally be a pain - and generally
speaking the more 'sophisticated' the worse. My scale of 'useful
electronic docs' hits zero near PostScript (What is it with academics? 
They all want to distribute technical docs as PostScript. Which I can't
print. :( ) and PDF and maximizes near clearly formatted plain text and
good HTML. POD and man I find only useful after dumping to a text file
which I can pull into an editor or print. 

Anything much more than a couple of screenfuls is simply hard to
understand on screen. Its like the three blindmen and the elephant: You
simply can't see enough at one time to really understand it. Hypertext
(HTML) is about the only format that has the potential of making *really*
good electronic documentation - because it doesn't try to make the
computer screen a poor imitation of a printer. However, few people are
good at writing good hypertext documentation - it is a significantly
harder task than writing good printed documentation (which it includes as
a sub-task).

Benjamin Franz


Version: 2.6.2

iQCVAwUBNgkxBejpikN3V52xAQFt5AQAqr5XcItKKaRYMNt0BwlsfaDpLsQjNsYL
tdQTQUBS+XpZrmYAMi2t4TYgFL6KuXrPnTCw7RNIWORD+7jLxiKvXJ0R6khJnoH6
pZcly+MfxJIboi1zIESzLOncU1cfi6B/i+ZFbJq5jR/PbiOmB/Dyl9AXQFo8RpGT
nFPZuCAH7AA=
=OBn5
-----END PGP SIGNATURE-----


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

Date: Thu, 24 Sep 1998 02:08:37 +1000
From: "Steve Adams" <smadams@ozemail.com.au>
Subject: printing to a file - variables cause carriage returns??
Message-Id: <6ub698$imn$1@reader1.reader.news.ozemail.net>

Dear All,

Thanks to those who have helped so far to redirect my output to a file.
However I continually hit the problem that each time I write a variable to
the file it forces a carriage return. I am very new to PERL so I'm sure it's
a simple mistake but it's for something rather urgent so I don't have the
time to sit down and learn it all as I would like to soon.

Here is the code that is having the problem

#!/usr/bin/perl
print "E-mail Forwarding\n\n";
print "Enter your UserID : ";
$userid=<STDIN>;
print "Enter your password : ";
$password=<>;
print "Enter the e-mail address to forward to : ";
$email=<>;
open (FILE_HANDLE, ">$userid");
print FILE_HANDLE "user ","$userid $password\nput .forward\nbye";
close(FILE_HANDLE);

THE FILE CREATED ($USERID) ALWAYS LOOKS LIKE THIS

user userid
 password

put .forward
bye

THE FILE LAYOUT NEEDS TO LOOK LIKE THIS

user userid password
put .forward
bye

Can you please help me ammend this code so that this will work. Any help
would be greatly appreciated.

Thanks

Steve Adams





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

Date: Wed, 23 Sep 1998 12:25:46 -0500
From: Dave Barnett <barnett@houston.Geco-Prakla.slb.com>
Subject: Re: printing to a file - variables cause carriage returns??
Message-Id: <36092F1A.644DE685@houston.Geco-Prakla.slb.com>

Steve Adams wrote:
> 
> Here is the code that is having the problem
> 
> #!/usr/bin/perl
> print "E-mail Forwarding\n\n";
> print "Enter your UserID : ";
> $userid=<STDIN>;
perldoc -f chomp

> print "Enter your password : ";
> $password=<>;
perldoc -f chomp

> print "Enter the e-mail address to forward to : ";
> $email=<>;
perldoc -f chomp

> open (FILE_HANDLE, ">$userid");
> print FILE_HANDLE "user ","$userid $password\nput .forward\nbye";
> close(FILE_HANDLE);
> 
> THE FILE CREATED ($USERID) ALWAYS LOOKS LIKE THIS
Because you told it too......

What does the user enter when prompted for their userid?
userid<RETURN>

Hmmm....  <RETURN>....  What does your variable $userid have in it? 
userid\n  (assuming unix).

perldoc -f chomp

HTH.

Cheers,
Dave

-- 
Dave Barnett	Software Support Engineer	(281) 596-1434


Smile.  It makes people wonder what you're up to.


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

Date: Wed, 23 Sep 1998 12:29:03 -0400
From: John Porter <jdporter@min.net>
Subject: Re: Q: Picking an element from a hash (not knowing which!) [Zorn's lemma?]
Message-Id: <360921CF.8E95AD2C@min.net>

Tad McClellan wrote:
> 
>    push @a, (keys %h)[0] if @a == 0;

@a or @a = ( (each %ENV)[0] );

-- 
John "Many Jars" Porter


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

Date: Wed, 23 Sep 1998 17:43:57 GMT
From: Elaine -HappyFunBall- Ashton <eashton@bbnplanet.com>
Subject: Re: question about variable interpolation in search pattern
Message-Id: <360930F1.554A627C@bbnplanet.com>

$foo = 'there';
$template_line = "hello $foo";
print "template_line is $template_line\n";

while($line = <>) {
    if($line =~ m/$template_line/) {
        print "Found matching line\n";
        print "Line is $line\n";
    }
  exit;
}
exit;

e.

"All of us, all of us, all of us trying to save our immortal souls, some
ways seemingly more round-about and mysterious than others. We're having
a good time here. But hope all will be revealed soon."  R. Carver


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

Date: Wed, 23 Sep 1998 17:20:26 GMT
From: droby@copyright.com
Subject: Re: question cgi
Message-Id: <6ubakq$rld$1@nnrp1.dejanews.com>

In article <3607FCDB.AB43F7B0@tvd.be>,
  Bencer <mb10265@tvd.be> wrote:
> Bonjour,
>
> Cela dipend de votre programme perl.
> Il vous faut un compilateur perl sur votre machine.
> Il existe des compilateurs perl sur toutes les plateformes.
>
> Bien ` vous.
>
> zaliko wrote:
>
> > bonjour
> >
> > comment tester en local des cgi et programme perl avec mon navigateur
> > sans activer un serveur http sur ma machine
> > est ce possible ,et comment faire !
> >
> > Merci pour la reponse
>
>


Si vous utilisez CGI.pm, vous pouvez tester vos programmes de cgi sans
utiliser un browser ou un webserver. La section "DEBUGGING" dans la
documentation de CGI.pm explique.

--
Don Roby
<droby@copyright.com>

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


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

Date: 23 Sep 1998 16:41:56 GMT
From: Dan Sugalski <sugalskd@netserve.ous.edu>
Subject: Re: speed of subroutine call vs. call by function reference
Message-Id: <6ub8ck$b49$1@news.NERO.NET>

Jarkko Hietaniemi <jhi@alpha.hut.fi> wrote:

: Which OS and HW are you using?  A _really_ lousy thread implementation
: could explain the >100% difference.

Well, there is a significantly longer codepath for subroutine calls with
threads, along with several mutex gets/releases. My worst-case benchmarks
on OpenVMS (which had, at one point, *really* expensive mutexen) showed a
400% increase in subroutine call times. (With perlbench)

Those numbers don't suprise me--subroutine calls are the place that perl
pays the highest price for threads.

					Dan


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

Date: 23 Sep 1998 16:43:48 GMT
From: Dan Sugalski <sugalskd@netserve.ous.edu>
Subject: Re: speed of subroutine call vs. call by function reference
Message-Id: <6ub8g4$b49$2@news.NERO.NET>

John Porter <jdporter@min.net> wrote:
: Dan Sugalski wrote:
:> 
:> Lexical @_ seems to add some overhead too.

: "Lexical @_" ???

: Either I am badly confused, or this term is lacking in precision.
: Can you clarify?

With threaded per, @_ is no longer a variable in $main::. It's lexical,
like any my'd variable. It's gotta be--if it was global, multiple threads
would clobber each other's @_ and $_. (You could argue that it should be a
per-thread global rather than a lexical, but let's not go there right now)

					Dan


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

Date: Wed, 23 Sep 1998 10:54:25 -0700
From: Farhad Farzaneh <ff@creative.net>
Subject: undefined value as ARRAY reference
Message-Id: <360935D5.A088CDA@creative.net>

Hello,

I have some code that includes (modified for testing):

	    my $r = $rField->range;  # a method of object instance $rField
	    print "Undefined\n" if ( !defined($r));
	    my @range = @$r;

and which does print the "Undefined".  It chokes on the last line with the
following error:

# Can't use an undefined value as an ARRAY reference.

However, when I try to build a short script to test this, I never get this
error.  I'm not sure why this error occurrs in one case and not in another. 
Is it because I'm using an object in the former case??  That doesn't make any
sense to me...

Here's the test script:

#!/bin/perl

my $f;  # keep this undefined
print "Undefined\n" if ( !defined($f));
my @r = @$f;

# Now play with unsing returns from undefined subroutines
print "foo = ",&foo,"\n";
print @{&foo};
print %{&foo};

sub foo {
    return;
}

Thanks in advance.

Farhad Farzaneh


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

Date: 23 Sep 1998 17:01:16 GMT
From: echao@interaccess.com (Eisen Chao)
Subject: Re: win32:ODBC/Oracle->terrible perormance
Message-Id: <6ub9gs$llp$1@supernews.com>

Dirk Rottmar (rottmar@deutschland.de) wrote:
: Hi,
: 
: I just developed a cgi script which runs under NT 4.0 and connects to an
: Oracle 8.0 DB-Server (on the same machine) via ODBC (oracle driver) and
: win32:ODBC.
: 
: My problem is, that my queries are incredibly slow, that means, that
: there are about 4000 datasets in a table. I do a SELECT which should
: return about 50 rows and it takes about 5 minutes to get the results
: :-(
: 
: Do I realy have to use ASP to get my queries done? PLEASE HELP.
: 
: Dirk

  Dirk,

  I've worked a little with VB/Java-to-Oracle database programs
  and what I've found out from various Client-Server books is that
  you really don't want to be pulling all 4000+ records down to
  the Client.

  The technique that *real* C/S programmers use is a kind of
  buffered recordset, array filled up by a query that limits the
  number of rows returned. When the user wants to see more, 
  the query is re-submitted and the array is then filled up
  with the next 10-50 records. SQL Server does in fact have
  a 'next 50' option for a select; I don't know what the
  equivalent in Oracle would be as I didn't see it in my
  Oracle class study guide nor in the manual. But theoretically
  you can implement this in any Relational Database.

  It is in this way that:

  1) Network is not tied up moving large amounts of
     records to *AND* from the database server

  2) You lessen the odds of having stale data as
     you are focussed only on the data that you've
     just fetched. In a multi-user environment, there
     will be other people updating and changing records.
     By limiting the # of records you 'fetch' you are
     also limiting the # of records that need to be
     refreshed. In your case, that would be 50 versus
     4000.

  3) This also simplifies concerns about locking.

  The downsize of all this ? You have to program more in
  order to make a passably and responsive user interface,
  your query has to be up to snuff. The Java development
  programs I've seen (Progress Aptivity) took care of all
  the programming on the client side.

  Another way to speed up things is to create and use
  stored procedures. Oracle will compile pre-compile
  stored procedures into the best optimized versions for
  a given setup, whereas submitting an SQL query into
  Oracle isn't optimized at all.

  To read up on C/S Visual basic & SQL Server database
  techniques, get a copy of "The Hitchhikers Guide to VB
  and SQL Server", as it is highly informative and still
  applicable to Oracle. The latter chapters are highly 
  MS SQL Server specific.

  The Publisher ? Microsoft Press, Natch.


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

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

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