[9333] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 2928 Volume: 8

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Sun Jun 21 18:07:48 1998

Date: Sun, 21 Jun 98 15:00:30 -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           Sun, 21 Jun 1998     Volume: 8 Number: 2928

Today's topics:
    Re: [Q] Globbing in CGI (listing content of dir), why f <tchrist@mox.perl.com>
    Re: [Q] Globbing in CGI (listing content of dir), why f <rootbeer@teleport.com>
    Re: Can't use subscript on split - what split? (Charles DeRykus)
        Communication between processes (Paul)
    Re: Communication between processes <rootbeer@teleport.com>
        CRC functions ("Mark Morgan Lloyd ")
        creating files using CGI script <dj_adams@earthlink.net>
    Re: Excel - Perl conversion <Russell_Schulz@locutus.ofB.ORG>
    Re: first language <camerond@mail.uca.edu>
    Re: first language (Josh Kortbein)
    Re: first language <Luethke@worldnet.att.net>
    Re: first language <firewind@metroid.ml.org>
    Re: first language (Will Rose)
    Re: first language <firewind@metroid.ml.org>
    Re: first language (Brand and Karina Hilton)
    Re: first language <pfaffben@pilot.msu.edu>
    Re: first language jesteel@compugen.net
    Re: first language <merlyn@stonehenge.com>
    Re: first language <pfaffben@pilot.msu.edu>
    Re: Flames.... (Brand and Karina Hilton)
    Re: Flames.... birgitt@my-dejanews.com
    Re: Flames.... (Leslie Mikesell)
        Help with standalone checkbox perl/cgi script  -  word3 (anonymous)
        problem running CPAN module <rjberman@mindspring.com>
    Re: problems with flock <rootbeer@teleport.com>
    Re: problems with flock <tchrist@mox.perl.com>
        RTF parsing (Michele Beltrame)
    Re: Will Perl to C conversion accelarate my cgi script  <tchrist@mox.perl.com>
    Re: Will Perl to C conversion accelarate my cgi script  <rootbeer@teleport.com>
        Digest Administrivia (Last modified: 8 Mar 97) (Perl-Users-Digest Admin)

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

Date: 21 Jun 1998 19:09:01 GMT
From: Tom Christiansen <tchrist@mox.perl.com>
Subject: Re: [Q] Globbing in CGI (listing content of dir), why full path?
Message-Id: <6mjlod$656$3@csnews.cs.colorado.edu>

 [courtesy cc of this posting sent to cited author via email]

In comp.lang.perl.misc, "Stephen_Chan" <schan_ca@rocketmail.com> writes:
:Why is this? 

Because you know what what directory you're in.

This is not a Perl question.  It's a CGI question.
There are newsgroups that cover this kind of thing,
and we aren't one of them. :-)

--tom
-- 
    Remember though that 
        THERE IS NO GENERAL RULE FOR CONVERTING A LIST INTO A SCALAR.
            --Larry Wall in the perl man page


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

Date: Sun, 21 Jun 1998 19:27:40 GMT
From: Tom Phoenix <rootbeer@teleport.com>
Subject: Re: [Q] Globbing in CGI (listing content of dir), why full path?
Message-Id: <Pine.GSO.3.96.980621121956.8650K-100000@user2.teleport.com>

On Sun, 21 Jun 1998, Stephen_Chan wrote:

> I want my CGI to list the content of a server directory.

You must mean a CGI script - you don't have your own Common Gateway
Interface! :-)

