[28389] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 9753 Volume: 10

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Fri Sep 22 06:05:53 2006

Date: Fri, 22 Sep 2006 03:05: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           Fri, 22 Sep 2006     Volume: 10 Number: 9753

Today's topics:
    Re: Best practices? Organizing CGI code and modules? <robb@acm.org>
    Re: Best practices? Organizing CGI code and modules? <hjp-usenet2@hjp.at>
    Re: explaining how memory works with tie()ed hashs <jgibson@mail.arc.nasa.gov>
    Re: extracting inner key from a hash of hashes <tadmc@augustmail.com>
    Re: extracting inner key from a hash of hashes <tadmc@augustmail.com>
    Re: Learning perl - for experienced programmers axel@white-eagle.invalid.uk
    Re: Learning perl - for experienced programmers axel@white-eagle.invalid.uk
    Re: Learning perl - for experienced programmers <jwkenne@attglobal.net>
        new CPAN modules on Fri Sep 22 2006 (Randal Schwartz)
        Posting Guidelines for comp.lang.perl.misc ($Revision:  tadmc@augustmail.com
    Re: Russel Quong's "Perl in 20 pages" <john@castleamber.com>
    Re: Russel Quong's "Perl in 20 pages" <jgibson@mail.arc.nasa.gov>
    Re: Russel Quong's "Perl in 20 pages" <tadmc@augustmail.com>
    Re: Russel Quong's "Perl in 20 pages" <john@castleamber.com>
    Re: Russel Quong's "Perl in 20 pages" <bik.mido@tiscalinet.it>
    Re: sort with Perl .. anno4000@radom.zrz.tu-berlin.de
        Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)

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

Date: 21 Sep 2006 16:06:11 -0700
From: "robb@acm.org" <robb@acm.org>
Subject: Re: Best practices? Organizing CGI code and modules?
Message-Id: <1158879971.716950.285320@i3g2000cwc.googlegroups.com>

Thanks for the replies, everyone.  Lots of good advice here.



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

Date: Fri, 22 Sep 2006 09:50:25 +0200
From: "Peter J. Holzer" <hjp-usenet2@hjp.at>
Subject: Re: Best practices? Organizing CGI code and modules?
Message-Id: <slrneh75e1.40h.hjp-usenet2@yoyo.hjp.at>

On 2006-09-20 18:07, robb@acm.org <robb@acm.org> wrote:
> I've taken over management of a website that has absolute chaos in the
> organization of the CGI directory (/cgi-bin).  There are ~600 files and
> directories here, no user-built modules, and perl files
> indiscriminately named .pl, .cgi, etc.

This hasn't got anything to do with perl, but ...
I always hated the cgi-bin directory, as it makes a rather irrelevant
distinction between static and dynamic content. If I have two
applications app1 (which consists of foo.cgi, bar.html and baz.jpg) and
app2 (which consists of waldo.cgi, fubar.html and fred.png) I find it a
lot clearer to organize them as

/
    app1/
	foo.cgi
	bar.html
	baz.jpg
    app2/
	waldo.cgi
	fubar.html
	fred.png

than 

/
    docs/
	bar.html
	fubar.html
    cgi-bin/
	foo.cgi
	waldo.cgi
    images/
	baz.jpg
	fred.png

If you use MultiViews with Apache, you can even hide the distinction
completely by omitting the extension in the URL: So if the user accesses 
/app1/foo, /app1/foo.cgi will be invoked, and if he accesses /app1/bar,
/app1/bar.html will be invoked. If I later decide that bar needs to
generated dynamically, I can simply add a /app1/bar.cgi and remove the
/app1/bar.html. The user will still access the same URL, but now a CGI
script will be invoked.

As for the organisation of the code, I agree with Uri: Put as much as
possible into modules which can be installed anywhere where perl can
find them and make the CGI scripts only thin wrappers.

	hp

-- 
   _  | Peter J. Holzer    | > Wieso sollte man etwas erfinden was nicht
|_|_) | Sysadmin WSR       | > ist?
| |   | hjp@hjp.at         | Was sonst wäre der Sinn des Erfindens?
__/   | http://www.hjp.at/ |	-- P. Einstein u. V. Gringmuth in desd


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

