[29433] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 677 Volume: 11

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Tue Jul 24 06:09:55 2007

Date: Tue, 24 Jul 2007 03:09:06 -0700 (PDT)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)

Perl-Users Digest           Tue, 24 Jul 2007     Volume: 11 Number: 677

Today's topics:
    Re: @arts <bik.mido@tiscalinet.it>
    Re: @arts <bik.mido@tiscalinet.it>
    Re: @arts <bik.mido@tiscalinet.it>
        filehandle, read lines  roy.schultheiss@t-online.de
    Re: filehandle, read lines anno4000@radom.zrz.tu-berlin.de
    Re: filehandle, read lines (Jens Thoms Toerring)
        new CPAN modules on Tue Jul 24 2007 (Randal Schwartz)
        Posting Guidelines for comp.lang.perl.misc ($Revision:  tadmc@seesig.invalid
    Re: retrieving usenet messages III <zaxfuuq@invalid.net>
    Re: retrieving usenet messages III <zaxfuuq@invalid.net>
    Re: retrieving usenet messages III <bik.mido@tiscalinet.it>
    Re: retrieving usenet messages III <sbryce@scottbryce.com>
        Trapping for Dollar Signs  jerry@tr2.com
        Trapping for Dollar Signs  jerry@tr2.com
    Re: Trapping for Dollar Signs <1usa@llenroc.ude.invalid>
        Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)

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

Date: Tue, 24 Jul 2007 10:42:28 +0200
From: Michele Dondi <bik.mido@tiscalinet.it>
Subject: Re: @arts
Message-Id: <cndba3l04rvu02g82h1v182n8g8p5r55k0@4ax.com>

On Mon, 23 Jul 2007 17:07:40 -0700, "Vronans"
<vronans@nowheresville.spamwall> wrote:

>> Well, NO-body has ever complained in several years, and I can't
>> remember anybody considering my posts hard to read because of bad
>> netiquette. So I won't do what you suggest unless there's a compelling
>> reason to do so, e.g. precisely track who's saying what.
>
>It seems others are able to properly attribute their quotes and I've 
>seen not-so-regular people asked to do exactly as I've asked you (when 

Show me an instance where this happend.

>>>> Not hard to know recognize the last two lines as Merril's: how
>>>> strange that he recognizes having acted like an idiot in the first
>>>> place, before you poo^Hpped out of hammerspace to "defend" him...
>
>To whom belongs the above quote?

To me and you should know. All quotes in the previous post are either
mine of yours. To understand who's saying what it's enough to count
quote signs and apply a tiny bit of arithmetic mod 2, at the level of
a child...

>> So why didn't he feel the same himself and in some way apologized for
>> having acted like an idiot instead?
   ^^^^^^^^^^^^^^^^^^^^^^^^^^
   ^^^^^^^^^^^^^^^^^^^^^^^^^^

>Cite me an instance where he admits to being an idiot.
                                        ^^^^^^^^^^^^^^
                                        ^^^^^^^^^^^^^^

Funny, you insist so much on proper quoting, but then you probably
must have some reading problems, or like to omit details if it's to
your own advantage. I never wrote he admitted to be an idiot. He
didn't, he's not an idiot. I never wrote he is an idiot. I do not
think HE is an idiot. He admitted having acted like an idiot, which is
something that occasionally happens to quite about anybody. I think he
did act like an idiot. I think I am acting like an idiot, still
replying to your pointless provocations. I think you're an idiot and,
in your case, I'm more and more convinced you're actually an idiot.

On Sun, 22 Jul 2007 15:53:57 -0700, "Wade Ward" <zaxfuuq@invalid.net>
in <2J6dnRlDn_V7KD7bnZ2dnUVZ_v2unZ2d@comcast.com> wrote:

: Believe it or not, I didn't start this thread to look like an idiot, 
: although I seem to have achieved this.

WHAT DOES THIS MEAN?!?

>> Ok, please explain me what a special var is that is not a predefined
>> var, because then I don't know. The meaning of "predefined variable"
>> is well defined... that of "special variable"... I don't have the
>> slightest idea.
>
>Sigh. Why do you keep (intentionally?) dancing around the point? It's 
>what the OP seemed to -think- it was. Again, you refuse to try to see 
>things from HIS perspective, which is a common problem.