> When I glob, I have to list full path:
> 
>            @listing = </home/someuser/public_html/cgi-bin/directory/*>;
> 
> this won't work:
>  
>            @listing = <directory/*>;

What do you mean it "won't work"? You have to specify what it did, and how
that differed from your expectations. 

> Why is this? How do I get around having to use the full path?

The CGI protocol specification doesn't say that your program will be run
within a particular working directory. If you wish to use relative paths,
you should first chdir to some absolute path. 

Hope this helps! 

-- 
Tom Phoenix       Perl Training and Hacking       Esperanto
Randal Schwartz Case:     http://www.rahul.net/jeffrey/ovs/



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

Date: Sun, 21 Jun 1998 21:41:55 GMT
From: ced@bcstec.ca.boeing.com (Charles DeRykus)
Subject: Re: Can't use subscript on split - what split?
Message-Id: <Eux89v.5xw@news.boeing.com>

In article <6m6n8g$j6n@netline.jpl.nasa.gov>,
Peter Scott <psf@euclid.jpl.nasa.gov> wrote:
>Encountered this when I forgot a pair of parentheses (abbreviated example):
>
>	print qw(JAN FEB)[1];
>
>Can't use subscript on split at - line 1, near "1]"
>
>I would love to know how Perl interpreted this as a split...
>

A couple of other ways to elude the error, e.g.

print STDOUT (qw(JAN FEB))[1],"\n";
print ${[qw(JAN FEB)]}[1],"\n";


HTH,
--
Charles DeRykus


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

Date: Sun, 21 Jun 1998 20:13:59 GMT
From: paul@cytech.net (Paul)
Subject: Communication between processes
Message-Id: <358d697f.21362366@nntp.bestweb.net>

I created a program that runs in the background as two processes via
fork. Both of these processes share the same data and variables, but
do different things. I added a $SIG{HUP} handler to the program to
have the program reload it's variables, however, only the second
process of the two gets to use the reloaded variables, even when using
kill -HUP on the *first* process. If I have the program not start up
the second process, SIGHUP works fine and the single process reloads
it's variables. Is there a way to communicate between processes so
both processes would have access to the reloaded data/variables? Any
information would be appreciated, I've been looking for an answer for
about a week...

Regards,

Paul.


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

Date: Sun, 21 Jun 1998 20:23:19 GMT
From: Tom Phoenix <rootbeer@teleport.com>
Subject: Re: Communication between processes
Message-Id: <Pine.GSO.3.96.980621132254.8650N-100000@user2.teleport.com>

On Sun, 21 Jun 1998, Paul wrote:

> Is there a way to communicate between processes so
> both processes would have access to the reloaded data/variables? 

Yes; see perlipc for some suggestions. Hope this helps!

-- 
Tom Phoenix       Perl Training and Hacking       Esperanto
Randal Schwartz Case:     http://www.rahul.net/jeffrey/ovs/



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

Date: 21 Jun 1998 20:37:52 +0100
From: mark_tbu@cix.co.uk ("Mark Morgan Lloyd ")
Subject: CRC functions
Message-Id: <6mjneg$4te$1@plutonium.compulink.co.uk>

I've recently been using Perl to help decode serial data captured using a 
(now obsolete) PC card. To help me do this I've implemented various 16-bit 
CRC stuff that I couldn't find elsewhere- does anybody think it's worth 
uploading?

If so, where's the best place to put it as "example" code rather than 
encapsulated in a module (since no two people are likely to want it for 
the same thing)?

Mark Morgan Lloyd
mark_tbu@cix.co.uk

[Opinions above are the author's, not those of his employers or 
colleagues]


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

Date: Sun, 21 Jun 1998 15:52:34 -0500
From: "Daniel J Adams" <dj_adams@earthlink.net>
Subject: creating files using CGI script
Message-Id: <6mjrq9$3q$1@suriname.it.earthlink.net>

Hi,

I am pretty new to CGI scripting, so apologies if the answer to my question
is hopelessly obvious.

Is it possible to make a CGI script written in Perl for a SunOS (UNIX)
system create a file in a given directory based upon a defined variable.

In other words, I want a Perl script, when sent $INPUT('moose') , which is
redefined in the script as $moose (this I can do ) to create a file called
$moose.htm where $moose is the input from a form.

Any help greatly appreciated, and a response to either the newsgroup or
email will be great.

Thanks,

--
Daniel J Adams
email: dan at fearsome.net





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

Date: Sun, 21 Jun 1998 20:28:24 +0100
From: Russell Schulz <Russell_Schulz@locutus.ofB.ORG>
Subject: Re: Excel - Perl conversion
Message-Id: <19980621.202824.5l6.rnr.w164w@locutus.ofB.ORG>

  [ please quote at the top, and trim unnecessary quotes! ]

dougr13@hotmail.com writes:

>> well, I have written two such translators for work (neither converts
>> the calculations into perl, though).
>
> well id lovo to have a copy of that utility

they're not mine to give.  and I doubt my employer wants to give them
away, either (but would probably be willing to sell them once or twice).
-- 
Russell_Schulz@locutus.ofB.ORG  Shad 86c


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

Date: Sun, 21 Jun 1998 14:20:50 -0500
From: Cameron Dorey <camerond@mail.uca.edu>
To: Randal Schwartz <merlyn@stonehenge.com>
Subject: Re: first language
Message-Id: <358D5D12.E841141A@mail.uca.edu>

[cc'd to RS with apologies, I just couldn't help it]

Randal Schwartz wrote:
> 
> [snip]
> ... programming *well* seems to require a twisted aptitude only some
> small percentage of the population seems to have.  I think I was lucky
> to be born with it, given the time at which I was born. :-) 
> [actual relevant stuff snipped again]

What time were you born? I think I was born at 7:53 A.M. Is this why I
have to work so hard at it, that there is some kind of circadian rhythm
involved in aptitudes, which actually starts at the time of your birth?

Sorry, I said I couldn't help it.

BTW, I can't draw, either, but I _can_ cook, so mornings must be good
for something ;^).

Cameron
camerond@mail.uca.edu


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

Date: 21 Jun 1998 19:11:21 GMT
From: kortbein@iastate.edu (Josh Kortbein)
Subject: Re: first language
Message-Id: <6mjlsp$rme$4@news.iastate.edu>

Abigail (abigail@fnx.com) wrote:
: birgitt@my-dejanews.com (birgitt@my-dejanews.com) wrote on MDCCLIII
: September MCMXCIII in <URL: news:6mejaq$j5q$1@nnrp1.dejanews.com>:
: ++ In article <8cbtrpbgn2.fsf@gadget.cscaper.com>,
: ++   Randal Schwartz <merlyn@stonehenge.com> wrote:
: ++ >
: ++ > >>>>> "Dan" == Dan Nguyen <nguyend7@egr.msu.edu> writes:
: ++ >
: ++ > Dan> The person needs to be a "natural" programmer.  Generally I feel that
: ++ > Dan> most people have hard time not with the language but with the process
: ++ > Dan> of programming.  A person could learn Perl as a first language very
: ++ > Dan> easily and have no problems, while others could become stuck on the
: ++ > Dan> syntax of the language.
: ++ >
: ++ > I'll second this.  I see far too many people *attempting* programming
: ++ > that would probably have a better time being firefighters or line
: ++ > chefs or congressmen or something.  Sure, maybe nearly anyone with
: ++ > enough effort can hack out a VB script to automate a repeated task,
: ++ > but programming *well* seems to require a twisted aptitude only some
: ++ > small percentage of the population seems to have.  I think I was lucky
: ++ > to be born with it, given the time at which I was born. :-) No
: ++ > ordinary amount of education can seem to teach people how to "think"
: ++ > like a progammer.  ("You have these seven transformations possible and
: ++ > this problem requires converting Q to W... go!")
: ++ 
: ++ Aren't you both talking more about talent and gift ? No amount of
: ++ education in music composition seems to teach people either how to
: ++ compose like Beethoven.
: ++ 
: ++ The question, I think, was how you best learn to program. I have run
: ++ into many who believe that it is a matter of self-study and trial
: ++ and error. But I feel that is not enough.
: ++ 
: ++ What is then a structured way of learning how to program?  How is it
: ++ taught at universities? (Not that I think being a Ph.D.candidate in
: ++ computer science makes you an expert automatically, but at least there
: ++ is a fair chance that you might become one, whereas the chance to become
: ++ one through self-study is most probably quite remote).

: Many universities don't make a fixed link programming <-> programming
: language. When I went to university, the first 6 weeks of the course

Then again, many of them do. Three years ago, when I took a (snooze of
a) CS class at my university, they were using Scheme in the intro class,
in order to keep things fairly theoretical. They were well-intentioned,
but obviously things didn't work out because they've since switched to
C++.

I think they might require one semester of algorithm analysis before
graduation. Long before my time, there was a course in logic required.
No longer.


Josh


_________________________________________________________
I do not trust your bitch.
	- Frederich Nietzche, in _Also Sprach Zarathustra_



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

Date: Sun, 21 Jun 1998 16:06:46 -0400
From: "Brian lLuethke" <Luethke@worldnet.att.net>
Subject: Re: first language
Message-Id: <6mjp53$iut@bgtnsc01.worldnet.att.net>


John Beppu wrote in message <6mhdpq$c4n@news.service.uci.edu>...
>In article <odPi1.3807$RS.3390143@news3.atl.bellsouth.net>,
>Judson McClendon <judmc123@bellsouth.net> wrote:
>
>    I am of the opinion that the best way to become familiar with
>    pointers is to learn an assembly language of the architecture
>    you use most often.  I knew x86 assembly before I knew C, but
>    moving to C from assembly was not a problem.  A lot of times,
>    I found myself thinking, "this is kinda like assembly" while
>    learning C.
>
>    If I ever taught anyone to program, I'd get some Assembly in
>    early on to harden them and make them fearless.   ;)
>
>
>
>--
>/** beppu@uci.edu .........................................................
*/

        I wholeheartedly agree. Assembler was the best thing to ever happen