Date: Thu, 21 Sep 2006 16:45:43 -0700
From: Jim Gibson <jgibson@mail.arc.nasa.gov>
Subject: Re: explaining how memory works with tie()ed hashs
Message-Id: <210920061645434601%jgibson@mail.arc.nasa.gov>

In article <1158869704.987127.169510@m73g2000cwd.googlegroups.com>,
botfood <botfood@yahoo.com> wrote:

> J. Gleixner wrote:
> > botfood wrote:
> >
> > > so.... the question changes to:
> > >
> > > how can I estimate the memory required by perl for a m// or s//
> > > operation on a string that is about 20k 'words' consisting of 20 digits
> > > each separated by a single space.
> >
> > Why estimate it? Simply run it from the command line, or some other
> > method, maybe adding a fairly long sleep, after the point you want to
> > measure, and watch the memory usage using top, ps, etc.
> ----------------
> the machine running the script is a webserver on a remote host... they
> dont give access to any place I can watch memory.

That makes it tough. However, you can do yourself a favor by setting up
a local Perl installation and running your tests on it. My guess is
that the regular expression engine doesn't vary very much from platform
to platform.

-- 
Jim Gibson

 Posted Via Usenet.com Premium Usenet Newsgroup Services
----------------------------------------------------------
    ** SPEED ** RETENTION ** COMPLETION ** ANONYMITY **
----------------------------------------------------------        
                http://www.usenet.com


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

Date: Thu, 21 Sep 2006 18:05:36 -0500
From: Tad McClellan <tadmc@augustmail.com>
Subject: Re: extracting inner key from a hash of hashes
Message-Id: <slrneh66m0.la7.tadmc@magna.augustmail.com>

Glenn Jackman <glennj@ncf.ca> wrote:

> You want to know about dereferencing and the keys function.
> 
>     my @mac_address1_destinations = keys %{ $hash{mac-address1} };
                                                       ^
                                                       ^

And you'll also want to know about quoting hash keys.  :-)


-- 
    Tad McClellan                          SGML consulting
    tadmc@augustmail.com                   Perl programming
    Fort Worth, Texas


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

Date: Thu, 21 Sep 2006 18:11:24 -0500
From: Tad McClellan <tadmc@augustmail.com>
Subject: Re: extracting inner key from a hash of hashes
Message-Id: <slrneh670s.la7.tadmc@magna.augustmail.com>

doni <doni.sekar@gmail.com> wrote:

>         if (($value[0] =~ m/^\d+/) && ($value[2] eq yes))


You should always enable warnings when developing Perl code.


> Thanks,


Yeah, right.


> Paul Lalli wrote:
>> doni wrote:
>> > Paul,
>>
>> Bzzt.  That's three.  You're out.  You were asked repeatedly to stop
>> top posting.  You don't care about this simple request, I don't care
>> about helping you.  Bye.


<aol>me too!</aol>


-- 
    Tad McClellan                          SGML consulting
    tadmc@augustmail.com                   Perl programming
    Fort Worth, Texas


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

Date: Fri, 22 Sep 2006 02:13:39 GMT
From: axel@white-eagle.invalid.uk
Subject: Re: Learning perl - for experienced programmers
Message-Id: <nFHQg.104$zf3.53@fed1read03>

anno4000@radom.zrz.tu-berlin.de wrote:
> John W. Kennedy <jwkenne@attglobal.net> wrote in comp.lang.perl.misc:
>> anno4000@radom.zrz.tu-berlin.de wrote:
>> > For many years, COBOL was the *only* tool for certain IO-heavy and
>> > table-oriented tasks that come up in financial and administrative
>> > computing.  At least it was the only COmmon Business Oriented
>> > Language and claimed to be specially fit for these purposes.  People
>> > believed it and developed large code bases in COBOL.  In reality,
>> > the FORTRAN of the day would have worked as well, if not better.
 
>> No, it wouldn't have, lacking, as it did (just off the top of my head):
>>     decorated numeric output,
>>     record I/O,
>>     fixed-point arithmetic, and
>>     even the most primitive string manipulation.
 
> Okay, the lack of records (what is record I/O?) is serious.  Other

Record I/O is basically conducting I/O by reading and writing files
based on 'records'... i.e. you can't just print a line to a file, you
need to write a whole record in a fixed format of some type.

I am probably wrong, but I believe even today COBOL programmers think
solely in terms of records and find it difficult to imagine free form
data.

