[19991] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 2186 Volume: 10

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Fri Nov 23 00:05:47 2001

Date: Thu, 22 Nov 2001 21:05:07 -0800 (PST)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Message-Id: <1006491907-v10-i2186@ruby.oce.orst.edu>
Content-Type: text

Perl-Users Digest           Thu, 22 Nov 2001     Volume: 10 Number: 2186

Today's topics:
    Re: .htaccess with Perl <comdog@panix.com>
        bareword? (winter7)
    Re: bareword? (Chris Fedde)
    Re: bareword? <uri@stemsystems.com>
    Re: bareword? <wyzelli@yahoo.com>
    Re: bareword? <bart.lateur@pandora.be>
    Re: bareword? <bart.lateur@pandora.be>
    Re: bareword? (Chris Fedde)
    Re: File position of of every word in a file <godzilla@stomp.stomp.tokyo>
    Re: File upload in Internet Explorer using Perl <aneely@softouch.on.ca>
        Net::AIM trouble <lal26@cornell.edu>
    Re: Overwriting a part of text using a perl script! nobull@mail.com
    Re: passing hash reference to function: bug? <ahamm@programmer.net>
        pics with search engine results? <webwriter@london.com>
        pics with search engine results? <webwriter@london.com>
        Posting Guidelines for comp.lang.perl.misc ($Revision:  tadmc@augustmail.com
        Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)

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

Date: Thu, 22 Nov 2001 19:36:35 -0600
From: brian d foy <comdog@panix.com>
Subject: Re: .htaccess with Perl
Message-Id: <comdog-A6D5BD.19363522112001@news.panix.com>

In article <1006419611.18839.0.nnrp-02.c2def305@news.demon.co.uk>, 
"Jonathan Rew" <jon_rew@nospam.learn-it.demon.co.uk> wrote:

> "Ronald Nelson" <rknelson26@hotmail.com> wrote in message
> news:3bfc0fde$0$22582$4c41069e@reader1.ash.ops.us.uu.net...

> > You want to know how to setup a password protected web site using
> .htaccess?
> > What exactly is your question, its a bit confusing.

> I have already used .htaccess to set up a username and password for a part
> of the website and now want to be able to access it using Perl.

what is "it"?  the .htaccess file or a file under the directory in
which you created the .htaccess file?

-- 
brian d foy <comdog@panix.com> - Perl services for hire
CGI Meta FAQ - http://www.perl.org/CGI_MetaFAQ.html
Troubleshooting CGI scripts - http://www.perl.org/troubleshooting_CGI.html



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

Date: 22 Nov 2001 17:19:37 -0800
From: winter7@e-mailanywhere.com (winter7)
Subject: bareword?
Message-Id: <fb7341b.0111221719.69efb7fe@posting.google.com>

use strict;
BEGIN {
   our $sound = 0;
   eval { require Win32::Sound };
   unless ($@) {
      import Win32::Sound;
      $sound = 1;
   }
}
our $sound;
Win32::Sound::Play("1234.wav", SND_ASYNC) if ($sound);


It doesn't run on unix.
It says "Bareword "SND_ASYNC" not allowed while "strict subs" in use at...."
What can I do?
Thans for any help..


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

Date: Fri, 23 Nov 2001 02:52:30 GMT
From: cfedde@fedde.littleton.co.us (Chris Fedde)
Subject: Re: bareword?
Message-Id: <ORiL7.443$Fbh.190851584@news.frii.net>

In article <fb7341b.0111221719.69efb7fe@posting.google.com>,
winter7 <winter7@e-mailanywhere.com> wrote:
>use strict;
>BEGIN {
>   our $sound = 0;
>   eval { require Win32::Sound };
>   unless ($@) {
>      import Win32::Sound;
>      $sound = 1;
>   }
>}
>our $sound;
>Win32::Sound::Play("1234.wav", SND_ASYNC) if ($sound);
>
>
>It doesn't run on unix.
>It says "Bareword "SND_ASYNC" not allowed while "strict subs" in use at...."
>What can I do?
>Thans for any help..

If Win32::Sound could not be required then SND_ASYNC is not the
name of a function, hence it appears to be a bare word.  You might
beef up your error message in the "unless" clause.

    if ($@) {
	die "$0: $@";
    } else {
	import Win32::Sound;
    } 
-- 
    This space intentionally left blank


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

Date: Fri, 23 Nov 2001 03:22:58 GMT
From: Uri Guttman <uri@stemsystems.com>
Subject: Re: bareword?
Message-Id: <x7g076b25t.fsf@home.sysarch.com>

