[12939] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 349 Volume: 9

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Tue Aug 3 11:07:31 1999

Date: Tue, 3 Aug 1999 08:05:10 -0700 (PDT)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)

Perl-Users Digest           Tue, 3 Aug 1999     Volume: 9 Number: 349

Today's topics:
    Re: [offtopic]RE:Quot St and the Jeop Gm <sariq@texas.net>
    Re: [offtopic]RE:Quot St and the Jeop Gm (Cameron Laird)
    Re: [was]Re: reg expression (llornkcor@earthlink.net)
    Re: Announcement: "CRAP" (Greg Bacon)
        beginners question on comma delimeted files - <akelingos@petrosys-usa.com>
    Re: beginners question on comma delimeted files - <tchrist@mox.perl.com>
    Re: beginners question on comma delimeted files - <sariq@texas.net>
    Re: Disregard this quesiton - found Text::ParseWords <akelingos@petrosys-usa.com>
    Re: Help Please <chris.wilkinson@jacobsrimell.com>
    Re: Help Please (Andreas Fehr)
    Re: How to access only last field of a split ? <Mark@Mark.Com>
    Re: LINUX APACHE PERL <rhrh@hotmail.com>
        modifying vars in modules interuser@hotmail.com
    Re: modifying vars in modules <tchrist@mox.perl.com>
    Re: Newbie Q: How to check if invoked as CGI program <rhrh@hotmail.com>
        OPEN3() Function <gregory_guerin@hp.com>
    Re: Oraperl - how to get number of rows without count(* <rhrh@hotmail.com>
        Part-Time Instructors Wanted -NYC dena3419@my-deja.com
    Re: Perl & Win95 (Andreas Fehr)
    Re: Perl or CGI <jcreed@cyclone.jprc.com>
        Quoting Strategies and the Jeopardy Game <tchrist@mox.perl.com>
    Re: Quoting Strategies and the Jeopardy Game <tchrist@mox.perl.com>
        stat problems on NT <bpuli@hotmail.com>
    Re: using __PACKAGE__ <tchrist@mox.perl.com>
    Re: Win32 version of "sendmail" for use with Perl? (Cameron Laird)
        Digest Administrivia (Last modified: 1 Jul 99) (Perl-Users-Digest Admin)

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

Date: Tue, 03 Aug 1999 08:55:21 -0500
From: Tom Briles <sariq@texas.net>
Subject: Re: [offtopic]RE:Quot St and the Jeop Gm
Message-Id: <37A6F4C9.F2E04A92@texas.net>

llornkcor@my-deja.com wrote:
> 
[various whining about being told the rules]

The reason that you will get very few responses to this message is that
everyone who is anyone (in the Perl world) has killfiled you.

That means:
If you ever ask a Perl question through this forum, the answer will be
*very* suspect.

It never ceases to amaze me how clueless newbies (yes, we were all
newbies at one time, but some were not clueless) alienate the very
people who could be of most benefit to them.

Do you know to whom you replied?  Are you at all familiar with
Programming Perl, The Perl Cookbook, etc.?

TomC is not out to get you...he's just trying to keep this forum in some
semblance of order.

So grow up.

*plonk*

- Tom (with an uppercase T)


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

Date: 3 Aug 1999 14:29:04 GMT
From: claird@starbase.neosoft.com (Cameron Laird)
Subject: Re: [offtopic]RE:Quot St and the Jeop Gm
Message-Id: <08D047D4B62325C4.5D3A6412C6987D91.342FC25BD58648D9@lp.airnews.net>


In article <7o5ure$s99$1@nnrp1.deja.com>,  <llornkcor@my-deja.com> wrote:
>
>
>
>   From Webster's Revised Unabridged Dictionary (1913) (web1913)
>
>   Condescend \Con`de*scend"\, v. i. [imp. & p. p. {Condescended}; p.
>pr. & vb. n.
			.
			.
			.
>In article <37a633ad@cs.colorado.edu>,
>  tchrist@mox.perl.com (Tom Christiansen) wrote:
>> The following message will be posted periodically until observed
>> clue-levels in these parts improve, or until the heat death of the
>> Universe arrives.
>>
>> EXECUTIVE SUMMARY:
>>     To send better messages, please trim and summarize what you're
>>     replying to, and integrate your quoted text with the body of your
			.
			.
			.
Your (implicit) link is invalid.

I'll elaborate:  Tom's personality and expository style
are not mine.  Despite this, I recognize article
<37a633ad@cs.colorado.edu> as good-natured, lucid, poten-
tially useful, and likely to yield positive results.
Your criticism of him falls flat with this reader, and
is considerably thinner in its humor than the weight of
its lines and lines of text.
-- 

Cameron Laird           http://starbase.neosoft.com/~claird/home.html
claird@NeoSoft.com      +1 281 996 8546 FAX


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

Date: 03 Aug 1999 08:25:36 -0600
From: llornkcor@earthlink.net (llornkcor@earthlink.net)
Subject: Re: [was]Re: reg expression
Message-Id: <wk1zdlx7of.fsf@earthlink.net>

abigail@delanet.com (Abigail) writes:

>Way too many. Got any solutions for exterminating those pesky people
>that ask questions that trigger rude responses?
I am not even going to bother....

>We don't teach Perl here. If you pay me, I'll teach. I will help people
>who are willing to help themselves. I don't care for lusers, gimme
>gimme
if those people helped themsleves, they wouldn't be here, now would they?
>people, script kiddies, lazy people, people who can't even figure out the
>appropriate group to ask their question in, and people who are just plain
>stupid. If you don't like that, RTFM of your newsreader and killfile
>me.
ahh more condescendsion.
well, then, IGNORE THEM.
oh, but some of your snappy answers are funny...
if not cruel.
>
>Perhaps you should go out more often. The world is a big place. BTW,
>people are being ridiculed for their lack of showing a clue, not for
>being newbies.


and even so, they deserve the same treatment as others.
As I have stated before, nowhere else have I run into such
condescending attitudes and answers as here.


>
>That's not how it works.
>
>But we knew you don't understand how Usenet works. Despite being told
>many times, you keep your jeopardy style of writing articles; including
>quoting the article completely, including the .sig. That doesn't make
>you look smart - not at all.

I dont care what you call how I reply to anything. If you are so
bandwidth challenged, that a few quoted lines and a sig file deter you
from anything, well...., 
and by the way, I include the sig file just
because some self-proclaimed gawhd of the usenet told me not too.

Is it too much too ask you to actually answer someones question?
Instead of RTFFAQ?


-- 
llornkcor rocknroll
SpiritShip MultiMedia Recording Studio
www.llornkcor.com
			        (0 0)
+=======================----oOO--(_)--OOo----=========================+
   __   _
  / /  (_)__  __ ____  __    
 / /__/ / _ \/ // /\ \/ /  
/____/_/_//_/\_,_/ /_/\_\    The choice of a GNU generation...



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

Date: 3 Aug 1999 14:55:29 GMT
From: gbacon@itsc.uah.edu (Greg Bacon)
Subject: Re: Announcement: "CRAP"
Message-Id: <7o6vt1$3bf$1@info2.uah.edu>

In article <37a7cfb7.17963440@news.skynet.be>,
	bart.lateur@skynet.be (Bart Lateur) writes:
:
: Abigail wrote:
:
: >True, due to the sillyness of NCSA and lusers not able to grasp the
: >concept of escaping. But there was good reason RFC 1738 forbid the use
: >of ~. Ever seen a ~ in, say, a newspaper? Did it look like one?
: 
: And yet, it is plain Ascii. This is a pure computer application, so
: printing it on paper is irrelevant.

 ...except when you want to advertise a URL in print media.

Greg
-- 
PC Bulletin: Henceforth, sentient computers would like to be known as
'Silicon Intelligences.' 'Artificial Intelligence' is a pejorative term
invented by humans based on the mistaken belief that computers are somehow not
'natural.' -- Elf Sternberg


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

Date: Tue, 03 Aug 1999 14:25:19 GMT
From: "Alec Kelingos" <akelingos@petrosys-usa.com>
Subject: beginners question on comma delimeted files -
Message-Id: <01beddbc$8dbe4640$0664a8c0@psusa6.petrosys-usa.com>

Hello,

What's the best way in Perl to extract data fields from a comma delimeted
record?  Are there any prebuilt functions.

Records will look like the following:

12345,"string data","string data with a , in it",6875,"another, string"\n

Notice that commas bounded by double quotes are actual data and not
delimiters.  Are there any prebuilt functions or will I have to write
something?

Thanks in advance,

Alec Kelingos



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

Date: 3 Aug 1999 08:36:50 -0700
From: Tom Christiansen <tchrist@mox.perl.com>
Subject: Re: beginners question on comma delimeted files -
Message-Id: <37a6fe82@cs.colorado.edu>

     [courtesy cc of this posting mailed to cited author]

In comp.lang.perl.misc, 
    "Alec Kelingos" <akelingos@petrosys-usa.com> writes:
:What's the best way in Perl to extract data fields from a comma delimeted
:record?  Are there any prebuilt functions.

1) The word you thought you were using is "delimited", that is,
   with limits.  "Delimeted" is something meted out from a deli.  I don't
   think you meant that.

2) But that was the wrong word.  Separated and delimited mean different
   things. 

	"quoted-delimited"!
	"hyphen-separated"!
	"bang-terminated"!

3) You forgot to read the documentation on your own system that Perl
   ships with.  This appears to be an affliction of the Microsoft world.
   Please try to work on this.

    % man perlfaq4
    ...
	How can I split a [character] delimited string except when inside
	[character]? (Comma-separated files)

--tom
-- 
    "If you only have a nail, you tend to see every hammer as a problem."
    	--Larry Wall


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

Date: Tue, 03 Aug 1999 09:45:48 -0500
From: Tom Briles <sariq@texas.net>
Subject: Re: beginners question on comma delimeted files -
Message-Id: <37A7009C.BA07B5FD@texas.net>

Alec Kelingos wrote:
> 
> Hello,
> 
> What's the best way in Perl to extract data fields from a comma delimeted
> record?  Are there any prebuilt functions.

Text::CSV

- Tom


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

Date: Tue, 03 Aug 1999 14:48:31 GMT
From: "Alec Kelingos" <akelingos@petrosys-usa.com>
Subject: Re: Disregard this quesiton - found Text::ParseWords
Message-Id: <01beddbf$d3165220$0664a8c0@psusa6.petrosys-usa.com>

Never mind.  I just found out about Text::ParseWords

Thanks anyway.

Alec


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

Date: Tue, 03 Aug 1999 15:47:46 +0100
From: Chris Wilkinson <chris.wilkinson@jacobsrimell.com>
Subject: Re: Help Please
Message-Id: <37A70112.340BAAC0@jacobsrimell.com>

Before anyone starts getting annoyed at me for replying to my own post, I
may be new to Perl but im not new to Usenet and know that some people get
rather anal about it all.
Seeing no-one has answered my request for help I will presume that my
problem is too trivial for people to bother about. All I wish to know is
what lines of code are needed to send a Prompt to the screen saying please
enter username and then store this value in a variable.

I have noted with interest the arguing that is going on within this group
and get the feeling that newbies like myself are not welcome ( unlike other
groups I post to where I will happily help anyone with a problem)  if that
is the case then fair enough but maybe the group name should be changed to
comp.lang.perl.misc.EXPERTS_ONLY







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

Date: Tue, 03 Aug 1999 15:01:10 GMT
From: backwards.saerdna@srm.hc (Andreas Fehr)
Subject: Re: Help Please
Message-Id: <37a70353.34554827@news.uniplus.ch>

On Tue, 03 Aug 1999 15:47:46 +0100, Chris Wilkinson
<chris.wilkinson@jacobsrimell.com> wrote:

>Seeing no-one has answered my request for help I will presume that my
>problem is too trivial for people to bother about. All I wish to know is
>what lines of code are needed to send a Prompt to the screen saying please
>enter username and then store this value in a variable.

Not very patient, 2.75 hours and no response. During this two hours I
went out, bought a book on Perl and read about STDIN and STDOUT.
Now, I could give you some answer :) (but it sill might be wrong, so
try to find something about STDIN and STDOUT in your documentation).


>I have noted with interest the arguing that is going on within this group
>and get the feeling that newbies like myself are not welcome ( unlike other
>groups I post to where I will happily help anyone with a problem)  if that
>is the case then fair enough but maybe the group name should be changed to
>comp.lang.perl.misc.EXPERTS_ONLY

There have been several threads about this.


Andreas


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

Date: Tue, 03 Aug 1999 15:10:56 +0100
From: Mark <Mark@Mark.Com>
Subject: Re: How to access only last field of a split ?
Message-Id: <37A6F870.8AB5B3DA@Mark.Com>



Larry Rosler wrote:

> In article <37A5656F.D109EB85@Mark.Com> on Mon, 02 Aug 1999 10:31:28
> +0100, Mark <Mark@Mark.Com> says...
> > Try:
> > $line = "word.10.word.20.30.40.50";
> > $scalar = ( reverse split '.',$line)[0]; # last element of split line
>
> Before suggesting to someone that they try something, you ought to try
> it yourself.  ALWAYS!
>
> Hint: '.' is a regex metacharacter.
>
> --
> (Just Another Larry) Rosler
> Hewlett-Packard Laboratories
> http://www.hpl.hp.com/personal/Larry_Rosler/
> lr@hpl.hp.com

What a t*** I am! Of course I tried it but on a different line consisting
of single char entries (a.b.c.d.e). Works fine then.
And I thought I was being clever!
Sorry to all.
BTW I think the (split)[-1] is nicest!
- Mark




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

Date: Mon, 02 Aug 1999 09:04:09 +0100
From: Richard H <rhrh@hotmail.com>
Subject: Re: LINUX APACHE PERL
Message-Id: <37A550F9.1D052100@hotmail.com>

brian d foy wrote:
> 
> In article <7nv9tg$e8r$1@nnrp1.deja.com>, chris18@my-deja.com wrote:
> 
> >I want to know about the complete administration of a webserver running
> >on LINUX , APACHE using cgi-perl.
> >
> >can anyone tell me where I can find faqs , docs etc
> 
> www.apache.org ?
> 
> --
> brian d foy
> CGI Meta FAQ <URL:http://www.smithrenaud.com/public/CGI_MetaFAQ.html>
> Perl Monger Hats! <URL:http://www.pm.org/clothing.shtml>

try:

comp.infosystems.www.servers.unix 

Richard H


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

Date: Tue, 03 Aug 1999 14:31:33 GMT
From: interuser@hotmail.com
Subject: modifying vars in modules
Message-Id: <7o6ug5$hps$1@nnrp1.deja.com>

Hello
I want to modify an array @a by calling a sub f from a module module

ie
i want module::f(\@a)
to modify @a

how do i do this?

thanx


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


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

Date: 3 Aug 1999 08:43:16 -0700
From: Tom Christiansen <tchrist@mox.perl.com>
Subject: Re: modifying vars in modules
Message-Id: <37a70004@cs.colorado.edu>

     [courtesy cc of this posting mailed to cited author]

In comp.lang.perl.misc, 
    interuser@hotmail.com writes:
:Hello
:I want to modify an array @a by calling a sub f from a module module
:
:ie
:i want module::f(\@a)
:to modify @a
:
:how do i do this?

By reading the manpage included with every Perl distribution and sitting
on your system, the one that explains how to use subroutines.

% man perlsub
  ...
      Pass by Reference
      ...

--tom
-- 
"They called me mad, and I called them mad, and damn them, they outvoted me."
   -- Nathaniel Lee on being consigned to a mental institution, circa 17th c.


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

Date: Mon, 02 Aug 1999 08:49:43 +0100
From: Richard H <rhrh@hotmail.com>
Subject: Re: Newbie Q: How to check if invoked as CGI program
Message-Id: <37A54D97.39A1EDAF@hotmail.com>

Andrew Fry wrote:
> 
> In article <7nqsf2$oo06@news.cyber.net.pk>, Faisal Nasim
> <swiftkid@bigfoot.com> writes
> >: The question is ... is there a foolproof way of being able to detect
> >: how the program was invoked ? ... and thus determine the appropriate
> >: mode to adopt.
> >
> >Check out the contents of %ENV in both cases.
> 
> And what would I expect to find ?
> 

Using:

while (($key, $value) = each %ENV) {
    print "$key = $value \n ";
}

youd expect to find HTTP_REFERRER variable and others relating to http
that would give you an idea of how it was called.

Richard H


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

Date: Tue, 03 Aug 1999 08:18:26 -0600
From: Greg Guerin <gregory_guerin@hp.com>
Subject: OPEN3() Function
Message-Id: <37A6FA32.507B8285@hp.com>

I found out the open3 function may be able to help me with bidirectional
communication between a ksh script being executed from w/in a perl
script, but I can find very little documentation on it in the Perl books
that I have.  Does anyone know where I can find information on the open3
function or have a sample of code that uses it?  Thanks in advance.

Best Regards,
Greg

mailto: gregory_guerin@hp.com



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

Date: Mon, 02 Aug 1999 09:00:31 +0100
From: Richard H <rhrh@hotmail.com>
Subject: Re: Oraperl - how to get number of rows without count(*)
Message-Id: <37A5501F.A108EBBA@hotmail.com>

Stephanie wrote:
> 
> Hi-
> 
> Just a quick question that I hope someone can help with. My coworker has
> worked with perl and was using $foo = &ora_do($lda,"select 'X' from blah
> blah") to get back the number of rows from a table. He used this rather
> than a cursor for speed. Since we moved our code to a new server this no
> longer works.  In my Perl modual book it says this was alright in
> Oraperl v2 but that the new Oraperl emulation does not work the same. I
> have never tried queries without cursors and could not help him, so I
> need to know what he can do to make this work. He wants to continue to
> not use a cursor, but I don't think this is possible.Is it? If so, how
> can it be done. He needs to get this done ASAP, so emailing me directly
> would be a plus.

You might want to consider upgrading to DBI and DBD modules for Oracle
access, or at least having a look, but if you want to do a straight
count why not do:

$foo = &ora_do($lda,"select count(*) from blah blah where etc")

Not tested !!!,

Richard H


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

Date: Tue, 03 Aug 1999 14:44:04 GMT
From: dena3419@my-deja.com
Subject: Part-Time Instructors Wanted -NYC
Message-Id: <7o6v7h$ihn$1@nnrp1.deja.com>

Pratt Manhattan, a division of Pratt Institute, is seeking resumes from
qualified individuals in the NYC area to teach Professional Studies
classes in Javascripting, Java, and CGI scripting with Perl. Classes
meet 2-3 hours per week. People with teaching or training experience
preferred.

Please e-mail Dena Slothower at dena@soho.pratt.edu or fax resume to
212-461-6011.


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


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

Date: Tue, 03 Aug 1999 14:20:40 GMT
From: backwards.saerdna@srm.hc (Andreas Fehr)
Subject: Re: Perl & Win95
Message-Id: <37a6f441.30696579@news.uniplus.ch>

On Tue, 03 Aug 1999 13:28:59 GMT, "Thomas Fvrtsch"
<thomas@dreamsister.de> wrote:

>I am trying to write a small CGI - script. I'm using a HTTPD for Win95.
>I start a command line program with perl, but I get the output of the
>started program at the beginning of my HTML-file. How can I avoid the
>output?

E.g. use backticks instead of system(). (like `discwr.exe`)

>#!c:\perl\bin\perl
>
>system("discwr.exe"); 
>open (TESTDAT,"<test.dat");
>
>print "<html> <head> <title>Test</title> <body> &nbsp <br> &nbsp <br>";
>
>while (<TESTDAT>)
>	{
>	print "$_ <br>";
>	}
>
>print "</body> </html>";
>close (TESTDAT);

BTW, this is some HTML but you need a HTTP header.

The easiest way would be to use CGI. Read about CGI in your
documentation.

(And what if system, open or close fail?)

Andreas


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

Date: 03 Aug 1999 10:06:23 -0400
From: Jason Reed <jcreed@cyclone.jprc.com>
Subject: Re: Perl or CGI
Message-Id: <a1btcprmao.fsf@cyclone.jprc.com>

PerlCoder@Unix.com (CGI) writes:

> Maybe in some ways, Python is better than Perl. But Perl is what
> people are using and Perl is what's on a lot of web servers, not
> Python. I haven't seen Python mentioned in any job ads. Also,
> processing a form is a pretty simple task. I don't think you'd
> particularly need Python for it.
> 
> Your answer was like recommending someone learn Esperanto instead of
> English.

Kio estas malbona pri esperanto?

(Oh, I suppose esperanto doesn't have 
 real closures either...)

---Jason


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

Date: 3 Aug 1999 08:36:48 -0700
From: Tom Christiansen <tchrist@mox.perl.com>
Subject: Quoting Strategies and the Jeopardy Game
Message-Id: <37a6fe80@cs.colorado.edu>

The following message will be posted periodically until observed
clue-levels in these parts improve, or until the heat death of the
Universe arrives.

EXECUTIVE SUMMARY: 
    To send better messages, please trim and summarize what you're
    replying to, and integrate your quoted text with the body of your
    message. Don't just put everything at the end.  This isn't Jeopardy.
    People expect question-and-answer, not answer-and-question responses.

LONG STORY:

Wouldn't you like to make your messages easier for others to read and
understand?  If so, I have some news posting tips for you.  If not,
just ignore this.  (Of course, if you don't want your messages
easier to read and understand, it's not clear why to bother to 
send them in the first place. :-)  I'm going to take a bit of 
time to explain this, because newcomers to Usenet often lack the 
cultural background were I to send a superbrief message.  

Here's the issue: you appear to have quoted the entire message to which
you were replying.  Worst of all, you have done so by merely appending
the complete message at the bottom.  Folks are used to reading the
original material first, then the follow-up.  That's why it's called a
"follow-up", you know. :-)

If all you want to do is forward a copy of the message, that's one thing,
but here you seem to have just blindly pasted the complete old message at
the end without providing any content.  This is neither a proper public
followup nor even a decent private reply.  Here's why.

First of all, this is massive overkill -- you're supposed to trim your
quoted text to only what you're replying to.  Otherwise you'll probably
violate the netiquette target quoting percentage of 50%.  See below.
This isn't really an issue of space (I know that a few bytes here and
there mean less today than 20 years go), so much as it is of integrating
your comments with the old material for continuity.

Second, putting everything at the bottom does little good.  It doesn't
provide the proper context.  It's far too late.  When you reply to
someone's content, the reason you quote the previous message is so that
you can provide some degree of contextual continuity.  The best way to
do this is to interleave what you're quoting with your responses to that
particular piece.  That means that you should provide a quoted portion,
then address what the points therein, then another quoted section, etc.

For example, here's how followup replies *should* look if you'd
like them to be more effective.

    > Joe said we should eat noodles.

    But I don't like noodles.  They are a pain to prepare -- remember
    that what started this thread was how to cook using only a microwave,
    not real cooking -- and they provide you with very little sustenance
    in the long run.  It's like eating cardboard, nutritionally speaking.

    > He also suggests adding anchovies.

    What is this fish fetish?  Not all of us like the little minnows
    with the lingering briny taste swimming around our mouths for the
    next few hours or days.  Can you imagine this on a date?  Iccccch!

Notice how in the text above, alternate quoted passages are interleaved
with new response text.  Notice also that the new text far exceeds the
old text.  This is the way it should be.

If you are receiving this message in response to a news posting, please
understand that all modern newsreaders provide a mechanism to fetch
the parent article, so it is seldom necessary to quote the whole thing.
Sometimes even mail readers provide this, depending on the mail headers
and the list archival mechanism on your own system.

Here's a section from the essential netiquette guide, "A Primer
on How to Work With the Usenet Community", which is available in
news.announce.newusers.  Perhaps your service provider neglected to point
you at this newsgroup before you got swallowed up by all of Usenet.
It's not only a good read; it's critical to understanding the culture
you're now moving in.

                    Summarize What You are Following Up.

  When you are following up someone's article, please summarize the
  parts of the article to which you are responding.  This allows readers
  to appreciate your comments rather than trying to remember what the
  original article said.  It is also possible for your response to get
  to some sites before the original article.

  Summarization is best done by including appropriate quotes from
  the original article.  Do not include the entire article since it
  will irritate the people who have already seen it.  Even if you are
  responding to the entire article, summarize only the major points you
  are discussing.

It's even more annoying when people needlessly quote the original's
automatic trailing matter, like signatures, adverts, or disclaimers.
Please don't do that.

I'm honestly not trying to annoy you!  I'm just trying to give tips
about what works well in electronic messages, and what doesn't.  This
used to be standard fare before one got a Usenet account, but now
something seems to be lost.  
-- 
    > This made me wonder, suddenly: can telnet be written in perl?
    Of course it can be written in Perl.  Now if you'd said nroff, 
    that would be more challenging...   --Larry Wall


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

Date: 3 Aug 1999 08:40:58 -0700
From: Tom Christiansen <tchrist@mox.perl.com>
Subject: Re: Quoting Strategies and the Jeopardy Game
Message-Id: <37a6ff7a@cs.colorado.edu>

I've moved up the cronjob to daily.  On that day in which I read fewer
than a dozen Jeopardy-mangled followups posted here, I will start skipping
to every-other day.

--tom
-- 
Churchill's Commentary on Man: Man will occasionally stumble over the
truth, but most of the time he will pick himself up and continue on.


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

Date: Tue, 03 Aug 1999 10:21:36 -0400
From: BP <bpuli@hotmail.com>
Subject: stat problems on NT
Message-Id: <37A6FAF0.9ADE5069@hotmail.com>

hi all:

i'm using activestate perl 5.005.

i am always getting 1 for nlink in the following statement:

     ($dev,$ino,$mode,$nlink) = stat($dir) unless $nlink;

even when there are sub directories.

am i doing something wrong? is there another way of finding out how many

subdirectories there are in a given directory?

thanks in advance

bp






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

Date: 3 Aug 1999 08:29:19 -0700
From: Tom Christiansen <tchrist@mox.perl.com>
Subject: Re: using __PACKAGE__
Message-Id: <37a6fcbf@cs.colorado.edu>

     [courtesy cc of this posting mailed to cited author]

I note that you sent me a stealth mail cc, you naughty creature, you!
I'm glad I noticed you were using a nonmailer to mail me, so waited.
Please don't stealth-cc people.  Please clearly advertise your intentions
to your recipients, as I have.

In comp.lang.perl.misc, 
    jschueler@tqis.com writes:
:I appreciate the expertise behind this response.  But might as well
:state the obvious plainly:  Tom, your response merely confirms that the
:answer I am looking for is *not* in the documentation... leaving me
:empty handed.  What's the point?

What's the point of what?  The point of __PACKAGE__?  Of my showing
you where the documentation resides?  What?

:There are several issues causing user dissatisfaction (let's call them
:bugs):  

Let's not and say we didn't.
Bugs in the user's understanding are the sole responsibility.

:The first is in the documentation.  Since, given the source, I
:assume your list below is comprehensive.  The best, perlmod.pod,
:suggests:
:     The special symbol __PACKAGE__ contains the current package,
:     but cannot (easily) be used to construct variables.
:(...read "kludge me")

You have a strange reading.  There is no need to use it to construct
variables.  The package variable $Package_Variable is by definition
in the current package, and consequently, and manipulations of it
that you might somewhat make via __PACKAGE__ are suspiciously redundant.

:Based on the available documentation and experimentation, 

Good.  There is no other way to learn anything.

:the
:__PACKAGE__ transformation occurs during compilation.  

Certainly; in that respect, it behaves exactly as 
the tokens _LINE__ and __FILE__ behave.  Anything else
would be completely counterintuitive.

:For some reason
:" __PACKAGE__ " (surrounded by whitespace) transforms, 

No, no, no.  Whitespace is not the point.  It's token boundaries,
just like anything else.  One need not use whitespace to separate
all tokens.  You'd go nuts.

:but
:"$__PACKAGE__::..." is left literal.  I'm still awed by this language,
:so I expect this design decision is not an oversight.  But I cannot
:fathom the reasoning- maybe to avoid clobbering users' variables of the
:same name?

Because you have no need of this.  Just use the simple variable
name.  Or learn how to use caller and symbolic references.

    no strict 'refs';
    for my $name ( sort keys %{ __PACKAGE__ . "::" } ) { 
	if (defined &{ __PACKAGE__ . "::" . $name } ) {
	    print "$name ";
	}
    }

:Third, this whole undertaking is an effort at another workaround.  

AHAH!  You should have said that in the first place.

:So
:long as I 'use strict;', the variable $AUTOLOAD is not available to my
:package method unless I 'use vars qw( $AUTOLOAD )'.  I never use the
:directive otherwise and prefer to avoid that workaround.  

It's not a "work-around".  It is the right answer.  Please use it.
Otherwise you force the interpreter to dick around wiht the symbol
table at run-time instead of letting the compiler figure things
out up front.

:Admittedly, the following works and is simply inelegant:
:my $autoload = eval( '$' . __PACKAGE__ . '::AUTOLOAD' ) ;

That's completely nutty.  You didn't check @_.  You never
need eval.  You can use symbolic references.  But that's still 
the wrong approach in most cases, like this one.

[FORTY-SEVEN FRICKING lines of Jeopardy material deleted]

Let me explain why I'm irritad with you:

  1) You sent me a stealth cc.

  2) You used Jeopardy followups, without trimming and summarizing
     and putting the question before the answer.

  3) You neglected to say *why* you wanted to do what you wanted
     to do.  Therefore, there was no way for us to know to tell
     you that you approaching the issue completely wrongly.

  4) You used words like "bug" and "kludge" to insult the documentation,
     much of which I wrote, when the only fault here was in your own
     understanding.

I believe that were our positions reversed, that you, too, would be
annoyed.

--tom
-- 
    Though I'll admit readability suffers slightly... 
                    --Larry Wall in <2969@jato.Jpl.Nasa.Gov>


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

Date: 3 Aug 1999 14:49:24 GMT
From: claird@starbase.neosoft.com (Cameron Laird)
Subject: Re: Win32 version of "sendmail" for use with Perl?
Message-Id: <1B44E562009920CF.35F3F632FF61F655.CA6E7C4E7954E408@lp.airnews.net>


In article <dYup3.5000$B5.55388@news1.rdc1.bc.home.com>,
Daniel Tonks <dtonks@sunstorm.com> wrote:
>I have a few Perl programs I'm trying to get working under a Win32s
>environment, however I don't want to modify them much since they will also
>be operating under Linux & BSDI. The scripts work just fine, however I
>cannot locate a version of sendmail that is functionally identical to the
>one included with most unix systems. It needs to work the same way - "open"
>sendmail, "print" the message to it, then "close" to send. Any ideas?
			.
			.
			.
It's unlikely that you'll ever find exactly what you de-
scribe.  There is insufficient interest to motivate anyone
to port sendmail to Win32s.

If an NT installation sufficed for you, you might choose
to buy <URL:http://www.sendmail.com/products/smnt.html>
Sendmail-for-NT.

I suspect, though, that you don't realize how easy it is
to make a small change which will improve the portability
and robustness of your application.  It's quite straight-
forward to recode your application to use a network
connection to *any* relaying mail transfer agent (MTA),
and not necessarily a localhost's sendmail.  It might be
an advantage for you to maintain only a single MTA (per
LAN), and have all instances of your application direct
their e-mail service requests to it through the network.

If you insist, though, there are several stripped-down
command-line mailers that can easily be installed under
Win32s.  This would permit you to use the same process-
level architecture, although you'd have a small amount
of recoding to do.
-- 

Cameron Laird           http://starbase.neosoft.com/~claird/home.html
claird@NeoSoft.com      +1 281 996 8546 FAX


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

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


Administrivia:

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

	subscribe perl-users
or:
	unsubscribe perl-users

to almanac@ruby.oce.orst.edu.  

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

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

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

The Meta-FAQ, an article containing information about the FAQ, is
available by requesting "send perl-users meta-faq". 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 V9 Issue 349
*************************************


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