I certainly remember many years ago when I first used a computer
at school (translation for Americans... that is the thing before
university :) after delving beyond BASIC, I went further and
experimented with COBOL and Algol 60... as a consequence I found
that the OS I was using (ICL 1900 series, probably unknown outside
the UK) had very specific means of reading and writing to files.

There were things like TR and TP (Tape Reader and Printer), CR and
CP (ditto for 80 character width punched cards) and so on...  even
when reading and writing to files, these had to be to be used (rather
like peripheral drivers today). There was also some disc stuff...
and funnily enough even specific writers for Magnetic Drums. I
really wish I had kept the manuals from that time that I acquired
as they really are museum pieces now... especially the pages regarding
how to programme using proper money such as pounds, shillings, and
pence.

Axel

 


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

Date: Fri, 22 Sep 2006 02:46:01 GMT
From: axel@white-eagle.invalid.uk
Subject: Re: Learning perl - for experienced programmers
Message-Id: <J7IQg.105$zf3.6@fed1read03>

addinall <addinall@addinall.org> wrote:
> John Bokma wrote:

>> - inconsistent function naming
>> - huge number of functions in the default name space.

>> The latter is something Perl suffers from as well IMO, but not as bad as
>> with PHP. At least the names are not a mess like with PHP.
 
> You just took someone to task for saying that the Perl
> object model was a 'mess' compared to Java!  Shame
> on you for using the same argument!

It's not quite the same.  From what I remember of the last time of
seeting up PHP, it was a case of having to decide what was wanted then
and there (as in access to whatever DBS/LDAP/&c) rather than being able
add on modules as needed.  Hence stuff got there and if it was wanted
later, basically you are buggered.
 
> Personally, I think Java sucks for almost anything,
> and would much rather code an application in Perl.

Makes sense. For many, many applications.  If I were greedy and
wanted to spin out a contract, it would be lovely to code in Java
as it takes a lot longer to do some very simple things... not in
the conception or the algorithm... just actually coding it all.
But I am not greedy and more importantly I am easily bored.

> However, PHP does screens and forms nice and fast,

Yes... for reading stuff from a DBS.  Writing to one is a nightmare
as one never actually knows how a system is set up so it virtually
becomes impossible to write generic secure  code.  So I don't.

Unless offered a fistful of dollars to choose between the good,
the bad and the ugly.

Axel




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

Date: Fri, 22 Sep 2006 00:19:34 -0400
From: "John W. Kennedy" <jwkenne@attglobal.net>
Subject: Re: Learning perl - for experienced programmers
Message-Id: <xvJQg.2408$p53.2373@newsfe11.lga>

axel@white-eagle.invalid.uk wrote:
> Record I/O is basically conducting I/O by reading and writing files
> based on 'records'... i.e. you can't just print a line to a file, you
> need to write a whole record in a fixed format of some type.
> 
> I am probably wrong, but I believe even today COBOL programmers think
> solely in terms of records and find it difficult to imagine free form
> data.

In actual COBOL, it is the only form of I/O.

But in the 60's, this was a major performance point. By doing the I/O in 
raw binary, record form, both memory and processing were saved. (The 
normal COBOL READ and WRITE statements are designed to give the 
programmer pointers to the records in the actual buffers -- the disk 
cache, if you will -- though modern operating systems generally don't 
permit this, so that COBOL has to create a dummy buffer, instead.) 
FORTRAN binary I/O required a separate buffer, and then variables had to 
be copied to and from the buffer, one at a time. On a 14xx or 7080, or 
on the smaller 360's, this could make a huge performance difference, 
especially when using I/O devices with timing thresholds. (For example, 
if the system driving a base-model 1402 card reader couldn't keep up its 
rated speed of 800 cards per minute, it slowed to 400.)

-- 
John W. Kennedy
"The blind rulers of Logres
Nourished the land on a fallacy of rational virtue."
   -- Charles Williams.  "Taliessin through Logres: Prelude"


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

Date: Fri, 22 Sep 2006 04:42:13 GMT
From: merlyn@stonehenge.com (Randal Schwartz)
Subject: new CPAN modules on Fri Sep 22 2006
Message-Id: <J5z92D.ML@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.