>>>>> "CF" == Chris Fedde <cfedde@fedde.littleton.co.us> writes:

  CF> In article <fb7341b.0111221719.69efb7fe@posting.google.com>,
  CF> winter7 <winter7@e-mailanywhere.com> wrote:
  >> use strict;
  >> BEGIN {
  >> our $sound = 0;
  >> eval { require Win32::Sound };
  >> unless ($@) {
  >> import Win32::Sound;
  >> $sound = 1;
  >> }
  >> }
  >> our $sound;
  >> Win32::Sound::Play("1234.wav", SND_ASYNC) if ($sound);
  >> 
  >> 
  >> It doesn't run on unix.
  >> It says "Bareword "SND_ASYNC" not allowed while "strict subs" in use at...."
  >> What can I do?
  >> Thans for any help..

  CF> If Win32::Sound could not be required then SND_ASYNC is not the
  CF> name of a function, hence it appears to be a bare word.  You might
  CF> beef up your error message in the "unless" clause.

and require usually doesn't import stuff. since the require is in a
BEGIN block, why not call use?

uri

-- 
Uri Guttman  ------  uri@stemsystems.com  -------- http://www.stemsystems.com
-- Stem is an Open Source Network Development Toolkit and Application Suite -
----- Stem and Perl Development, Systems Architecture, Design and Coding ----
Search or Offer Perl Jobs  ----------------------------  http://jobs.perl.org


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

Date: Fri, 23 Nov 2001 13:44:08 +0930
From: "Wyzelli" <wyzelli@yahoo.com>
Subject: Re: bareword?
Message-Id: <g1kL7.31$gG2.414@vicpull1.telstra.net>

"winter7" <winter7@e-mailanywhere.com> wrote in message
news:fb7341b.0111221719.69efb7fe@posting.google.com...
> use strict;
> BEGIN {
>    our $sound = 0;
>    eval { require Win32::Sound };
>    unless ($@) {
>       import Win32::Sound;
>       $sound = 1;
>    }
> }
> our $sound;
> Win32::Sound::Play("1234.wav", SND_ASYNC) if ($sound);
>
>
> It doesn't run on unix.

This may appear to be a strange question, but why would you want a Win32
module to run on unix?

Wyzelli
--
push@x,$_ for(a..z);push@x,' ';
@z='092018192600131419070417261504171126070002100417'=~/(..)/g;
foreach $y(@z){$_.=$x[$y]}y/jp/JP/;print;




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

Date: Fri, 23 Nov 2001 04:15:34 GMT
From: Bart Lateur <bart.lateur@pandora.be>
Subject: Re: bareword?
Message-Id: <17jrvtoq50gf7nbsa0gbbndcobruuqslqr@4ax.com>

Chris Fedde wrote:

>If Win32::Sound could not be required then SND_ASYNC is not the
>name of a function, hence it appears to be a bare word.  You might
>beef up your error message in the "unless" clause.
>
>    if ($@) {
>	die "$0: $@";
>    } else {
>	import Win32::Sound;
>    } 

But he wants the script to go on even if the sound module doesn't exist!

Since SND_ASYNC is a constant, hence a function, replacing it with
SND_ASYNC() ought to work.

If you replace SND_ASYNC() with Win32::Sound::SND_ASYNC(), and the same
for other similar calls, then you don't even have to import the module
functions.

-- 
	Bart.


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

Date: Fri, 23 Nov 2001 04:17:16 GMT
From: Bart Lateur <bart.lateur@pandora.be>
Subject: Re: bareword?
Message-Id: <jdjrvtki6g1eq8oqtl6odtcr6qceq7j2a5@4ax.com>

Wyzelli wrote:

>This may appear to be a strange question, but why would you want a Win32
>module to run on unix?

He doesn't. He just wants to play sound *if sound is available*, and let
there be silence otherwise.

-- 
	Bart.


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

Date: Fri, 23 Nov 2001 04:49:27 GMT
From: cfedde@fedde.littleton.co.us (Chris Fedde)
Subject: Re: bareword?
Message-Id: <rzkL7.448$Fbh.213028864@news.frii.net>