to my c and c++ code. So many pointer problems just went away when I knew
what was going on underneath( not to mention what was going on when
functions were called ). I also found that by having the compiler produce an
assembler file I could spot some problems very quickly that would have
otherwise have taken along time. I learned IBM 370 and 80x86 assembler and
would gladly go through the experience of learning them again.




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

Date: Sun, 21 Jun 1998 13:09:46 -0600
From: firewind <firewind@metroid.ml.org>
Subject: Re: first language
Message-Id: <Pine.LNX.3.95.980621130837.204A-100000@metroid.ml.org>

On 21 Jun 1998, Jason E. Steele wrote:

> I'll second that.  I learned 6809 assembly before I learned C and
> once I connected pointers in C with analagous concepts in assembly, I
> had very little trouble with them.

The problem with these lines of thinking (and especially of connecting the
abstract semantics of C to the concrete semantics of the underlying hardware)
is that it, all too often, leads to the unrestrained usage of unportable
constructs.

-- 
(initiator of the campaign for grumpiness where grumpiness is due in c.l.c)

-Please-! Do -not- copy posted articles to my personal e-mail. Thank you.



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

Date: 21 Jun 1998 20:03:56 GMT
From: cwr@cts.com (Will Rose)
Subject: Re: first language
Message-Id: <898459563.102377@optional.cts.com>