B-Deobfuscate-0.16
http://search.cpan.org/~jjore/B-Deobfuscate-0.16/
Extension to B::Deparse for use in de-obfuscating source code
----
Bigtop-0.15
http://search.cpan.org/~philcrow/Bigtop-0.15/
A web application data language processor
----
CPAN-1.88
http://search.cpan.org/~andk/CPAN-1.88/
query, download and build perl modules from CPAN sites
----
CPAN-Reporter-0.18
http://search.cpan.org/~dagolden/CPAN-Reporter-0.18/
Provides Test::Reporter support for CPAN.pm
----
CPAN-Unwind-0.04
http://search.cpan.org/~mschilli/CPAN-Unwind-0.04/
Recursively determines dependencies of CPAN modules
----
Catalyst-Plugin-Authentication-Store-HTTP-0.05
http://search.cpan.org/~typester/Catalyst-Plugin-Authentication-Store-HTTP-0.05/
Remote HTTP authentication storage
----
Catalyst-Plugin-Charsets-Japanese-0.06
http://search.cpan.org/~lyokato/Catalyst-Plugin-Charsets-Japanese-0.06/
Japanese specific charsets handler
----
FCGI-Async-0.06
http://search.cpan.org/~pevans/FCGI-Async-0.06/
Module to allow use of FastCGI asynchronously
----
FFmpeg-Command-0.05
http://search.cpan.org/~mizzy/FFmpeg-Command-0.05/
A wrapper class for ffmpeg command line utility.
----
Gantry-3.39
http://search.cpan.org/~philcrow/Gantry-3.39/
Web application framework for mod_perl, cgi, etc.
----
Geo-Coder-YahooJapan-0.01
http://search.cpan.org/~kuma/Geo-Coder-YahooJapan-0.01/
a simple wrapper for Yahoo Japan Geocoder API
----
HTML-Widget-1.09
http://search.cpan.org/~cfranks/HTML-Widget-1.09/
HTML Widget And Validation Framework
----
Image-ExifTool-6.42
http://search.cpan.org/~exiftool/Image-ExifTool-6.42/
Read and write meta information
----
InSilicoSpectro-0.9.25
http://search.cpan.org/~alexmass/InSilicoSpectro-0.9.25/
Open source Perl library for proteomics
----
InSilicoSpectro-Databanks-0.0.7
http://search.cpan.org/~alexmass/InSilicoSpectro-Databanks-0.0.7/
parsing protein/nucleotides sequence databanks (fasta, uniprot...)
----
LEGO-NXT-1.40
http://search.cpan.org/~collins/LEGO-NXT-1.40/
----
Lingua-ZH-WordSegment
http://search.cpan.org/~chenyr/Lingua-ZH-WordSegment/
Simple Simplified Chinese Word Segmentation
----
Log-Funlog-0.87
http://search.cpan.org/~korsani/Log-Funlog-0.87/
Log module with fun inside!
----
Mail-SpamCannibal-0.76
http://search.cpan.org/~miker/Mail-SpamCannibal-0.76/
A tool to stop SPAM
----
Math-Function-Roots-0.06
http://search.cpan.org/~sjo/Math-Function-Roots-0.06/
Functions for finding roots of arbitrary functions
----
Module-Build-Convert-0.31
http://search.cpan.org/~schubiger/Module-Build-Convert-0.31/
Makefile.PL to Build.PL converter
----
Module-Build-Convert-0.32
http://search.cpan.org/~schubiger/Module-Build-Convert-0.32/
Makefile.PL to Build.PL converter
----
NXT-1.40
http://search.cpan.org/~collins/NXT-1.40/
----
Number-Format-1.52
http://search.cpan.org/~wrw/Number-Format-1.52/
Perl extension for formatting numbers
----
Object-Accessor-Inheritable-0.01
http://search.cpan.org/~kane/Object-Accessor-Inheritable-0.01/
Enable data inheritance between objects
----
Path-Class-File-Stat-0.01
http://search.cpan.org/~karman/Path-Class-File-Stat-0.01/
cache and compare stat() calls on a Path::Class::File object
----
Pugs-Compiler-Rule-0.18
http://search.cpan.org/~fglock/Pugs-Compiler-Rule-0.18/
Compiler for Perl 6 Rules
----
SAP-Rfc-1.50
http://search.cpan.org/~piers/SAP-Rfc-1.50/
SAP RFC - RFC Function calls against an SAP R/3 System
----
String-Random-0.22
http://search.cpan.org/~steve/String-Random-0.22/
Perl module to generate random strings based on a pattern
----
TAPx-Parser-0.31
http://search.cpan.org/~ovid/TAPx-Parser-0.31/
Parse TAP output
----
Template-Plugin-NoFollow-1.000
http://search.cpan.org/~gtermars/Template-Plugin-NoFollow-1.000/
TT filter to add rel="nofollow" to all HTML links
----
Template-Plugin-Trac-1.000
http://search.cpan.org/~gtermars/Template-Plugin-Trac-1.000/
----
Text-BibTeX-0.37
http://search.cpan.org/~ambs/Text-BibTeX-0.37/
interface to read and parse BibTeX files
----
WWW-Mechanize-Plugin-Snapshot-0.20
http://search.cpan.org/~mcmahon/WWW-Mechanize-Plugin-Snapshot-0.20/
Snapshot the Mech object's state
----
Wordnet-SenseSearch-0.01
http://search.cpan.org/~dbrian/Wordnet-SenseSearch-0.01/
Just get a synset from a sense key
----
XML-Compile-0.07
http://search.cpan.org/~markov/XML-Compile-0.07/
Compilation based XML processing
----
dmake-4.6-20060921-SHAY
http://search.cpan.org/~shay/dmake-4.6-20060921-SHAY/
----
version-Limit-0.03
http://search.cpan.org/~jpeacock/version-Limit-0.03/
Perl extension for fine control of permitted versions


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: 22 Sep 2006 07:22:13 GMT
From: tadmc@augustmail.com
Subject: Posting Guidelines for comp.lang.perl.misc ($Revision: 1.6 $)
Message-Id: <45138f25$0$47250$ae4e5890@news.nationwide.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.6 $)
    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.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":

       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 

    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 <tadmc@augustmail.com> and many others on the
    comp.lang.perl.misc newsgroup.



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