In article <17jrvtoq50gf7nbsa0gbbndcobruuqslqr@4ax.com>,
Bart Lateur  <bart.lateur@pandora.be> wrote:
>Chris Fedde wrote:
>
>>If Win32::Sound could not be required then SND_ASYNC is not the
>>name of a function, hence it appears to be a bare word.  You might
>>beef up your error message in the "unless" clause.
>>
>>    if ($@) {
>>	die "$0: $@";
>>    } else {
>>	import Win32::Sound;
>>    } 
>
>But he wants the script to go on even if the sound module doesn't exist!
>

Given. My test is a bit week.  Still if the OP is going to all the work to
validate the require then he aught to deal with the case where the require
fails.  Maybe he could do that by throwing some kind of exception of his
own.

YMMV

-- 
    This space intentionally left blank


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

Date: Thu, 22 Nov 2001 16:31:11 -0800
From: "Godzilla!" <godzilla@stomp.stomp.tokyo>
Subject: Re: File position of of every word in a file
Message-Id: <3BFD98CF.D614603C@stomp.stomp.tokyo>

Rob van Strien wrote:

> How can I get the file position of each single word in a file?
> I can read the file line by line and chop it up in words, but
> the tell-function will always return the file position of the
> (end of the) line I'm on, not the words.


This is a pretty tough problem. You will discover tossing
together a script to do this, to be a formidable task.

You are not clear on your parameters, actually there are none.
I will set some parameters in lieu of not having any with
which to work.

A word is to be defined as any character or characters,
except a \n newline character. Take this literally; any
character or characters regardless of nature.

A sentence contains words delimited by spaces. This is,
no space at the beginning of a sentence nor a space at
the end of a sentence with no multiple spaces within.

You will encounter some problems. Most obvious problem
is multiple spaces within a sentence. A less obvious
problem which becomes very clear very quick, is a word
may contain characters such as a period, an exclamation
mark, an interrogative mark, numbers, comma, whatever.


Be sure you are clear on my parameters and be equally
clear you will have problems to resolve.


My test script uses no modules. It is a mimic, more of
a skeleton of a routine from one of my android scripts,
Roberta The Remarkable Robot whom carries on conversations
with visitors to my site. This routine in her program has
a function of finding important grammatical words, such
as verbs, pronouns, nouns and the such. Its true function
is to create adverbs, adjectives, gerunds and change tense
between any combination of past, present and future.

Nonetheless, after investing about an hour's time, I believe
I have tossed together a skeleton script which comes pretty
close to what you want. I am not willing to spend more time
on this; this becomes complicated very fast.

Some technical notes for you. Please pay attention, carefully,
lest you encounter some serious confusion.

During a while loop read of a file, a \n newline character
counts as two characters. Logical, yes? However, for Perl's
length function, length (), a \n newline counts as only one.

So when you mix file read character positions and the length
function, you must keep careful track; it is two for the
former and, one for the latter.

I have not removed some diagnostics prints to assist you in
making better sense of what happens. You will find these
clearly commented in two places.

On multiple spaces, I am treated this as your file does not
contain multiple spaces. You can prepare your file or, if you
will find my single do / until loop, there you can add easy
code to keep stepping through a file line if multiple spaces
are detected. Just a matter of bumping your position up until
no more spaces are found. This is a task left for you.

Unless you are talented at setting up a "more" for a DOS box
to view printed results, you must use a browser. Look at my
printed results; very long!



This partial snippet will help you with what my script prints:

Start: 27 Tell: 49

Array: 5 9 15

27, 4 five 



First line is diagnostics:

Start: 27

Character position of beginning of current line.

Tell: 49

Character position of beginning of next line.



Second line is diagnostics:

Array: 5 9 15

Those are positions of spaces in a current line.
Note those are relative only to a current line.



Third line is in what you are actually interested:

27, 4 five 

27 is the beginning character position of a word 
   relative to an entire file; actual file position.

4 is the length of the word.

"five" is the actual word found.


   position  length  word


I strongly suggest you leave all as is until you feel
very comfortable with this script. Make an original
copy for safe keeping. You will discover a single
simple change results in dramatic differences,
unnoticed until you change your input data.

My test.txt contains what I consider to be common circumstances.
I have not tested with other formats. This is another task for
you to tackle. Do test a lot of formats, do this without fail.

With time and effort, you might find you can adapt the logic
displayed in my script to your needs. I suppose this depends
on how sincere you are about your request, doesn't it?


Godzilla!  Queen Of Perl Heretics.
--

  "Do not pay any attention to what Godzilla says. It is a
   troll, and has no decent working knowledge of Perl or
   programming in general. Search groups.google.com to see
   a history of its posts and replies to these posts."

       - Frank Gostak of sfwest.com