No, I saw things from HIS perspective. Your poor attempt at
distinguishing between a predefined var and a mythological var
notwithstand, it is clear that the OP meant the former, as he wrote:

: The first symbol I don't understand is @arts.  It looks like a special 
: variable to me, as I think $_ is as well.  I find no reference for it in my 

>Bring your head back above shoulder level and get to me. If you can't 
>understand that the OP saw it as possibly special from HIS 
>point-of-view, then please quit while you're ahead because nothing 
>useful is being added to this thread. 

In fact, nothing useful is being added to this thread since you
poo^Hpped in: get off your OWN high Zorro's horse and face reality -
the person you're so heartedly trying to "defend" never asked you to
do so, never felt like he needed that, is perfectly satisfied with the
group, is bringing on peaceful discussions with us (I just replied to
two posts of his), never felt abused, insulted, being called an idiot
and so on: it's just YOU, YOU, YOU.

Please at least wait someone who will rant in the first place, then
join him or her. To me, you're just looking ridiculous.


Michele
-- 
{$_=pack'B8'x25,unpack'A8'x32,$a^=sub{pop^pop}->(map substr
(($a||=join'',map--$|x$_,(unpack'w',unpack'u','G^<R<Y]*YB='
 .'KYU;*EVH[.FHF2W+#"\Z*5TI/ER<Z`S(G.DZZ9OX0Z')=~/./g)x2,$_,
256),7,249);s/[^\w,]/ /g;$ \=/^J/?$/:"\r";print,redo}#JAPH,


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

Date: Tue, 24 Jul 2007 11:04:43 +0200
From: Michele Dondi <bik.mido@tiscalinet.it>
Subject: Re: @arts
Message-Id: <48fba3tpv9prhloqtb4i96q8eac23d1lc1@4ax.com>

On Mon, 23 Jul 2007 23:52:00 -0000, Wade Ward <zaxfuuq@gmail.com>
wrote:

>I can't connect to comcast now, so I'm posting at the library through
>the google portal.  I hope that this doesn't change my identity in a
>distracting way.  Here is the script in question:

No, it doesn't.