Date: 21 Sep 2006 23:00:29 GMT
From: John Bokma <john@castleamber.com>
Subject: Re: Russel Quong's "Perl in 20 pages"
Message-Id: <Xns9845B72FC7338castleamber@130.133.1.4>

Uri Guttman <uri@stemsystems.com> wrote:
 
> i love reading bad perl web tutes. this is as bad as they get. this
> paragraph alone highlights the total confusion of the author. could he
> have used any more hash synonyms?

yes!

> 
>      A hash variable stores a array of (key, value) pairs,
>      collectively known as a map. Typically, the key and value are
>      different but related values, such as a person's name and phone
>      number. A hash is implemented in Perl so that you can quickly
>      look up the value given the key, when there are many (key,
>      value) pairs. From a algorithms/data structures standpoint, a
>      Perl hash implements a dictionary, mostly likely using a hash
>      table.

associative array, look up table, index :-D

    	A hash variable stores a array of (key, value) pairs,
    	collectively known as a map. Typically, the key and value are
    	different but related values, such as a person's name and phone
       number. An associative array is implemented in Perl so that you can 
    	quickly look up the value given the key, when there are many (key,
       value) pairs in this look up table. From a algorithms/data 
       structures standpoint, a Perl index implements a dictionary, mostly     
	likely using a hash table.

>:->

> we do need to make a bad perl web tute site with links and reviews. in
> my copious free time i will do this. :)

I will review 
<http://visibooks.com/pdfs/TheVisibooksGuidetoPERLBasics50.pdf>

                                              ^^^^ Yes, the title says 
                                                   it all.

next week when I am hopefully recovered of the first glance at this book 
excerpt.

-- 
John                Experienced Perl programmer: http://castleamber.com/

          Perl help, tutorials, and examples: http://johnbokma.com/perl/


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

Date: Thu, 21 Sep 2006 16:49:15 -0700
From: Jim Gibson <jgibson@mail.arc.nasa.gov>
Subject: Re: Russel Quong's "Perl in 20 pages"
Message-Id: <210920061649157362%jgibson@mail.arc.nasa.gov>

In article <x7d59pf5e5.fsf@mail.sysarch.com>, Uri Guttman
<uri@stemsystems.com> wrote:

[link to bad Perl tutorial snipped to protect the innocent]