CONTENTS OF TEST.TXT:
_____________________

one

two
three
four

five six seven eight
nine ten eleven twelve thirteen
fourteen



TEST SCRIPT:
____________


#!perl

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

open (TEST, "test.txt");

$position = 0;

while (<TEST>)
 {
  $tell = tell (TEST);
  $start = $tell - length ($_) - 1;


## Next Print Is For Diagnostics:

  print "\n\nStart: $start Tell: $tell\n\n";


  do
   {
    $position = index ($_, " ", $position);
    $position++;
    if ($position > 0)
     { push (@Array, $position); }
   }
  until ($position == 0);


## Next Print Is For Diagnostics:

  print "Array: @Array\n\n";


  if (index ($_, " ") == -1)
   { 
    $word = substr ($_, 0, length ($_) - 1);
    $length = length ($word);
   }
  else
   { 
    $word = substr ($_, 0, $Array[0]);
    $length = length ($word);
   }

  if (length ($word) == 0)
   {
    if ($start < 10)
     { $start = "0$start"; } 
    print "$start, 0 (No Word Found. Blank Line.)";
   }
  else
   {
    if ($start < 10)
     { print "0$start, ", length ($word), " $word\n"; }
    else
     { 
      if (index ($_, " ") == -1)
       { print "$start, ", length ($word), " $word\n"; }
      else
       { print "$start, ", length ($word) - 1, " $word\n"; }
     }
    $start = $start + length ($word);

    for ($iterate = 0; $iterate < $#Array; $iterate++)
     {
      $word = substr ($_, $Array[$iterate], $Array[$iterate + 1] - $Array[$iterate]);
      if ($start < 10)
       { print "0", $start, ", ", length ($word), " $word\n"; }
      else
       { print "$start, ", length ($word) - 1, " $word\n"; }
      $start = $start + length ($word);
     }
   }
  if (index ($_, " ") > -1)
   {
    $word = substr ($_, $Array[$#Array]);

    if (($tell - length ($word)) < 10)
     { print "0", $tell - length ($word) - 1, ", ", length ($word) - 1, " $word"; }
    else
     { print $tell - length ($word) - 1, ", ", length ($word) - 1, " $word"; }
   }
  @Array = (); 
 }

close (TEST);

exit;



PRINTED RESULTS:
________________

Start: 0 Tell: 5

Array: 

00, 3 one


Start: 5 Tell: 7

Array: 

5, 0 (No Word Found. Blank Line.)

Start: 7 Tell: 12

Array: 

07, 3 two


Start: 12 Tell: 19

Array: 

12, 5 three


Start: 19 Tell: 25

Array: 

19, 4 four


Start: 25 Tell: 27

Array: 

25, 0 (No Word Found. Blank Line.)

Start: 27 Tell: 49

Array: 5 9 15

27, 4 five 
32, 3 six 
36, 5 seven 
42, 5 eight


Start: 49 Tell: 82

Array: 5 9 16 23

49, 4 nine 
54, 3 ten 
58, 6 eleven 
65, 6 twelve 
72, 8 thirteen


Start: 82 Tell: 92

Array: 

82, 8 fourteen


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

Date: Thu, 22 Nov 2001 21:58:40 -0500
From: Amer Neely <aneely@softouch.on.ca>
Subject: Re: File upload in Internet Explorer using Perl
Message-Id: <3BFDBB60.EEE33D62@softouch.on.ca>

Malcolm Dew-Jones wrote:
> 
> Nitin Ghai (ghainitin@yahoo.com) wrote:
> : Hi,
> : In our applcation we are using the file upload utility of Perl. The
> : files are uploaded to a UNIX server and the application is located on
> : another server.
> : We are having problems in calculating the size of the file in IE, the
> : same code is working in NN4.7. But when we try to calculate the file
> : size using -s($filename), it is giving "" as size for all the files in
> : IE(as it is not able to access the file; 'fileexists' option returns
> : "" in IE, while in NN the same command returns 1 , thus the
> : conclusion!).
> 
> (What conclusion?)
> 
> Are you using CGI.pm ?
> 
> If you are _not_ then I assume your file upload code is broken.  The
> format of the form-data sent by NN is not identical to that sent by IE, so
> your perl code may be able to parse the NN data but unable to parse the IE
> data, and that would explain why you don't get a file stored on the server
> when it's uploaded from IE.
> 
> If you _are_ using CGI.pm then I would not expect this to be the
> explanation.
> 
> In any case, you would probably need to post some code for us to see to
> get a more specific answer...

Assuming you are talking about <input type=file> in a form, I use this
HTML feature (it's not a Perl thing) successfully for several clients of
mine. There are 2 problems I see with what you are trying to do.
1: You are trying to upload a file to a server other than where the
script is running. How do you expect to do this?

2:You should NEVER accept a filename from a user and use it as the
filename to save an uploaded file to. If you don't know why, you should
brush up on CGI security.

As mentioned in a previous post: give us some code to work with.
-- 
Amer Neely aneely@softouch.on.ca
Softouch Information Services: www.softouch.on.ca/
Perl / CGI programming for shopping carts, data entry forms.
"We make web sites work!"


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

Date: Thu, 22 Nov 2001 23:45:18 -0500
From: "Luca A. Loguercio" <lal26@cornell.edu>
Subject: Net::AIM trouble
Message-Id: <9tkk9i$qn0$1@news01.cit.cornell.edu>

Hi,
I'm trying to use Net::AIM but I can't seem to get it to work, yet I don't
get any error messages.
All I get is

Creating connection to AIM server...
Installing handler routines...Starting SignOn process...
Done SignON...

But I won't be signed on.
Has anyone had any experience with this module and maybe knows what I'm
doing wrong?

-Luca




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

Date: 21 Nov 2001 13:07:07 +0000
From: nobull@mail.com
Subject: Re: Overwriting a part of text using a perl script!
Message-Id: <u94rnos26c.fsf@wcl-l.bham.ac.uk>

vazkevin@hotmail.com (Kevin VAZ) writes:

> I'am new to perl,

So read the [expletive deleted] FAQ!

> Was wondering if we could overwrite only a selected portion of text.

See FAQ: "How do I change one line in a file...?"

> *******************************
>     Trusting in GOD Alone.
> *******************************

I suggest you try to develop some degree of self-sufficiency rather
than reley on mythical beings to provide for your needs.

-- 
     \\   ( )
  .  _\\__[oo
 .__/  \\ /\@
 .  l___\\
  # ll  l\\
 ###LL  LL\\


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

Date: Fri, 23 Nov 2001 12:23:57 +1100
From: "Andrew Hamm" <ahamm@programmer.net>
Subject: Re: passing hash reference to function: bug?
Message-Id: <3bfda528_2@news.iprimus.com.au>

Jean-Luc Fontaine wrote in message <3BFD08E2.1050104@winealley.com>...
>
>sub f(\%) {my ($p) = @_;}
>
Since you've told the compiler that f takes a ref to a hash, it will do it
for you, and hence, you need to make the call like this

    f(%h)

and the reference to the hash will automagically be passed. You attempted to
call

    f(\%h)

and that's wrong 'cos the generated runtime code can't take a reference (ie
the automagical action) to a hash reference and pass it in as a hash
reference. The compiler recognises this and complains that you ain't
supplying an actual hash. NOTE: the actual hash can be something as ugly as

    %{$ref->code(args)->[index]{key}[index]}

assuming that ultimately it yields a real hash that you can kick.

>whereas the same (!!!) code but with the function in a separate file works:
>
>do './f.pl';
>my %h;
>f(\%h);
>
>
>$ cat f.pl
>sub f(\%) {my ($p) = @_;}
>
Not quite the same code. In this example, you are using do. So that happens
at runtime. As far as the compiler is concerned it has no idea what f's
signature is so it happily lets you do \%h and by luck you'll be passing the
hash reference that f will require.

Using 'do' like this is very old-fashioned now. At least 'require' and
preferably 'use' should be used. When you can build a proper module with
tasteful use of the Exporter module, you'll be flying.

--
Space Corps Directive #723
Terraformers are expressly forbidden from recreating Swindon.
    -- Red Dwarf





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

Date: Fri, 23 Nov 2001 00:38:38 GMT
From: "Mel" <webwriter@london.com>
Subject: pics with search engine results?
Message-Id: <iUgL7.950$hu4.126116@news1.cableinet.net>

Hi

Does anyone know of any perl based search engines (preferably shareware!)
that returns pictures with the summaries in search engine results ? (like
some ecommerce sites and real estate agency sites).

Thanks! :o)

Mel




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

Date: Fri, 23 Nov 2001 00:46:27 GMT
From: "Mel" <webwriter@london.com>
Subject: pics with search engine results?
Message-Id: <D%gL7.972$hu4.127819@news1.cableinet.net>

Hi

Does anyone know of any perl based search engines (preferably shareware!)
that returns pictures with the summaries in search engine results ? (like
some ecommerce sites and real estate agency sites).

Thanks! :o)

Mel




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

Date: Fri, 23 Nov 2001 04:08:03 GMT
From: tadmc@augustmail.com
Subject: Posting Guidelines for comp.lang.perl.misc ($Revision: 1.2 $)
Message-Id: <DYjL7.85098$2w.4875910@bin4.nnrp.aus1.giganews.com>

Outline
   Before posting to comp.lang.perl.misc
      Must
       - Check the Perl Frequently Asked Questions (FAQ)
       - Check the other standard Perl docs (*.pod)
      Really Really Should
       - Lurk for a while before posting
       - Search a Usenet archive
      If You Like
       - Check Other Resources
   Posting to comp.lang.perl.misc
      Is there a better place to ask your question?
       - Question should be about Perl, not about the application area
      How to participate (post) in the clpmisc community
       - Carefully choose the contents of your Subject header
       - Use an effective followup style
       - Speak Perl rather than English, when possible
       - Ask perl to help you
       - Do not re-type Perl code
       - Provide enough information
       - Do not provide too much information
       - Do not post binaries, HTML, or MIME
      Social faux pas to avoid
       - Asking a Frequently Asked Question
       - Asking a question easily answered by a cursory doc search
       - Asking for emailed answers
       - Beware of saying "doesn't work"
       - Sending a "stealth" Cc copy
      Be extra cautious when you get upset
       - Count to ten before composing a followup when you are upset
       - Count to ten after composing and before posting when you are upset
-----------------------------------------------------------------

Posting Guidelines for comp.lang.perl.misc ($Revision: 1.2 $)
    This newsgroup, commonly called clpmisc, is a technical newsgroup
    intended to be used for discussion of Perl related issues (except job
    postings), whether it be comments or questions.

    As you would expect, clpmisc discussions are usually very technical in
    nature and there are conventions for conduct in technical newsgroups
    going somewhat beyond those in non-technical newsgroups.

    This article describes things that you should, and should not, do to
    increase your chances of getting an answer to your Perl question. It is
    available in POD, HTML and plain text formats at:

     http://mail.augustmail.com/~tadmc/clpmisc.shtml

    For more information about netiquette in general, see the "Netiquette
    Guidelines" at:

     http://andrew2.andrew.cmu.edu/rfc/rfc1855.html

    A note to newsgroup "regulars":

       Please do not use the existence of these guidelines as a
       "license to flame" or other meanness. It is possible that
       a poster is not aware of the things discussed here. Let's
       give them the benefit of the doubt, and just help them learn
       how to post, rather than assume that they do know and are
       being the "bad kind" of Lazy.

    A note about technical terms used here:

       In this document, we use words like "must" and "should" in the 
       very precise sense that they're used in technical conversation 
       (such as you're likely to encounter in this newsgroup). When 
       we say that you *must* do something, we mean that if you don't
       do that something, then it's very unlikely that you're going to 
       get much benefit from using this group.  We're not trying to boss
       you around; we're just trying to convey the point without using 
       a lot of words.

    Do *NOT* send email to the maintainer of these guidelines. It will be
    discarded unread. The guidelines belong to the newsgroup so all
    discussion should appear in the newsgroup. I am just the secretary that
    writes down the consensus of the group.

Before posting to comp.lang.perl.misc
  Must

    This section describes things that you *must* do before posting to
    clpmisc, in order to maximize your chances of getting meaningful replies
    to your inquiry and to avoid getting flamed for being lazy and trying to
    have others do your work.

    The perl distribution includes documentation that is copied to your hard
    drive when you install perl. Also installed is a program for looking
    things up in that (and other) documentation named 'perldoc'.

    You should either find out where the docs got installed on your system,
    or use perldoc to find them for you. Type "perldoc perldoc" to learn how
    to use perldoc itself. Type "perldoc perl" to start reading Perl's
    standard documentation.

    Check the Perl Frequently Asked Questions (FAQ)
        Checking the FAQ before posting is required in Big 8 newsgroups in
        general, there is nothing clpmisc-specific about this requirement.
        You are expected to do this in nearly all newsgroups.

        You can use the "-q" switch with perldoc to do a word search of the
        questions in the Perl FAQs.

    Check the other standard Perl docs (*.pod)
        The perl distribution comes with much more documentation than is
        available for most other newsgroups, so in clpmisc you should also
        see if you can find an answer in the other (non-FAQ) standard docs
        before posting.

    It is *not* required, or even expected, that you actually *read* all of
    Perl's standard docs, only that you spend a few minutes searching them
    before posting.

    Try doing a word-search in the standard docs for some words/phrases
    taken from your problem statement or from your very carefully worded
    "Subject:" header.

  Really Really Should

    This section describes things that you *really should* do before posting
    to clpmisc.

    Lurk for a while before posting
        This is very important and is expected regardless of what newsgroup
        you are visiting. Lurking means to simply monitor a newsgroup for a
        period of time until you become very familiar with local customs.
        Think of a newsgroup as foreign culture. Each newsgroup has its own
        specific customs and rituals. Get to know those customs and rituals
        well before you participate. This will help you to avoid
        embarrassing social situations. Consider yourself to be a foreigner
        at first!

    Search a Usenet archive
        There are tens of thousands of Perl programmers. It is very likely
        that your question has already been asked (and answered). See if you
        can find where it has already been answered.

        One such searchable archive is:

         http://groups.google.com/advanced_group_search

  If You Like

    This section describes things that you *can* do before posting to
    clpmisc.

    Check Other Resources
        You may want to check in books or on web sites to see if you can
        find the answer to your question.

        But you need to consider the source of such information: there are a
        lot of very poor Perl books and web sites, and several good ones
        too, of course.

Posting to comp.lang.perl.misc
    There can be 200 messages in clpmisc in a single day. Nobody is going to
    read every article. They must decide somehow which articles they are
    going to read, and which they will skip.

    Your post is in competition with 199 other posts. You need to "win"
    before a person who can help you will even read your question.

    These sections describe how you can help keep your article from being
    one of the "skipped" ones.

  Is there a better place to ask your question?

    Question should be about Perl, not about the application area
        It can be difficult to separate out where your problem really is,
        but you should make a conscious effort to post to the most
        applicable newsgroup. That is, after all, where you are the most
        likely to find the people who know how to answer your question.

        Being able to "partition" a problem is an essential skill for
        effectively troubleshooting programming problems. If you don't get
        that right, you end up looking for answers in the wrong places.

        It should be understood that you may not know that the root of your
        problem is not Perl-related (the two most frequent ones are CGI and
        Operating System related), so off-topic postings will happen from
        time to time. Be gracious when someone helps you find a better place
        to ask your question by pointing you to a more applicable newsgroup.

  How to participate (post) in the clpmisc community

    Carefully choose the contents of your Subject header
        You have 40 precious characters of Subject to win out and be one of
        the posts that gets read. Don't waste them. Take care while
        composing them, they are the key that opens the door to getting an
        answer.

        Spend them indicating what aspect of Perl others will find if they
        should decide to read your article.

        Do not spend them indicating "experience level" (guru, newbie...).

        Do not spend them pleading (please read, urgent, help!...).

        Do not spend them on non-Subjects (Perl question, one-word
        Subject...)

        For more information on choosing a Subject see "Choosing Good
        Subject Lines":

         http://www.perl.com/CPAN-local/authors/Dean_Roehrich/subjects.post

        Part of the beauty of newsgroup dynamics, is that you can contribute
        to the community with your very first post! If your choice of
        Subject leads a fellow Perler to find the thread you are starting,
        then even asking a question helps us all.

    Use an effective followup style
        When composing a followup, quote only enough text to establish the
        context for the comments that you will add. Always indicate who
        wrote the quoted material. Never quote an entire article. Never
        quote a .signature (unless that is what you are commenting on).

        Intersperse your comments *following* the sections of quoted text
        that your comments apply to. Failure to do this is called "Jeopardy"
        posting because the answer comes before the question.

        Reversing the chronology of the dialog makes it much harder to
        understand (some folks won't even read it if written in that style).
        For more information on quoting style, see:

         http://www.geocities.com/nnqweb/nquote.html

    Speak Perl rather than English, when possible
        Perl is much more precise than natural language. Saying it in Perl
        instead will avoid misunderstanding your question or problem.

        Do not say: I have variable with "foo\tbar" in it.

        Instead say: I have $var = "foo\tbar", or I have $var = 'foo\tbar',
        or I have $var = <DATA> (and show the data line).

    Ask perl to help you
        You can ask perl itself to help you find common programming mistakes
        by doing two things: enable warnings (perldoc warnings) and enable
        "strict"ures (perldoc strict).

        You should not bother the hundreds/thousands of readers of the
        newsgroup without first seeing if a machine can help you find your
        problem. It is demeaning to be asked to do the work of a machine. It
        will annoy the readers of your article.

        You can look up any of the messages that perl might issue to find
        out what the message means and how to resolve the potential mistake
        (perldoc perldiag). If you would like perl to look them up for you,
        you can put "use diagnostics;" near the top of your program.

    Do not re-type Perl code
        Use copy/paste or your editor's "import" function rather than
        attempting to type in your code. If you make a typo you will get
        followups about your typos instead of about the question you are
        trying to get answered.

    Provide enough information
        If you do the things in this item, you will have an Extremely Good
        chance of getting people to try and help you with your problem!
        These features are a really big bonus toward your question winning
        out over all of the other posts that you are competing with.

        First make a short (less than 20-30 lines) and *complete* program
        that illustrates the problem you are having. People should be able
        to run your program by copy/pasting the code from your article. (You
        will find that doing this step very often reveals your problem
        directly. Leading to an answer much more quickly and reliably than
        posting to Usenet.)

        Describe *precisely* the input to your program. Also provide example
        input data for your program. If you need to show file input, use the
        __DATA__ token (perldata.pod) to provide the file contents inside of
        your Perl program.

        Show the output (including the verbatim text of any messages) of
        your program.

        Describe how you want the output to be different from what you are
        getting.

        If you have no idea at all of how to code up your situation, be sure
        to at least describe the 2 things that you *do* know: input and
        desired output.

    Do not provide too much information
        Do not just post your entire program for debugging. Most especially
        do not post someone *else's* entire program.

    Do not post binaries, HTML, or MIME
        clpmisc is a text only newsgroup. If you have images or binaries
        that explain your question, put them in a publically accessible
        place (like a Web server) and provide a pointer to that location. If
        you include code, cut and paste it directly in the message body.
        Don't attach anything to the message. Don't post vcards or HTML.
        Many people (and even some Usenet servers) will automatically filter
        out such messages. Many people will not be able to easily read your
        post. Plain text is something everyone can read.

  Social faux pas to avoid

    The first two below are symptoms of lots of FAQ asking here in clpmisc.
    It happens so often that folks will assume that it is happening yet
    again. If you have looked but not found, or found but didn't understand
    the docs, say so in your article.

    Asking a Frequently Asked Question
        It should be understood that you may have missed the applicable FAQ
        when you checked, which is not a big deal. But if the Frequently
        Asked Question is worded similar to your question, folks will assume
        that you did not look at all. Don't become indignant at pointers to
        the FAQ, particularly if it solves your problem.

    Asking a question easily answered by a cursory doc search
        If folks think you have not even tried the obvious step of reading
        the docs applicable to your problem, they are likely to become
        annoyed.

        If you are flamed for not checking when you *did* check, then just
        shrug it off (and take the answer that you got).

    Asking for emailed answers
        Emailed answers benefit one person. Posted answers benefit the
        entire community. If folks can take the time to answer your
        question, then you can take the time to go get the answer in the
        same place where you asked the question.

        It is OK to ask for a *copy* of the answer to be emailed, but many
        will ignore such requests anyway. If you munge your address, you
        should never expect (or ask) to get email in response to a Usenet
        post.

        Ask the question here, get the answer here (maybe).

    Beware of saying "doesn't work"
        This is a "red flag" phrase. If you find yourself writing that,
        pause and see if you can't describe what is not working without
        saying "doesn't work". That is, describe how it is not what you
        want.

    Sending a "stealth" Cc copy
        A "stealth Cc" is when you both email and post a reply without
        indicating *in the body* that you are doing so.

  Be extra cautious when you get upset

    Count to ten before composing a followup when you are upset
        This is recommended in all Usenet newsgroups. Here in clpmisc, most
        flaming sub-threads are not about any feature of Perl at all! They
        are most often for what was seen as a breach of netiquette. If you
        have lurked for a bit, then you will know what is expected and won't
        make such posts in the first place.

        But if you get upset, wait a while before writing your followup. I
        recommend waiting at least 30 minutes.

    Count to ten after composing and before posting when you are upset
        After you have written your followup, wait *another* 30 minutes
        before committing yourself by posting it. You cannot take it back
        once it has been said.

AUTHOR
    Tad McClellan <tadmc@augustmail.com> and many others on the
    comp.lang.perl.misc newsgroup.



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

Date: 6 Apr 2001 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin) 
Subject: Digest Administrivia (Last modified: 6 Apr 01)
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.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.

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 V10 Issue 2186
***************************************


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