>  I was trying to pick apart the control mechanism to ascertain
>details from the above.  Are these statements equivalent:
> for (reverse $first..$last) {
> for (my $i = $first; $i <= $last; $i--){

No, they aren't. Since $first < $last, then the second one would have
to be

  for (my $i = $last; $i >= $first; $i--){

>?  My reference shows only the three part 'for' syntax.  If I leave

If that is true, which I doubt, then you may happily throw your book
in the trash bin. Actually Perl-style for loops are generally
preferred to C-style ones in most situations: granted, the latter ones
also have their usefulness. But it happens very rarely that you have
to use them. As you can see, the syntax in the first case is much more
terse than in the second one and FWIM (not much, as usual, but fine to
know) ISTR that the corresponding loop is much more performant.

Just think that in Perl 6 the two loops which are in fact two
completely different beasts, have been disambiguated with the former
still being called C<for> and the latter C<loop>, which takes one more
char in view of huffmanization: expected to be used on a much more
sparse basis a priori.

>out the reverse, I get no output at all.

Well, that's obvious: the loop exits early if $time < $since, which is
likely to happen on $first. This is why I started from $last instead.

  perldoc -f reverse

>It appears that the only thing going to STDOUT is @arts.  What

I'm not really sure what you mean. The whole USENET article, if it is
downloaded, is printed to STDOUT.

>dimensions does @arts have?  I don't think the compiler can know in

"Dimension"? What do you mean? It is a one dimensional array
containing message ids.

>advance.  I would think that one dimension of @arts would have to be
>the difference between $first and $last.  There's a lot more

No, it starts empty and within the loop it is filled up with message
ids starting from the smallest one that is within the time constraint
up to the biggest one on the server, which is still $last. Of course I
may have used List::Util::first to get the real first value I was
interested in, but I dind't see a particular need to do so.

>wiggleroom in perl's syntax than say, fortran, where this might be the

I don't know what wiggleroom stands for, but I think you're right.
TMTOWTDI.

>Am I correct that each entry of @arts contains an entire usenet
>message?

No, completely wrong.

  print "@arts\n";  # to check.

You still seem not to have read very carefully Net::NNTP's docs,
because there it is clearly explained what the methods return and
accept.


Michele
-- 
{$_=pack'B8'x25,unpack'A8'x32,$a^=sub{pop^pop}->(map substr
(($a||=join'',map--$|x$_,(unpack'w',unpack'u','G^<R<Y]*YB='
 .'KYU;*EVH[.FHF2W+#"\Z*5TI/ER<Z`S(G.DZZ9OX0Z')=~/./g)x2,$_,
256),7,249);s/[^\w,]/ /g;$ \=/^J/?$/:"\r";print,redo}#JAPH,


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

Date: Tue, 24 Jul 2007 11:06:33 +0200
From: Michele Dondi <bik.mido@tiscalinet.it>
Subject: Re: @arts
Message-Id: <g6gba3poi7h9en4unhp8rbghdajnuj4gj6@4ax.com>

On Tue, 24 Jul 2007 01:35:16 GMT, "Mumia W."
<paduille.4061.mumia.w+nospam@earthlink.net> wrote:

>> It appears that the only thing going to STDOUT is @arts.  What
>> dimensions does @arts have?  [...]
>
>I suggest you learn to walk before you run. You're nowhere near 
>proficient enough with Perl to consider writing an NNTP client.

Merrill, I know that this may seem offensive to you, but I
wholeheartedly second this suggestion. It's just a matter of say a
month or so: get familiar with basic Perl syntax and semantics first.
Then life will be easier.


Michele
-- 
{$_=pack'B8'x25,unpack'A8'x32,$a^=sub{pop^pop}->(map substr
(($a||=join'',map--$|x$_,(unpack'w',unpack'u','G^<R<Y]*YB='
 .'KYU;*EVH[.FHF2W+#"\Z*5TI/ER<Z`S(G.DZZ9OX0Z')=~/./g)x2,$_,
256),7,249);s/[^\w,]/ /g;$ \=/^J/?$/:"\r";print,redo}#JAPH,


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

Date: Tue, 24 Jul 2007 02:09:55 -0700
From:  roy.schultheiss@t-online.de
Subject: filehandle, read lines
Message-Id: <1185268195.932516.191120@g4g2000hsf.googlegroups.com>

Hello all,

I am looking for a way to open a file in Perl and start reading e.g.
on line 1,000,000.
One possibility is:

open (FILE, "...");

# move handle to line 1,000,000
for ($i=0; $i<1000000;$i++)
    { $data = <FILE>; }

# something magic ...

close (FILE);

This is not very efficiently. So, is there another "better" way to
move the Position of the handle through the lines of a file?

Thank you very much,

roy



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

Date: 24 Jul 2007 09:45:55 GMT
From: anno4000@radom.zrz.tu-berlin.de
Subject: Re: filehandle, read lines
Message-Id: <5gm02jF3ho0t8U1@mid.dfncis.de>

 <roy.schultheiss@t-online.de> wrote in comp.lang.perl.misc:
> Hello all,
> 
> I am looking for a way to open a file in Perl and start reading e.g.
> on line 1,000,000.
> One possibility is:
> 
> open (FILE, "...");
> 
> # move handle to line 1,000,000
> for ($i=0; $i<1000000;$i++)
>     { $data = <FILE>; }
> 
> # something magic ...
> 
> close (FILE);
> 
> This is not very efficiently. So, is there another "better" way to
> move the Position of the handle through the lines of a file?

No, there isn't.  It's a file full of bytes, the n-th line starts after
the n-1-th occurence of a line feed.  So you must inspect all bytes
before the line in question.

There are modules that hide the ugliness.  Tie::File represents the
file as an array of lines, so you can access the 1_000_000-th line
"directly" as $tied_array[ 1_000_000].  Internally it, too, must
check all preceding lines.

Anno


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

Date: 24 Jul 2007 10:00:20 GMT
From: jt@toerring.de (Jens Thoms Toerring)
Subject: Re: filehandle, read lines
Message-Id: <5gm0tkF3g43ucU1@mid.uni-berlin.de>

roy.schultheiss@t-online.de wrote:
> I am looking for a way to open a file in Perl and start reading e.g.
> on line 1,000,000.
> One possibility is:

> open (FILE, "...");

> # move handle to line 1,000,000
> for ($i=0; $i<1000000;$i++)
>     { $data = <FILE>; }

> # something magic ...

> close (FILE);

> This is not very efficiently. So, is there another "better" way to
> move the Position of the handle through the lines of a file?

Unless you have some extra knowledge about the file (e.g. that
all lines have the same length) then there can't be any solution
to that problem that is not more or less equivalent to the one
you already have given above. It simply boils down to finding
the 1,000,000th occurrence of "\n" (which can be, depending on
the system you're on, a single character or a group of charac-
ters) and position the internally maintained "pointer" into the
file just behind that. This, in turn, requires that you read in
everything from the file up to that place, with the only excep-
tion for the case that you have some prior knowledge where this
position exactly is, in which case you can use the seek() func-
tion (or sysseek() if you intend to use sysread() or syswrite())
to "jump" to that position directly.

You may be able to speed things up a bit by using system specific
functions (e.g. something like mmap) that may allows you to map a
file to memory, which you then can search for the nth "\n" perhaps
a bit faster than when using the normal open() and <>.

                                 Regards, Jens
-- 
  \   Jens Thoms Toerring  ___      jt@toerring.de
   \__________________________      http://toerring.de


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

Date: Tue, 24 Jul 2007 04:42:13 GMT
From: merlyn@stonehenge.com (Randal Schwartz)
Subject: new CPAN modules on Tue Jul 24 2007
Message-Id: <JLo2ED.52M@zorch.sf-bay.org>

The following modules have recently been added to or updated in the
Comprehensive Perl Archive Network (CPAN).  You can install them using the
instructions in the 'perlmodinstall' page included with your Perl
distribution.

Acme-MetaSyntactic-nethack-v1.0.0
http://search.cpan.org/~elliotjs/Acme-MetaSyntactic-nethack-v1.0.0/
The largest time waster in the world of *nix. 
----
Acme-MetaSyntactic-vim-v1.0.0
http://search.cpan.org/~elliotjs/Acme-MetaSyntactic-vim-v1.0.0/
The Vim theme 
----
Bundle-Compress-Zlib-Lite-0.01
http://search.cpan.org/~ski/Bundle-Compress-Zlib-Lite-0.01/
installs Compress::Zlib 
----
Catalyst-View-XSLT-0.04
http://search.cpan.org/~marting/Catalyst-View-XSLT-0.04/
XSLT View Class 
----
Cisco-Version-0.02
http://search.cpan.org/~mwallraf/Cisco-Version-0.02/
Cisco 'show version' parser 
----
DBIx-Class-InflateColumn-URI-0.01001
http://search.cpan.org/~kolibrie/DBIx-Class-InflateColumn-URI-0.01001/
Auto-create URI objects from columns 
----
DBIx-Class-InflateColumn-URI-0.01002
http://search.cpan.org/~kolibrie/DBIx-Class-InflateColumn-URI-0.01002/
Auto-create URI objects from columns 
----
Email-Abstract-2.133_02
http://search.cpan.org/~rjbs/Email-Abstract-2.133_02/
unified interface to mail representations 
----
GD-Graph-Cartesian-0.01
http://search.cpan.org/~mrdvt/GD-Graph-Cartesian-0.01/
Make cartesian graph using GD package 
----
Graph-MaxFlow-0.02
http://search.cpan.org/~waltman/Graph-MaxFlow-0.02/
compute maximum flow between 2 vertices in a graph 
----
HTML-Menu-TreeView-0.6.9
http://search.cpan.org/~lze/HTML-Menu-TreeView-0.6.9/
----
HTTP-Daemon-SSL-1.03_01
http://search.cpan.org/~aufflick/HTTP-Daemon-SSL-1.03_01/
a simple http server class with SSL support 
----
HTTP-Server-Simple-0.28_01
http://search.cpan.org/~jesse/HTTP-Server-Simple-0.28_01/
Lightweight HTTP server 
----
HTTP-Server-Simple-Static-0.06
http://search.cpan.org/~sjquinney/HTTP-Server-Simple-Static-0.06/
Serve static files with HTTP::Server::Simple 
----
JSON-XS-1.42
http://search.cpan.org/~mlehmann/JSON-XS-1.42/
JSON serialising/deserialising, done correctly and fast 
----
Module-MultiConf-0.0200
http://search.cpan.org/~oliver/Module-MultiConf-0.0200/
Configure and validate your app modules in one go 
----
Module-MultiConf-0.0201
http://search.cpan.org/~oliver/Module-MultiConf-0.0201/
Configure and validate your app modules in one go 
----
OpenOffice-OOBuilder-0.09
http://search.cpan.org/~maygill/OpenOffice-OOBuilder-0.09/
Perl OO interface for creating OpenOffice documents. 
----
PBS-Client-0.04
http://search.cpan.org/~kwmak/PBS-Client-0.04/
Job submission interface to PBS (Portable Batch System) 
----
PDFREP-2.20
http://search.cpan.org/~twibbler/PDFREP-2.20/
----
POE-0.9999
http://search.cpan.org/~rcaputo/POE-0.9999/
portable multitasking and networking framework for Perl 
----
RPC-Serialized-0.0600
http://search.cpan.org/~oliver/RPC-Serialized-0.0600/
Subroutine calls over the network using common serialization 
----
RPC-Serialized-0.0601
http://search.cpan.org/~oliver/RPC-Serialized-0.0601/
Subroutine calls over the network using common serialization 
----
String-EscapeCage-0.02
http://search.cpan.org/~msulliva/String-EscapeCage-0.02/
Cage and escape strings to prevent injection attacks 
----
String-Truncate-0.102
http://search.cpan.org/~rjbs/String-Truncate-0.102/
a module for when strings are too long to be displayed in... 
----
Text-CSV_XS-0.31
http://search.cpan.org/~hmbrand/Text-CSV_XS-0.31/
comma-separated values manipulation routines 
----
Text-Templet-2.8
http://search.cpan.org/~dpetrov/Text-Templet-2.8/
template processor built using Perl's eval() 
----
Text-Templet-2.8a
http://search.cpan.org/~dpetrov/Text-Templet-2.8a/
template processor built using Perl's eval() 
----
URI-ParseSearchString-More-0.01
http://search.cpan.org/~oalders/URI-ParseSearchString-More-0.01/
Extract search strings from more referrers. 
----
reslog-3.12
http://search.cpan.org/~imacat/reslog-3.12/
Reverse-resolve IP in Apache log files 


If you're an author of one of these modules, please submit a detailed
announcement to comp.lang.perl.announce, and we'll pass it along.

This message was generated by a Perl program described in my Linux
Magazine column, which can be found on-line (along with more than
200 other freely available past column articles) at
  http://www.stonehenge.com/merlyn/LinuxMag/col82.html

print "Just another Perl hacker," # the original

--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<merlyn@stonehenge.com> <URL:http://www.stonehenge.com/merlyn/>
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!


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

Date: Tue, 24 Jul 2007 07:11:03 GMT
From: tadmc@seesig.invalid
Subject: Posting Guidelines for comp.lang.perl.misc ($Revision: 1.8 $)
Message-Id: <bChpi.29873$C96.10297@newssvr23.news.prodigy.net>

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.8 $)
    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.

    The article at:

        http://www.catb.org/~esr/faqs/smart-questions.html

    describes how to get answers from technical people in general.

    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://www.rehabitation.com/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":

       Do not use these guidelines as a "license to flame" or other
       meanness. It is possible that a poster is unaware of things
       discussed here.  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" as
       they're used in technical conversation (such as you will
       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 unlikely that you will benefit much from this group.
       We're not bossing you around; we're making the point without
       lots 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 expected in all newsgroups. Lurking means
        to monitor a newsgroup for a period to become familiar with local
        customs. Each newsgroup has specific customs and rituals. Knowing
        these before you participate will help 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.cpan.org/authors/id/D/DM/DMR/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* each section of quoted text to
        which they relate. Unappreciated followup styles are referred to as
        "top-posting", "Jeopardy" (because the answer comes before the
        question), or "TOFU" (Text Over, Fullquote Under).

        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://web.presby.edu/~nnqadmin/nnq/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 and many others on the comp.lang.perl.misc newsgroup.

-- 
Tad McClellan
email: perl -le "print scalar reverse qq/moc.noitatibaher\100cmdat/"


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

Date: Mon, 23 Jul 2007 14:46:50 -0700
From: "merl the perl" <zaxfuuq@invalid.net>
Subject: Re: retrieving usenet messages III
Message-Id: <5M-dncquS6P8PTjbnZ2dnUVZ_vShnZ2d@comcast.com>


"Michele Dondi" <bik.mido@tiscalinet.it> wrote in message 
news:7p16a3pjsjbdab598msgd50hp1rcdjmkcd@4ax.com...
> On Sat, 21 Jul 2007 18:55:33 -0700, "merl the perl"
> <zaxfuuq@invalid.net> wrote:
>
>>> Mine doesn't use newnews() either. Whether you use my simple minded
>>I think you want "simplistic" or simply "simple."  Simple-minded is
>>pejorative.
>
> If it is, then it's not misplaced.
I beg to differ.

>>That's the point.  Perl's a little bit of a platypus on windows.  With
>>Solaris, I'll get C99, Fortran2003, and perl from the get-go.  I'm not
>>moving forward very quickly with the install because I've never run 2 OS's
>>on the same machine.
>
> Not really: it's true that unices tend to come complete of quite a lot
> of programming languages out of the box. But when I had a new portable
> pc with XP preinstalled, the first thing I did was going to AS's,
> download the latest AP, and TADAA: I was done! Previously on my home
> PC I had had for years a vastly obsolete W98 installation and a CRUX
> Linux one, also *happily* using AP on the former, and the distro's
> perl on the latter.
I'm not sure where you are in Europe, but this response, I believe, shows a 
Europe vs. America thing.  I think we were trying to get away from the 
shadow of Mount Rainier whereas Europeans both east and west were 
gravitating toward it.  How much frustration does one put up with from an 
OS?  When it's other-worldly and exotic, I think the theshold is higher.
--
merl




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

Date: Mon, 23 Jul 2007 14:48:14 -0700
From: "merl the perl" <zaxfuuq@invalid.net>
Subject: Re: retrieving usenet messages III
Message-Id: <keKdnVYg5P0rPTjbnZ2dnUVZ_uygnZ2d@comcast.com>


"Michele Dondi" <bik.mido@tiscalinet.it> wrote in message 
news:ne26a35l2e68lgl43lcpe5h5ihq06v1pda@4ax.com...
> On Sat, 21 Jul 2007 19:04:53 -0700, "merl the perl"
> <zaxfuuq@invalid.net> wrote:
>
>>> : That was actually one of the reasons why I mentioned:
>>> :   http://www.xs4all.nl/~rvtol/perl/xover_clpm.pl
>>That's a good reference for me.  There's still a lot of the syntax I don't
>>get but this is more immdeiate than the other program.  Thanks.
>
> It is with all evidence more well thought and more thoroughly
> developed than some of the alternatives shown here. There is still
> room for improvement: for example I see that authentication info is
> simply commented out. One may want to issue the suitable method if
> both relevant variables are defined, for example: this is left as an
> exercise to you. Or you may want to pass parameters and options from
> the command line... and so on.
Thx.  OP going silent.
--
merl 




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

Date: Tue, 24 Jul 2007 10:20:11 +0200
From: Michele Dondi <bik.mido@tiscalinet.it>
Subject: Re: retrieving usenet messages III
Message-Id: <pscba3p8da206naan8qofmm8v80mrla2sa@4ax.com>

On Mon, 23 Jul 2007 14:46:50 -0700, "merl the perl"
<zaxfuuq@invalid.net> wrote:

>> If it is, then it's not misplaced.
>I beg to differ.

Why so? My script was concocted in a few minutes with a prior
knowledge of the subject on my part being more or less null. Dr.
Ruud's is a more thorough attempt by a more knowledgeable programmer,
with much more thought put in it. Thus mine is not false modesty nor
low self-esteem: it's a well placed bit of modesty.

>I'm not sure where you are in Europe, but this response, I believe, shows a 

ATM I'm PRECISELY here: <http://tinyurl.com/3y38gr>

>Europe vs. America thing.  I think we were trying to get away from the 
>shadow of Mount Rainier whereas Europeans both east and west were 
>gravitating toward it.  How much frustration does one put up with from an 

What is Mount Rainer, to begin with?

>OS?  When it's other-worldly and exotic, I think the theshold is higher.

I'm not really sure about what you mean, but at

http://use.perl.org/comments.pl?sid=36086&cid=56128

I briefly explain my current situation with OSen.


Michele
-- 
{$_=pack'B8'x25,unpack'A8'x32,$a^=sub{pop^pop}->(map substr
(($a||=join'',map--$|x$_,(unpack'w',unpack'u','G^<R<Y]*YB='
 .'KYU;*EVH[.FHF2W+#"\Z*5TI/ER<Z`S(G.DZZ9OX0Z')=~/./g)x2,$_,
256),7,249);s/[^\w,]/ /g;$ \=/^J/?$/:"\r";print,redo}#JAPH,


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

Date: Tue, 24 Jul 2007 03:00:50 -0600
From: Scott Bryce <sbryce@scottbryce.com>
Subject: Re: retrieving usenet messages III
Message-Id: <veSdnTI9ELdcIjjbnZ2dnUVZ_gKdnZ2d@comcast.com>

Michele Dondi wrote:

> What is Mount Rainer, to begin with?

One of the higher peaks in the US. It is near Tacoma, Washington. In 
this context I think the significance is that it is about an hour's 
drive south of Redmond.


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

Date: Mon, 23 Jul 2007 20:55:08 -0700
From:  jerry@tr2.com
Subject: Trapping for Dollar Signs
Message-Id: <1185249308.908311.197360@d30g2000prg.googlegroups.com>

Hello,

    I'm writing a perl script that reads a database and produces
printable output.
I sluffed the "printing" part of things off to LaTeX.  So the script
produces
TeX output.  And TeX takes care of making things pretty.

    TeX has certain characters that it does NOT like to see in the
plaintext.
# $ % & ~ _ ^ \ { }  to be exact.  But it will tolerate them if
they're escaped with \.

Some of these are pretty special to Perl too.  Especially in regex's.

Things like $string =~  s/\$/\\\$/g;  are just not working out.
Whatever I try,
I either get "$" in the output or "\\$", never just "\$".   Wait, I
thought of
something - I'll just write a little C program to do it :).

   - O Stop me before I C again .....

                                 - Jerry Kaidor



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

Date: Mon, 23 Jul 2007 20:57:20 -0700
From:  jerry@tr2.com
Subject: Trapping for Dollar Signs
Message-Id: <1185249440.252141.128180@i38g2000prf.googlegroups.com>

Hello,

    I'm writing a perl script that reads a database and produces
printable output.
I sluffed the "printing" part of things off to LaTeX.  So the script
produces
TeX output.  And TeX takes care of making things pretty.

    TeX has certain characters that it does NOT like to see in the
plaintext.
# $ % & ~ _ ^ \ { }  to be exact.  But it will tolerate them if
they're escaped with \.

Some of these are pretty special to Perl too.  Especially in regex's.

Things like $string =~  s/\$/\\\$/g;  are just not working out.
Whatever I try,
I either get "$" in the output or "\\$", never just "\$".   Wait, I
thought of
something - I'll just write a little C program to do it :).

   - O Stop me before I C again .....

                                 - Jerry Kaidor



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

Date: Tue, 24 Jul 2007 04:30:38 GMT
From: "A. Sinan Unur" <1usa@llenroc.ude.invalid>
Subject: Re: Trapping for Dollar Signs
Message-Id: <Xns99775361D803asu1cornelledu@127.0.0.1>

jerry@tr2.com wrote in news:1185249308.908311.197360
@d30g2000prg.googlegroups.com:

> 
> Things like $string =~  s/\$/\\\$/g;  are just not working out.
> Whatever I try,
> I either get "$" in the output or "\\$", never just "\$".   Wait, I
> thought of
> something - I'll just write a little C program to do it :).
> 


#!/usr/bin/perl

use strict;
use warnings;

my $s = 'Price $10.00';

print "$s\n";

$s =~ s'\$'\$'g;

print "$s\n";


__END__

C:\Temp> t.pl
Price $10.00
Price \$10.00

-- 
-- 
A. Sinan Unur <1usa@llenroc.ude.invalid>
(remove .invalid and reverse each component for email address)

comp.lang.perl.misc guidelines on the WWW:
http://augustmail.com/~tadmc/clpmisc/clpmisc_guidelines.html



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

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.  

NOTE: due to the current flood of worm email banging on ruby, the smtp
server on ruby has been shut off until further notice. 

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 V11 Issue 677
**************************************


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