Graeme Fenwick (gfenwick@BYESPAMprimex.co.uk) wrote:
: sylvainp@mypc.microtec.net wrote in message
: <358d0d34.3153899@news.microtec.net>...
: > [assembly] introduced a hurdle when I tried
: >to learn C the first time, to the point where I abandoned it for a
: >couple of year. I was too thinking physical memory too much and it
: >made pointer arithmetic hard to grasp. I had a very hard time
: >understanding why adding 1 to a pointer would not just increment it by
: >one byte.


: I can kind of sympathise- knowing how the machine works and being aware of
: the dual high/low level nature of C means you start to think about things
: too deeply at an early stage (if you can still find my recent post "A few C
: questions"- probably gone by now- you'll see the way I approach the
: language), and worrying about things that probably don't matter at that
: stage. Quite often now, although I initially saw C as more high level, I
: tend to automatically assume things are done at a much lower level, and then
: I think "Oh, I don't have to worry about that, the compiler will
: automatically promote it", and so on....


One quite important part of writing standard C is knowing what not to
know; preferably, do not attempt to find out how this structure is 
laid out in memory, how this bitfield is packed, and so on.  This need
for selective ignorance is hard for beginners to grasp, and a major
difference from assembly language where, in principle, the programmer
knows everything.

Note that C9X will be different; there will be, for instance, a lot of
data types of specific sizes, so the programmer can 'hard-wire' a lot
more code.  Whether this is a good thing is left as an exercise for the
reader.  Certainly the standard is a lot bigger, and the general (but
not universal) opinion in software nowadays is that bigger is better.


Will
cwr@crash.cts.com



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

Date: Sun, 21 Jun 1998 13:14:05 -0600
From: firewind <firewind@metroid.ml.org>
Subject: Re: first language
Message-Id: <Pine.LNX.3.95.980621131025.204B-100000@metroid.ml.org>

On Sun, 21 Jun 1998, Ronald J Kimball wrote:

> Larry Rosler <lr@hpl.hp.com> wrote:
> > Sample of one, unfortunately.  My kids started with Basic, which (as 
> > Dijkstra says) is a terminal disease.  They are *not* professional 
> > programmers. :-)
> 
> I started with BASIC, and I *am* a professional programmer.  :-P

I started with BASIC and, while I eventually overcame the myraid and horrendous
flaws it instilled in me (or so I'd like to think; I'm sure there are many in
this newsgroup who would probably care to debate that fact) it was not
pleasant, it was not easy, and it was not fun. It took some time. Time that,
for certain, could have been better spent. Had I started with a real, 
non-braindamaged language first, I am conviced I would have faired much better.

Don't start with BASIC. While it might not leave -permanent- brain-damage, it
just isn't worth it.

-- 
(initiator of the campaign against BASIC)



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

Date: Sun, 21 Jun 1998 20:14:19 GMT
From: bkhilton@netcom.com (Brand and Karina Hilton)
Subject: Re: first language
Message-Id: <bkhiltonEux47w.9Hn@netcom.com>

In article <m3u35f2t3f.fsf@windlord.Stanford.EDU>,
Russ Allbery  <rra@stanford.edu> wrote:
>In comp.lang.perl.misc, Mark-Jason Dominus <mjd@op.net> writes:
>> Larry Rosler <lr@hpl.hp.com> wrote:
>
>>> Sample of one, unfortunately.  My kids started with Basic, which (as
>>> Dijkstra says) is a terminal disease.
>
>> I am happy to report that Dijkstra is wrong again.  I started with
>> Basic, and was eventually able to eradicate it.
>
>> It wasn't easy, thought, and since the remedy was injections of APL, one
>> could argue that the cure was worse than the disease.
>
>Funny, I started with BASIC and it proved to be an excellent introduction
>to Pascal and a way to get me to appreciate Perl's statement modifier if.
>
>But then I learned on VMS BASIC, not on some line-number-driven brain-dead
>monstrosity.  :)

