[19919] in Perl-Users-Digest
Perl-Users Digest, Issue: 2114 Volume: 10
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Mon Nov 12 09:05:32 2001
Date: Mon, 12 Nov 2001 06:05:11 -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: <1005573911-v10-i2114@ruby.oce.orst.edu>
Content-Type: text
Perl-Users Digest Mon, 12 Nov 2001 Volume: 10 Number: 2114
Today's topics:
Accessing NT Network Neighbourhood <s.warhurst@rl.ac.uk>
Re: Accessing NT Network Neighbourhood <Peter.Dintelmann@dresdner-bank.com>
creating Win32 share in Windows 2000 (John Menke)
Re: Daemon --- Help (David Efflandt)
Re: Data::Dumper and array with undefed elements <Tassilo.Parseval@post.rwth-aachen.de>
Emacs modules for Perl programming (Jari Aalto+mail.perl)
Re: Exec stops execution of Perl script after having co <uri@stemsystems.com>
Extracting different Input <robert_loui@yahoo.com>
Re: Extracting different Input <bart.lateur@skynet.be>
Re: Extracting different Input <eod_spam@yahoo.es>
failed dependencies when installing a perl module(?) <ntv@email.com>
Re: flat text database cgi <andreass@raindog.uio.no>
Having an issue database. How to do indexing in perl? <ton-t_lam@hp.com>
Re: need help with simple script <khirv@hotmail.com>
Re: Newbie Question <adustipujo1@mediaone.net>
Re: Newbie Question <theaney@toadmail.toad.net>
Re: Passing variables from Perl script to shell script <tintin@snowy.calculus>
Posting Guidelines for comp.lang.perl.misc ($Revision: tadmc@augustmail.com
Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Mon, 12 Nov 2001 12:47:08 -0000
From: "S Warhurst" <s.warhurst@rl.ac.uk>
Subject: Accessing NT Network Neighbourhood
Message-Id: <9sogci$nka@newton.cc.rl.ac.uk>
How can I access a network drive (NT), in this case - to create a file?
I am trying:
open(FILE, "\\\\servername\\directory\\file.txt")
I can write to it from the machine the script is running on through Network
Neighbourhood OK, indicating that the account has teh correct permissions on
that directory, but the script itself falls over.
Do I have to create an actual share on "directory" for Perl to be able to
access it? I'd rather not if there's a way round it.
Thanks
Spencer
------------------------------
Date: Mon, 12 Nov 2001 14:19:38 +0100
From: "Dr. Peter Dintelmann" <Peter.Dintelmann@dresdner-bank.com>
Subject: Re: Accessing NT Network Neighbourhood
Message-Id: <9sohjo$ub1@news-1.bank.dresdner.net>
Hi,
"S Warhurst" <s.warhurst@rl.ac.uk> schrieb im Newsbeitrag
news:9sogci$nka@newton.cc.rl.ac.uk...
> How can I access a network drive (NT), in this case - to create a file?
>
> I am trying:
>
> open(FILE, "\\\\servername\\directory\\file.txt")
>
1. always check for $! after open().
2. Just open for write with ">" (or append with ">>")
open(FILE, ">\\\\servername\\directory\\file.txt") || die $!;
Even / works for NT saving you 4 keystrokes :-)
open(FILE, ">//servername/directory/file.txt") || die $!;
Hope that helps,
Peter
------------------------------
Date: 12 Nov 2001 05:55:37 -0800
From: jmenke@scsnet.csc.com (John Menke)
Subject: creating Win32 share in Windows 2000
Message-Id: <3a2d73ac.0111120555.7574e842@posting.google.com>
I am trying to use the Win32::NetResource package, but even the
example script is giving me an error:
use Win32::NetResource;
$ShareInfo = {
'path' => "C:\\backup",
'netname' => "MyShare",
'remark' => "It is good to share",
'passwd' => "",
'current-users' =>0,
'permissions' => 0,
'maxusers' => -1,
'type' => 0,
};
Win32::NetResource::NetShareAdd( $ShareInfo,$parm )
or die "unable to add share";
I have the latest version of ActivePerl and Windows2000 has anybody
got the file sharing module working?
------------------------------
Date: Mon, 12 Nov 2001 12:51:21 +0000 (UTC)
From: efflandt@xnet.com (David Efflandt)
Subject: Re: Daemon --- Help
Message-Id: <slrn9uvhe9.4l9.efflandt@typhoon.xnet.com>
On Mon, 12 Nov 2001 14:55:45 +1000, sean <s4mu@yahoo.com> wrote:
> Hello,
>
> I am attempting to write a forking daemon in perl (for some basic system
> management)
> Can someone point me to any tutorials, howtos that may help me get started?
perldoc perlipc
search for 'daemonize' and scroll back to the beginning of that section.
--
David Efflandt - All spam is ignored - http://www.de-srv.com/
http://www.autox.chicago.il.us/ http://www.berniesfloral.net/
http://cgi-help.virtualave.net/ http://hammer.prohosting.com/~cgi-wiz/
------------------------------
Date: Mon, 12 Nov 2001 09:30:52 +0100
From: "Tassilo v. Parseval" <Tassilo.Parseval@post.rwth-aachen.de>
Subject: Re: Data::Dumper and array with undefed elements
Message-Id: <9so1bs$l31$07$1@news.t-online.com>
On Mon, 12 Nov 2001 01:37:54 GMT, Martien Verbruggen wrote:
>> $VAR1 = [
>> undef,
>> ${\$VAR1->[0]},
>> ${\$VAR1->[0]},
>> ${\$VAR1->[0]},
>> ${\$VAR1->[0]},
>> ${\$VAR1->[0]}
>> ];
>>
>> What does this stuff in element one to six actually mean? Does
>> Data::Dumper refer to the first element in order to represent undef?
>> Data::Denter gives me
>
> Not all undefs are equal, but some are.
>
> At the low level, I suspect that for uninitialised array elements the
> same 'undef' is returned, while for initialised (but undefined)
> elements a different undef gets returned. The Devel::Peek method
> allows you to have a bit more of a look at these things:
[...]
Thanks for this detailed explanation. I didn't fully understand it (but,
alas, who does?;-). Some while ago I read most of the perldocs dealing
with Perl internals, along with some stuff by Simon Cozens and the bits
in the camel book. Each time with bleeding eyes. To me it is mostly like
bohemian villages (as they say). But this paragraph was a relief:
> Note that information like this is normally not really of interest to
> the Perl programmer (because from within Perl you can't distinguish
> between the various undefs), but only to XS and perl API programmers.
Perl extensions are one thing on my to-do list. I know I will need a lot
of coffee to digest these.
Thank you again for your shedding a little light on this matter,
Tassilo
--
A writer is congenitally unable to tell the truth and that is why we call
what he writes fiction.
-- William Faulkner
------------------------------
Date: 12 Nov 2001 10:57:25 GMT
From: <jari.aalto@poboxes.com> (Jari Aalto+mail.perl)
Subject: Emacs modules for Perl programming
Message-Id: <perl-faq/emacs-lisp-modules_1005562532@rtfm.mit.edu>
Archive-name: perl-faq/emacs-lisp-modules
Posting-Frequency: 2 times a month
URL: http://tiny-tools.sourceforge.net/
Maintainer: Jari Aalto <jari.aalto@poboxes.com>
Announcement: "What Emacs lisp modules can help with programming Perl"
Preface
Emacs is your friend if you have to do anything comcerning software
development: It offers plug-in modules, written in Emacs lisp
(elisp) language, that makes all your programmings wishes come
true. Please introduce yourself to Emacs and your programming era
will get a new light.
Where to find Emacs/XEmacs
o Unix:
http://www.gnu.org/software/emacs/emacs.html
http://www.xemacs.org/
o Windows
http://www.gnu.org/software/emacs/windows/ntemacs.html
ftp://ftp.xemacs.org/pub/xemacs/windows/setup.exe
o More Emacs resources at
http://tiny-tools.sourceforge.net/emacs-elisp.html
Emacs Perl Modules
Cperl -- Perl programming mode
.ftp://ftp.math.ohio-state.edu/pub/users/ilya/perl
.<olson@mcs.anl.gov> Bob Olson (started 1991)
.<ilya@math.ohio-state.edu> Ilya Zakharevich
Major mode for editing perl files. Forget the default
`perl-mode' that comes with Emacs, this is much better. Comes
standard in newest Emacs.
TinyPerl -- Perl related utilities
.http://tiny-tools.sourceforge.net/
If you ever wonder how to deal with Perl POD pages or how to find
documentation from all perl manpages, this package is for you.
Couple of keystrokes and all the documentaion is in your hands.
o Instant function help: See documentation of `shift', `pop'...
o Show Perl manual pages in *pod* buffer
o Load source code into Emacs, like Devel::DProf.pm
o Grep through all Perl manpages (.pod)
o Follow POD manpage references to next pod page with TinyUrl
o Coloured pod pages with `font-lock'
o Separate `tiperl-pod-view-mode' for jumping topics and pages
forward and backward in *pod* buffer.
o TinyUrl is used to jump to URLs (other pod pages, man pages etc)
mentioned in POD pages. (It's a general URL minor mode)
TinyIgrep -- Perl Code browsing and easy grepping
[TinyIgrep is included in the Kit]
To grep from all installed Perl modules, define database to
TinyIgrep. There is example file emacs-rc-tinyigrep.el that shows
how to set up datatbases for Perl5, Perl4 whatever you have
installed
TinyIgrep calls Igrep.el to run the find for you, You can adjust
recursive grep options, ignored case, add user grep options.
You can get `igrep.el' module from <kevinr@ihs.com>. Ask for copy.
Check also ftp://ftp.ihs.com/pub/kevinr/
TinyCompile -- Browsing grep results in Emacs *compile* buffer
TinyCompile is minor mode for *compile* buffer from where
you can collapse unwanted lines, shorten the file URLs
/asd/asd/asd/asd/ads/as/da/sd/as/as/asd/file1:NNN: MATCHED TEXT
/asd/asd/asd/asd/ads/as/da/sd/as/as/asd/file2:NNN: MATCHED TEXT
-->
cd /asd/asd/asd/asd/ads/as/da/sd/as/as/asd/
file1:NNN: MATCHED TEXT
file1:NNN: MATCHED TEXT
End
------------------------------
Date: Mon, 12 Nov 2001 08:31:15 GMT
From: Uri Guttman <uri@stemsystems.com>
Subject: Re: Exec stops execution of Perl script after having completed?????
Message-Id: <x7eln4l788.fsf@home.sysarch.com>
>>>>> "MV" == Martien Verbruggen <mgjv@tradingpost.com.au> writes:
>> so in general, rtfm always but especially when you think 2 perl
>> ops/funcs are similar to learn how they are different.
MV> As in the difference between y/// and tr///? or for and foreach?
MV> ;)
i was going to mention tr and y are among the few synonyms and i forgot
about for/foreach as i almost always use foreach loops.
and perldoc -f tr says:
=item tr///
The transliteration operator. Same as C<y///>. See L<perlop>.
so the FM does cover the synonym aspect. whereas exec/system have very
different docs. :)
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: Mon, 12 Nov 2001 11:56:24 +0100
From: "Robert" <robert_loui@yahoo.com>
Subject: Extracting different Input
Message-Id: <9so8kl$3ei$1@newstoo.ericsson.se>
Hi all
I am new in perl, i am having an input variable with different format, i
want to check its format and save it in another variable.
If the input has a normal string format like: my $input = "Name", i want to
save it in $stringInput,
Or if the input has a format like my $input = "j3.4.5" or an input like
$input = "j3.4" or an input like $input = "j3"
I want to save each string before "." in one variable like
$firstPart = "J3";
$secPart = "4";
$thirdPart = "5";
Thanks alot Robert
------------------------------
Date: Mon, 12 Nov 2001 13:15:18 GMT
From: Bart Lateur <bart.lateur@skynet.be>
Subject: Re: Extracting different Input
Message-Id: <8oivuto91qb3ouutqrgn7kr2jhonespaf2@4ax.com>
Robert wrote:
>If the input has a normal string format like: my $input = "Name", i want to
>save it in $stringInput,
>Or if the input has a format like my $input = "j3.4.5" or an input like
>$input = "j3.4" or an input like $input = "j3"
>I want to save each string before "." in one variable like
>
>$firstPart = "J3";
>$secPart = "4";
>$thirdPart = "5";
Hmm... this goes dangerously close towards sylmbolic references. Can't
you just use an array, and split()?
@parts = split /\./, $input;
with "Name", you get just one array item. With 'j3.4.5' you get 3: "j3",
"4", "5".
--
Bart.
------------------------------
Date: Mon, 12 Nov 2001 14:18:24 +0100
From: Eduardo Oliveros <eod_spam@yahoo.es>
To: Robert <robert_loui@yahoo.com>
Subject: Re: Extracting different Input
Message-Id: <3BEFCC20.F08C1DEE@yahoo.es>
A possible implementation:
#!/usr/bin/perl
my $cad="j1.2.3";
if($cad =~ /(j\d+)(?:\.(\d+)(?:\.(\d+)|$)|$)/i){
$firstPart = $1;
$secPart = $2;
$thirdPart = $3;
}else{
$input=$cad;
}
--edu
Robert wrote:
> Hi all
>
> I am new in perl, i am having an input variable with different format, i
> want to check its format and save it in another variable.
>
> If the input has a normal string format like: my $input = "Name", i want to
> save it in $stringInput,
> Or if the input has a format like my $input = "j3.4.5" or an input like
> $input = "j3.4" or an input like $input = "j3"
> I want to save each string before "." in one variable like
>
> $firstPart = "J3";
> $secPart = "4";
> $thirdPart = "5";
>
> Thanks alot Robert
------------------------------
Date: Mon, 12 Nov 2001 14:38:47 +0100
From: "Nils Thomas Vars" <ntv@email.com>
Subject: failed dependencies when installing a perl module(?)
Message-Id: <nhQH7.17152$Fr3.272192@news1.oke.nextra.no>
I tried installing an perl-MP3-info-0.91-2.i386.rpm package, but got the
following output:
"
error: failed dependencies:
perl(Symbol) is needed by perl-MP3-info-0.91-2
perl(overload) is needed by perl-MP3-info-0.91-2
perl(strict) is needed by perl-MP3-info-0.91-2
perl(vars) is needed by perl-MP3-info-0.91-2
"
first of all, WHAT are those? i tried searching with rpmfind, but found
nothing. I also browsed the www.perl.org site, but found nothing there
either.
I'm a little new at this, at least to programming, so any help would be
very....helpful i guess
------------------------------
Date: 12 Nov 2001 10:39:27 +0100
From: Andreas Str|m <andreass@raindog.uio.no>
Subject: Re: flat text database cgi
Message-Id: <ic3itcgcoq8.fsf@raindog.uio.no>
rumi_red@yahoo.com (rumi_red) writes:
> Hi!
>
> I'm looking for a sample script that illustrates how to make a flat
> text database cgi script.
>
> On a web page, I want a user to be able to enter the following
> information
>
> a) name
> b) date
> c) house
> d) color
>
> And on the same page, have a user be able to perform a query on the
> following fields as well.
I would strongly recommend using DB-files instead of simple text
files. This makes it much easier to read, write, search and update by
binding the file to a datastructure. You can do this with the tie
function.
This ties a DB-file to a hash:
tie %hash, 'DB_File', "$filename";
Now you can modify the hash as you normally would, and the changes
will be stored in the file.
If you need locking as well, you can use the Tie::DB_FileLock from CPAN.
--
Andreas
------------------------------
Date: Mon, 12 Nov 2001 12:06:17 +0100
From: Ton 't Lam <ton-t_lam@hp.com>
Subject: Having an issue database. How to do indexing in perl?
Message-Id: <3BEFAD29.CF6104B7@hp.com>
Hello,
I have written a long time ago an issue database. I can store ASCII
documents in it. Inserting a document is immediately indexed on the fly.
Retrieval of documents is done in seconds. Initially I wrote the stuff
in ksh, and eventually added some lex/yacc stuff for handling metadata.
Yes! I should have used perl in the first place. :-)
By now I have close to 4000 docs and performance becomes an issue.
I want to rewrite in perl and mySQL. Also to have a CGI.
But how to do the indexing? Each word of two or more characters
is indexed. I imagine I have -one- table containing all words. But how
to add the document numbers containg this word. This may vary from
one up to hunderds of references. E.g:-
table 'index' containig
word1 1|2|......|N
word2 5|83
word3 5
etc....
The documents have all kinds of sizes. Is there a convenient way to store
these in mySQL?
Finally, perhaps an issue DB is already available somewhere on the net.
Any pointer is greatly appreciated.
--
Best Regards,
-- Ton
------------------------------
Date: Mon, 12 Nov 2001 09:23:12 +0800
From: "blongk" <khirv@hotmail.com>
Subject: Re: need help with simple script
Message-Id: <3bef24ec_1@news.tm.net.my>
Thanks very much Eric. It works now. btw, can you explain more on what this
means;
"but you're stripping them off before trying to index into the hash". What
does index into the hash mean?
regards,
Blongk
"Eric Bohlman" <ebohlman@omsdev.com> wrote in message
news:9s7sc5$quj$1@bob.news.rcn.net...
> blongk <khirv@hotmail.com> wrote:
>
> > #!/usr/local/bin/perl -w
> > #This file extracts user ids and their respective genders from hypsex
file
> > that contains user ids and genders.
> > my $B = "hypsex";
> > my %allsex;
>
> > open (B, "< $B") || die ("can not open $B\n");
>
> You should include $! in your error message so that if you can't open the
> file, you'll know why.
>
> > my $id;
> > my $sex;
> > while ($id = <B>) {
> > $sex = <B>;
> > $allsex{$id} = $sex;
> > }
>
> Right now both the keys and values of %allsex have trailing newlines.
> Normally you'd want to chomp() both $id and $sex here before putting them
> into the hash.
>
> Better style would be to declare the two variables inside the loop rather
> than outside it:
>
> while (my $id = <B>) {
> my $sex = <B>;
> ...
> }
>
> No big deal here, but scoping variables as tightly as possible is a good
> habit to get into.
>
> > close (B);
>
> > foreach $id (keys %allsex) {
> > chomp($id);
>
> > print "$id $allsex{$id} \n";
>
> Here you get a warning about uninitialized values because the actual keys
> in the hash have trailing newlines, but you're stripping them off before
> trying to index into the hash, so none of them match.
>
> > }
>
> > Another thing, why is the id's are not ordered as in the hypsex file.?
>
> Because hash entries are stored in a seemingly random order (in reality,
> it's an order that makes them quick too look up rather than one that makes
> them look good).
>
------------------------------
Date: Mon, 12 Nov 2001 12:57:39 GMT
From: "Pujo C A" <adustipujo1@mediaone.net>
Subject: Re: Newbie Question
Message-Id: <7HPH7.19407$4W.186229@typhoon.mw.mediaone.net>
What is foo?
Why is foo?
I read that in several perl book and I don't know what it is.
Thanks,
ojup
------------------------------
Date: 12 Nov 2001 08:24:05 -0500
From: Tim Heaney <theaney@toadmail.toad.net>
Subject: Re: Newbie Question
Message-Id: <87y9lcm8ay.fsf@susie.watterson>
"Pujo C A" <adustipujo1@mediaone.net> writes:
> What is foo?
> Why is foo?
> I read that in several perl book and I don't know what it is.
There's an entry for foo in the jargon file
http://www.tuxedo.org/~esr/jargon/html/entry/foo.html
It's not limited to Perl.
I hope this helps,
Tim
------------------------------
Date: Mon, 12 Nov 2001 22:11:58 +1100
From: "Tintin" <tintin@snowy.calculus>
Subject: Re: Passing variables from Perl script to shell script
Message-Id: <3befae05_2@news.iprimus.com.au>
"Rashyid" <rra@excite.com> wrote in message
news:79c1319c.0110310203.536bb529@posting.google.com...
> Hi there all.. newbie here needs help
>
> ok this is what ive done
>
> #!/usr/perl5/bin/perl
>
> system (/home0/program2 abc);
>
>
> where program 2 is a unix script that only has the below
>
> print $1
>
> i get an error saying
> home0/program2:print:not found
>
> it should just print out abc, right?
>
> What am i doing wrong here?
Asking the same question that has already been answered previously.
------------------------------
Date: Mon, 12 Nov 2001 13:42:56 GMT
From: tadmc@augustmail.com
Subject: Posting Guidelines for comp.lang.perl.misc ($Revision: 1.2 $)
Message-Id: <AlQH7.725748$Lw3.45476805@news2.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 2114
***************************************