> i love reading bad perl web tutes. this is as bad as they get. this
> paragraph alone highlights the total confusion of the author. could he
> have used any more hash synonyms?

Yes! He doesn't use "associative array". :)

>  A hash variable stores a array of (key, value) pairs,
>  collectively known as a map. Typically, the key and value are
>  different but related values, such as a person's name and phone
>  number. A hash is implemented in Perl so that you can quickly
>  look up the value given the key, when there are many (key,
>  value) pairs. From a algorithms/data structures standpoint, a
>  Perl hash implements a dictionary, mostly likely using a hash
>  table.

 Posted Via Usenet.com Premium Usenet Newsgroup Services
----------------------------------------------------------
    ** SPEED ** RETENTION ** COMPLETION ** ANONYMITY **
----------------------------------------------------------        
                http://www.usenet.com


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

Date: Thu, 21 Sep 2006 19:01:11 -0500
From: Tad McClellan <tadmc@augustmail.com>
Subject: Re: Russel Quong's "Perl in 20 pages"
Message-Id: <slrneh69u7.la7.tadmc@magna.augustmail.com>

David Squire <David.Squire@no.spam.from.here.au> wrote:
> Mirco Wahab wrote:
> 
>> It now includes a comparison w/Python too - as a bonus ...
>> http://www.adequacy.org/stories/2001.12.20.165434.32.html
> 
> Hey! That's off-topic here. It's about some language called 'Pearl' :)


Such a language does exist, which is why Larry left the "a" out
of the name of his language:

   http://en.wikipedia.org/wiki/PEARL_programming_language

It sure doesn't seem something that could be compared to Python though...


-- 
    Tad McClellan                          SGML consulting
    tadmc@augustmail.com                   Perl programming
    Fort Worth, Texas


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

Date: 22 Sep 2006 03:06:47 GMT
From: John Bokma <john@castleamber.com>
Subject: Re: Russel Quong's "Perl in 20 pages"
Message-Id: <Xns9845E0F12BAE1castleamber@130.133.1.4>

Tad McClellan <tadmc@augustmail.com> wrote:

> David Squire <David.Squire@no.spam.from.here.au> wrote:
>> Mirco Wahab wrote:
>> 
>>> It now includes a comparison w/Python too - as a bonus ...
>>> http://www.adequacy.org/stories/2001.12.20.165434.32.html
>> 
>> Hey! That's off-topic here. It's about some language called 'Pearl'
>> :) 
> 
> 
> Such a language does exist, which is why Larry left the "a" out
> of the name of his language:
> 
>    http://en.wikipedia.org/wiki/PEARL_programming_language
> 
> It sure doesn't seem something that could be compared to Python
> though... 

WHEN fire ACTIVATE extinguish; :-)

-- 
John                Experienced Perl programmer: http://castleamber.com/

          Perl help, tutorials, and examples: http://johnbokma.com/perl/


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

Date: 22 Sep 2006 09:52:21 +0200
From: Michele Dondi <bik.mido@tiscalinet.it>
Subject: Re: Russel Quong's "Perl in 20 pages"
Message-Id: <en37h29skr0de1p5fi8hpk67l9jp75ustj@4ax.com>

On Thu, 21 Sep 2006 14:20:34 -0400, Uri Guttman <uri@stemsystems.com>
wrote:

>i love reading bad perl web tutes. this is as bad as they get. this

You're either lying or removing past horrors. Do you remember the
earthquake guy's one? And the one by a lady whose name eludes me for
the moment, but which was reported here exactly for that reason: i.e.
being an awfully bad -but supported by some institution's grant!- perl
tutorial?


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: 22 Sep 2006 09:38:49 GMT
From: anno4000@radom.zrz.tu-berlin.de
Subject: Re: sort with Perl ..
Message-Id: <4nhp99Fagc8gU1@news.dfncis.de>

DJ Stunks <DJStunks@gmail.com> wrote in comp.lang.perl.misc:
> 
> Taher wrote:
> > Wow .. that was quick ... :-) .
> >
> > I was struggling to get this .. was not getting the right mix of using
> > split with arrays ..
> >
> > Thanks to all Perl gurus ... ( learnt a lot today :-) )
> 
> I have the sinking feeling you "learnt" that you can occasionally get
> guys to write code for you at c.l.p.m.

 ...and get away with top-posting to boot!

Anno


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

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


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