I almost started with a line-number-driven brain-dead BASIC monstrosity...
BASIC on the TI 99-4.  Fortunately, the machine itself cured me.  I had 
entered about 300 lines of a game I was writing when Mom called me for 
supper.  I set the computer aside on my bed and when I got back, all the 
line numbers in my GOTOs had morphed into 32767s.  I never programmed in 
BASIC again, but I did learn a valuable lesson about air flow in electronic 
equipment.  Specifically, if your computer has vents on the bottom, turn it 
off before you set it on your pillow.  :-)


	Brand


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

Date: 21 Jun 1998 16:59:56 -0400
From: Ben Pfaff <pfaffben@pilot.msu.edu>
Subject: Re: first language
Message-Id: <8767hupj1v.fsf@dial1.msu.edu>

   On 21 Jun 1998, Jason E. Steele wrote:

   > I'll second that.  I learned 6809 assembly before I learned C and
   > once I connected pointers in C with analagous concepts in assembly, I
   > had very little trouble with them.

   The problem with these lines of thinking (and especially of connecting the
   abstract semantics of C to the concrete semantics of the underlying hardware)
   is that it, all too often, leads to the unrestrained usage of unportable
   constructs.

I think that, before you can be a top-notch programmer, you have to
learn a low level language (some machine's assembly language,
preferably), and a high level language (maybe a Pascal variant or
BASIC or Perl).  That way you know how it works at the hardware level,
and you understand how it can be abstracted.  After that, you should
be ready to know what is efficient and what not to know, in C.

FWIW I learned MS's GW-BASIC under MS-DOS first, then Turbo Pascal,
then C, with a few unimportant obscure languages thrown in for good
measure.



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

Date: 21 Jun 1998 16:11:09 -0500
From: jesteel@compugen.net
Subject: Re: first language
Message-Id: <paxsokyh34i.fsf@scotty.i-did-not-set--mail-host-address--so-shoot-me>

firewind <firewind@metroid.ml.org> writes:
> On 21 Jun 1998, Jason E. Steele wrote:
> > I'll second that.  I learned 6809 assembly before I learned C and
> > once I connected pointers in C with analagous concepts in assembly, I
> > had very little trouble with them.
> 
> The problem with these lines of thinking (and especially of connecting the
> abstract semantics of C to the concrete semantics of the underlying hardware)
> is that it, all too often, leads to the unrestrained usage of unportable
> constructs.

You are correct, of course, and I was not trying to suggest that knowledge 
of an implementation is sufficient to learn C.  However, with the
proviso that all analogies are suspect, I still think there is a great 
deal of value in using analogies with things you already know when you 
are trying to learn something new; particularly difficult abstract
concepts.

-- 
Jason E. Steele
jesteel@compugen.net


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

Date: Sun, 21 Jun 1998 21:27:22 GMT
From: Randal Schwartz <merlyn@stonehenge.com>
Subject: Re: first language
Message-Id: <8csoky8mz7.fsf@gadget.cscaper.com>

>>>>> "Tom" == Tom Christiansen <tchrist@mox.perl.com> writes:

Tom>  [courtesy cc of this posting sent to cited author via email]
Tom> In comp.lang.perl.misc, 
Tom>     rjk@coos.dartmouth.edu (Ronald J Kimball) writes:
Tom> :I started with BASIC, and I *am* a professional programmer.  :-P

Tom> So did Larry.  So did Randal.  So did I.

Tom> I first learned BASIC (BASIC-PLUS under RSTS/E),

Ooooh.  You had a *real* BASIC.  I had to use the HP2000 BASIC, which
was VERY primitive compared to BASIC-PLUS.  Imagine 80-character
strings (all 26 of them!) and arrays of a single dimension only.

Tom> Of course, I have never understood why anyone thinks they need anything
Tom> but K&R to learn C, either.  :-)

Me too.  I learned C from K&R (first edition) and the source code to
Unix (V6 and V7).

-- 
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: 21 Jun 1998 17:35:26 -0400
From: Ben Pfaff <pfaffben@pilot.msu.edu>
Subject: Re: first language
Message-Id: <87wwaao2u9.fsf@dial1.msu.edu>

   Tom> Of course, I have never understood why anyone thinks they need anything
   Tom> but K&R to learn C, either.  :-)

   Me too.  I learned C from K&R (first edition) and the source code to
   Unix (V6 and V7).

I learned C from a crummy tutorial and reading and writing lots of (at
first pretty crummy too) code, then when I got serious about it I
bought a copy of the Standard.  This is actually a pretty good way to
go about it since reading the Standard straightens out all the
misconceptions, and writing code made me aware of practical
considerations.


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

Date: Sun, 21 Jun 1998 20:29:53 GMT
From: bkhilton@netcom.com (Brand and Karina Hilton)
Subject: Re: Flames....
Message-Id: <bkhiltonEux4xu.Ax4@netcom.com>

In article <6mhudi$11v$1@csnews.cs.colorado.edu>,
Tom Christiansen  <tchrist@mox.perl.com> wrote:
>
>They *are* sent a polite and helpful response: everyone gets it when they
>first post here.  Of course, now that think they should screw up their
>addresses and suffer for it by not *letting* us send them that autoanswer.

Perhaps the mini-FAQ should be posted rather than mailed.  In addition
to making the mini-FAQ available to mungers and non-mungers alike, it would 
also make it obvious to the other potential responders which people are
newbies and which are repeat FAQers (and, therefore, flame-worthy).


	Brand


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

Date: Sun, 21 Jun 1998 21:15:57 GMT
From: birgitt@my-dejanews.com
Subject: Re: Flames....
Message-Id: <6mjt6d$4ov$1@nnrp1.dejanews.com>

In article <ltk96avmyo.fsf@asfast.com>,
  Lloyd Zusman <ljz@asfast.com> wrote:
>
> Tom Phoenix <rootbeer@teleport.com> writes:
>
> > On 21 Jun 1998, Lloyd Zusman wrote:
> >
> > > My contention is that almost all of the frequently asked questions you
> > > see here are coming from first-time posters to c.l.p.m, and if this is
> > > the case, few of these people are likely to have any knowledge of your
> > > URL reference ... and therefore, they couldn't possibly be affected by
> > > it.
> >
> > And, by the same token, they wouldn't be helped by posting of _any_
> > previous posting, no matter how frequent or helpful.
> >
> > The best we can do for those folks is to try to persuade them to better
> > themselves before asking their next question.
>
> I totally agree ... as long as it's polite, respectful persuasion and
> not gratuitous (i.e., uncalled for) insults and condescension.
>
> > > In my opinion, most of the time when you submit your own frequent
> > > posting, it's in response to these kinds of first-time posters.
> >
> > No, it's a cron task. It would run automatically whether anyone posted to
> > c.l.p.misc or not. I'm pretty sure you're thinking of my replies to
> > posters in the newsgroup, but that's not what I was talking about. (My
> > replies may be boilerplate, but they're not automatic.) The autopost is
> > cross-posted to c.l.p.announce; you should be able to find it there.
>
> Oh ... now I see ... you're referring to your once-a-week post
> entitled "[Perl] How to find the Perl FAQ".  There's a similar post
> that by another user [gnat@frii.com (Nathan Torkington)] that is sent
> here twice a week, as I'm sure you know.  For those of you who haven't
> seen it yet, it's entitled, appropriately enough
>
>  *** FAQ: ANSWERS TO YOUR QUESTIONS! READ FIRST! Posted Twice Weekly ***
>
> > > > But it seems too frequent that this newsgroup sees a newcomer who,
having
> > > > asked a question and been directed to the appropriate resources, follows
> > > > up with another question which can be answered by the same resources.
> > >
> > > I haven't seen many people who do that here.  Perhaps less than ten
> > > different people every week
> >
> > That's too frequent, in my book. One who knows better and yet errs is in a
> > state of sin. :-)
>
> I have no problem with this small set of "sinners" being somewhat
> sternly corrected; however, I don't see why this sternness should
> apply equally to first-time posters.  I'm not addressing this to you,
> Tom, since you seem to be trying hard to be polite to all people you
> respond to.  However, there are other Perl regulars who don't seem to
> be making any distinction whatsoever between first-time posters and
> longer-term "sinners" in terms of courtesy and respect.

My two cents worth of newbie-newbie wisdom:

1. The assumption that anybody who posts his first question here
   knows how to use a computer, has read the FAQs and some of
   the Perl documentation and has read c.l.p.m for at least a
   week is quite unrealistic.

   (At least one newbie who falls under this category has done
   so - me).

2. Why that is so - I think it's not worth to spend time to inquire
   it - it's just that. Times have changed.

3. What can you do about the FAQ question of the first-time poster ?
   a. Consider that s/he didn't even read c.l.p.m. for *one* day
        1. Post the
           FAQ! ANSWERS TO YOUR QUESTIONS ! READ FIRST!
          *daily* even *twice daily*. And I would include as many
           detailed pointers as you can.

        2. Post another one saying:
           WHY YOU DON'T GET AN ANSWER TO YOUR POST !
           *daily* even *twice daily*.
           explain that if a poster doesn't get an answer it means
           that all of you know that the answer to his/her question can
           be found in the FAQs easily or that he didn't provide
           information which is necessary to answer his/her question.

        3. If you answer like many of you do with a very polite pointer
           and the poster comes back again with a similar question
           and the poster has turned into this 'horrid long-term sinner',
           how about a pre-canned flame like this:
           WE EXPECT YOU TO HELP YOURSELF !
              As we can't teach you to help yourself, we just have to force
              you to do so. We won't help you anymore. Read number
              1 and 2.

This may sound silly, but I think it's better than to
resort in sarcastic or emotional flames and mile-long threads.
Especially as very often the assumed 'sinfulness' of the newbie
can't fairly be known. You might hurt a lot of feelings for nothing.
And you say yourself that this approach is also not very successful.

One cannot *help* someone to read something and one cannot *help*
someone to *help himself*.

One can though force someone to do so - without saying much. Which
I think would be better. Actually it is very helpful to be firm in
your actions, but kind in your words. I am grateful having run
into a person who reacted that way, very much indeed.

Regards,
Birgitt Funk

-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/   Now offering spam-free web-based newsreading


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

Date: 21 Jun 1998 16:44:48 -0500
From: les@MCS.COM (Leslie Mikesell)
Subject: Re: Flames....
Message-Id: <6mjusg$4qk$1@Jupiter.Mcs.Net>

In article <358cf10d.3403243@nnrp.gol.com>,
Dan Lucas <dlucas@deletethis.gol.com> wrote:

>One could argue that you're implying that 'newbies' should avoid
>asking questions until they've, ah, drained the llama dry. Well, I
>won't say I don't understand that attitude but a friendly answer to
>these basic questions can really encourage sincere beginners. On the
>other hand, somebody who just saunters in and says (as one did
>recently) "I want a CGI script written in this Perl thing: who wants
>to do it for me?" deserve what they get...

But in fact the majority of the time the correct answer to this
question is "it has already been done and you can get it at ....".
And it isn't always at CPAN.  In fact it many not be available
at all until the person who wrote it sees the question.  Is there
something about a 'misc' newsgroup that excludes questions about
cgi and non-unix systems? 

Perhaps we need comp.lang.perl.misc-except-cgi-and-ms-windows so
squeamish people don't have to see these questions.

  Les Mikesell
    les@mcs.com 


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

Date: 21 Jun 1998 19:20:57 GMT
From: anonymous@nouce.net (anonymous)
Subject: Help with standalone checkbox perl/cgi script  -  word3.txt [1/1]
Message-Id: <6mjmep$kgf$1@owl.slip.net>

--*-*-*- Next Section -*-*-*
Content-Type: text/plain

Sorry about that my attachments have not been working. Here is 
a copy of my script for comments.

--*-*-*- Next Section -*-*-*
Content-Type: Text/Plain

Hello,
I have been trying for a couple of days to add a slightly modified e-mail notification
to Matts script and am having no luck. Maybe someone might be able to help
me with. 

What I would like if any person who starts a post and chooses to receive the email notifi-
cation will get all the responses sent to him/her via email. That sounds easy put whats 
wrong. Here is what I have done:
1) Placed the variables $mailprog = '/usr/bin/sendmail'; (yes path is correct)
2) Placed the variables $recipient = "<email>"; (not to sure about this)
3) Place the main script without the beginning two lines and placed it after step 4.
   (NEWFILE); }
4) open(EMAIL,"$basedir/$mailprog") || die $!;   (not sure about $mailprog)
    @recipient =<email>;
    close (email);
5) Rest of mail script
I know that there is a webbbs script that has lots of these features but there are some that
I don't like so I don't want to add it to my board I would like to continue adding separate
add-ons to the board.
Since I been working on this for a couple of days know any help would be appreciated.
				
#!/usr/bin/perl

print "Content-type: text/html\n";

checkbox('reply','1','yes','TURNED ON','Check here if you wish to be notified,via email, when someone replies to your message');

if ($turned_on = $query->param('reply')){; 
open(MAIL, "|$mailprog $recipient") || die "Can't open $mailprog!\n";
print MAIL "From: $email\n";
print MAIL "Subject: $title\n\n";
print MAIL "$name\n";
print MAIL "$email\n";
print MAIL "$subject\n\n";
print MAIL "$Remote host: $ENV{'REMOTE_HOST'}\n";
print MAIL "$Remote host: $ENV{'REMOTE_ADDR'}\n";
print MAIL "$Browser: $ENV{'HTTP_USER_AGENT'}\n";
}
else { 
#user doesn't choose to have email notification
print MAIL "<P>Your will not be receiveing any email notification"; 
print MAIL  "\"<a href=http://some.html>something</a>\"";
print MAIL  "\"<a href=http://some3.html>something3</a>\"";
close (MAIL);


}
				Thanks

--*-*-*- Next Section -*-*-*--


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

Date: Sun, 21 Jun 1998 16:15:45 -0500
From: Bob Berman <rjberman@mindspring.com>
Subject: problem running CPAN module
Message-Id: <358D69DC.F5B5458B@icehouse.com>

I'm running Perl 5.004_04 on Linux 2.0.29. I have no problems installing
any Perl modules when I do it manually (perl Makefile.PL, make, make test,
make install). Everything goes smoothly and the modules run fine. But when I
try to use the CPAN module to install a module I get:

cpan> install Date::Manip
Running make for SBECK/DateManip-5.31.tar.gz
CPAN: LWP loaded ok
Fetching with LWP:
 
ftp://uiarchive.cso.uiuc.edu/pub/lang/perl/CPAN/authors/id/SBECK/DateManip-5.31.tar.gz
CPAN: MD5 loaded ok
Fetching with LWP:
  ftp://uiarchive.cso.uiuc.edu/pub/lang/perl/CPAN/authors/id/SBECK/CHECKSUMS
perl: can't resolve symbol 'safemalloc'


Any ideas?


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

Date: Sun, 21 Jun 1998 18:23:30 GMT
From: Tom Phoenix <rootbeer@teleport.com>
Subject: Re: problems with flock
Message-Id: <Pine.GSO.3.96.980621111933.8650I-100000@user2.teleport.com>

On Sun, 21 Jun 1998, Jaime Pozuelo-Monfort wrote:

> open (FILE1, ">file_1");

Even when your script is "just an example" (and perhaps especially in that
case!) you should _always_ check the return value after opening a file.

> #I unlock and close the files
> flock(FILE1, 8);

Unless you know when you can ignore this rule, never release the lock on a
file from Perl. Simply close the file.

> I use the numeric values rather than the string variables cos
> the latter don't work on my system (Solaris).

Use a line like 'use Fcntl qw/ :flock /;' near the top of your script to
import the proper constants.

Hope this helps!

-- 
Tom Phoenix       Perl Training and Hacking       Esperanto
Randal Schwartz Case:     http://www.rahul.net/jeffrey/ovs/




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

Date: 21 Jun 1998 19:07:34 GMT
From: Tom Christiansen <tchrist@mox.perl.com>
Subject: Re: problems with flock
Message-Id: <6mjllm$656$2@csnews.cs.colorado.edu>

 [courtesy cc of this posting sent to cited author via email]

In comp.lang.perl.misc, 
    Jaime Pozuelo-Monfort <pozuelo@email.enst.fr> writes:
:open (FILE1, ">file_1");

Dead file.

:flock (FILE1, 2);

Why lock something you just killed?  Definitely 
shutting the barn door after the cows have fled.

Vide faqwards.

--tom
-- 
    I'll say it again for the logic impaired.
		--Larry Wall


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

Date: 21 Jun 1998 21:44:33 GMT
From: mick@io.com (Michele Beltrame)
Subject: RTF parsing
Message-Id: <slrn6or072.6bq.mick@caladan.italpro.ddns.org>

Hallo!

I need a Perl module or function to parse RTF (Rich Text Format) or on
second choice MS WinWord DOC files. Also a RTF->HTML converter would
be helpful. Any advice?

	TIA, Mickey.

-- 
Michele Beltrame
mick@io.com
http://www.italpro.com/mb/


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

Date: 21 Jun 1998 19:06:13 GMT
From: Tom Christiansen <tchrist@mox.perl.com>
Subject: Re: Will Perl to C conversion accelarate my cgi script ?
Message-Id: <6mjlj5$656$1@csnews.cs.colorado.edu>

The answer to your FAQ is "no".

--tom
-- 
"IMHO, CAPS LOCK should be somewhere more
convenient; e.g., in another building."  --jgreely


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

Date: Sun, 21 Jun 1998 19:34:54 GMT
From: Tom Phoenix <rootbeer@teleport.com>
Subject: Re: Will Perl to C conversion accelarate my cgi script ?
Message-Id: <Pine.GSO.3.96.980621123349.8650L-100000@user2.teleport.com>

On Sun, 21 Jun 1998, Robert Raszuk wrote:

> Subject: Will Perl to C conversion accelarate my cgi script ?

The short answer is 'no'. The long answer is in section three of the FAQ.
Hope this helps!

-- 
Tom Phoenix       Perl Training and Hacking       Esperanto
Randal Schwartz Case:     http://www.rahul.net/jeffrey/ovs/



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

Date: 8 Mar 97 21:33:47 GMT (Last modified)
From: Perl-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin) 
Subject: Digest Administrivia (Last modified: 8 Mar 97)
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 V8 Issue 2928
**************************************

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