[30418] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 1661 Volume: 11

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Fri Jun 20 09:14:38 2008

Date: Fri, 20 Jun 2008 06:14:29 -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, 20 Jun 2008     Volume: 11 Number: 1661

Today's topics:
        listing a directory by size <xiaoxia2005a@yahoo.com>
    Re: listing a directory by size <jurgenex@hotmail.com>
    Re: listing a directory by size <someone@example.com>
    Re: listing a directory by size <jurgenex@hotmail.com>
        new CPAN modules on Fri Jun 20 2008 (Randal Schwartz)
    Re: Perl DBI Module: SQL query where there is space in  <m@rtij.nl.invlalid>
    Re: Perl Script <tzz@lifelogs.com>
    Re: Perl Script <cartercc@gmail.com>
    Re: Perl Script <m@rtij.nl.invlalid>
    Re: Perl Script <m@rtij.nl.invlalid>
        Posting Guidelines for comp.lang.perl.misc ($Revision:  tadmc@seesig.invalid
        Print Spanish characters in Perl? <dbxxxxxxx@yahoo.com>
    Re: Print Spanish characters in Perl? <jurgenex@hotmail.com>
    Re: Print Spanish characters in Perl? <bill@ts1000.us>
        Windows firewall administration <cartercc@gmail.com>
    Re: Windows firewall administration <m@rtij.nl.invlalid>
    Re: Wrtiting to a file in LDIF format <usenet@davidfilmer.com>
    Re: Wrtiting to a file in LDIF format <m@rtij.nl.invlalid>
        Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)

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

Date: Thu, 19 Jun 2008 19:41:49 -0700 (PDT)
From: April <xiaoxia2005a@yahoo.com>
Subject: listing a directory by size
Message-Id: <bb06620f-34be-418d-8c8b-f13aa278035a@d1g2000hsg.googlegroups.com>

For the following program, found somethings seem not seen before, one
is the input <*>, everything and anything?  Another is the usage
$i{$f} or $i{$b}, etc., not sure what that means?

foreach $f (<*>) ( $i{$f} = -S $f };
foreach $k (sort{ $i{$b} <=> $i${a} } keys %i}
    { printf "%8d %s\n", $i{$k}, $k }

Any guru can explain?  Thanks!


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

Date: Fri, 20 Jun 2008 04:25:37 GMT
From: Jürgen Exner <jurgenex@hotmail.com>
Subject: Re: listing a directory by size
Message-Id: <u5cm54p0drrgb07q6bubrn0hdg7u4r2ji2@4ax.com>

April <xiaoxia2005a@yahoo.com> wrote:
>For the following program, found somethings seem not seen before, one
>is the input <*>, everything and anything? 

Another way of writing 
	glob(*);

> Another is the usage
>$i{$f} or $i{$b}, etc., not sure what that means?

See
	perldoc perldata 
and look for hashes. It is retrieving the value of %i for the key that
has the value of $f resp. $b.

jue


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

Date: Fri, 20 Jun 2008 05:44:41 GMT
From: "John W. Krahn" <someone@example.com>
Subject: Re: listing a directory by size
Message-Id: <dtH6k.252$2G6.132@edtnps83>

J=FCrgen Exner wrote:
> April <xiaoxia2005a@yahoo.com> wrote:
>> For the following program, found somethings seem not seen before, one
>> is the input <*>, everything and anything?=20
>=20
> Another way of writing=20
> 	glob(*);

ITYM:   glob '*';


John
--=20
Perl isn't a toolbox, but a small machine shop where you
can special-order certain sorts of tools at low cost and
in short order.                            -- Larry Wall


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

Date: Fri, 20 Jun 2008 08:40:59 GMT
From: Jürgen Exner <jurgenex@hotmail.com>
Subject: Re: listing a directory by size
Message-Id: <c8rm54tb7nnj165fjrlev4ifbt181bm0j3@4ax.com>

"John W. Krahn" <someone@example.com> wrote:
>Jürgen Exner wrote:
>> April <xiaoxia2005a@yahoo.com> wrote:
>>> For the following program, found somethings seem not seen before, one
>>> is the input <*>, everything and anything? 
>> 
>> Another way of writing 
>> 	glob(*);
>
>ITYM:   glob '*';

Hmmm, yes.

jue


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

Date: Fri, 20 Jun 2008 04:42:20 GMT
From: merlyn@stonehenge.com (Randal Schwartz)
Subject: new CPAN modules on Fri Jun 20 2008
Message-Id: <K2qvqK.HEr@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-BBaxter-Tests-0.01
http://search.cpan.org/~bbaxter/Acme-BBaxter-Tests-0.01/
submit tests to CPAN testers 
----
Acme-Spinner-0.03
http://search.cpan.org/~cfedde/Acme-Spinner-0.03/
A trivial example of one of those activity spinners 
----
Apache-SWIT-0.35
http://search.cpan.org/~bosu/Apache-SWIT-0.35/
mod_perl based application server with integrated testing. 
----
Be-Attribute-0.1.1
http://search.cpan.org/~tspin/Be-Attribute-0.1.1/
get and set MIME file attributes 
----
Be-Attribute-0.2
http://search.cpan.org/~tspin/Be-Attribute-0.2/
get and set MIME file attributes 
----
Be-Query-0.1.1
http://search.cpan.org/~tspin/Be-Query-0.1.1/
do a Query for a given filesystem. 
----
Be-Query-0.2
http://search.cpan.org/~tspin/Be-Query-0.2/
do a Query for a given filesystem. 
----
CGI-Application-Plugin-CHI-0.01
http://search.cpan.org/~friedo/CGI-Application-Plugin-CHI-0.01/
CGI-App plugin for CHI caching interface 
----
CGI-Deurl-XS-0.07
http://search.cpan.org/~athomason/CGI-Deurl-XS-0.07/
Fast decoder for URL parameter strings 
----
CPAN-1.92_63
http://search.cpan.org/~andk/CPAN-1.92_63/
query, download and build perl modules from CPAN sites 
----
Catalyst-Controller-HTML-FormFu-0.03000
http://search.cpan.org/~cfranks/Catalyst-Controller-HTML-FormFu-0.03000/
----
Config-Model-TkUI-0.201
http://search.cpan.org/~ddumont/Config-Model-TkUI-0.201/
Tk GUI to edit config data through Config::Model 
----
Crypt-Rijndael-1.06_02
http://search.cpan.org/~bdfoy/Crypt-Rijndael-1.06_02/
Crypt::CBC compliant Rijndael encryption module 
----
DBIx-Class-HTML-FormFu-0.01005
http://search.cpan.org/~cfranks/DBIx-Class-HTML-FormFu-0.01005/
DEPRECATED - use HTML::FormFu::Model::DBIC instead 
----
Data-FeatureFactory-0.04_04
http://search.cpan.org/~sixtease/Data-FeatureFactory-0.04_04/
evaluate features normally or numerically 
----
Data-NDS-1.05
http://search.cpan.org/~sbeck/Data-NDS-1.05/
routines to work with a perl nested data structure 
----
Data-NDS-Multisource-2.02
http://search.cpan.org/~sbeck/Data-NDS-Multisource-2.02/
Data structures defined in multiple sources 
----
Devel-Dt-0.01
http://search.cpan.org/~jjore/Devel-Dt-0.01/
Emulates command line flag -Dt but better 
----
Flickr-Upload-1.31
http://search.cpan.org/~cpb/Flickr-Upload-1.31/
Upload images to flickr.com 
----
Git-Wrapper-0.004
http://search.cpan.org/~hdp/Git-Wrapper-0.004/
wrap git(7) command-line interface 
----
HOP-Stream-0.02
http://search.cpan.org/~ovid/HOP-Stream-0.02/
"Higher Order Perl" streams 
----
HTML-FormFu-0.03000
http://search.cpan.org/~cfranks/HTML-FormFu-0.03000/
HTML Form Creation, Rendering and Validation Framework 
----
HTML-FormFu-Model-DBIC-0.03000
http://search.cpan.org/~cfranks/HTML-FormFu-Model-DBIC-0.03000/
Integrate HTML::FormFu with DBIx::Class 
----
HTML-Tested-0.37
http://search.cpan.org/~bosu/HTML-Tested-0.37/
Provides HTML widgets with the built-in means of testing. 
----
Hash-Case-1.006
http://search.cpan.org/~markov/Hash-Case-1.006/
base class for hashes with key-casing requirements 
----
IO-AIO-3.05
http://search.cpan.org/~mlehmann/IO-AIO-3.05/
Asynchronous Input/Output 
----
IPTables-libiptc-0.08
http://search.cpan.org/~hawk/IPTables-libiptc-0.08/
Perl extension for iptables libiptc 
----
Image-BMP-1.16
http://search.cpan.org/~daveola/Image-BMP-1.16/
Bitmap parser/viewer 
----
Iterator-File-1.01
http://search.cpan.org/~wreardon/Iterator-File-1.01/
A file iterator, optionally stateful and verbose. 
----
JS-Test-Simple-0.23
http://search.cpan.org/~ingy/JS-Test-Simple-0.23/
Basic utilities for writing JavaScript tests. 
----
Lingua-Alphabet-Phonetic-0.102
http://search.cpan.org/~mthurn/Lingua-Alphabet-Phonetic-0.102/
map ABC's to phonetic alphabets 
----
Makefile-Parallel-0.06
http://search.cpan.org/~ambs/Makefile-Parallel-0.06/
A distributed parallel makefile 
----
Net-Moo-0.11
http://search.cpan.org/~ascope/Net-Moo-0.11/
OOP wrapper for the Moo.com API 
----
Net-SNMP-Mixin-0.10
http://search.cpan.org/~gaissmai/Net-SNMP-Mixin-0.10/
mixin framework for Net::SNMP 
----
POE-Component-Pool-DBI-0.011
http://search.cpan.org/~tag/POE-Component-Pool-DBI-0.011/
Simplified DBI access through a pooled resource. 
----
PerlIO-Util-0.49_01
http://search.cpan.org/~gfuji/PerlIO-Util-0.49_01/
A selection of general PerlIO utilities 
----
Prima-Image-Magick-0.05
http://search.cpan.org/~karasik/Prima-Image-Magick-0.05/
Juggle images between Prima and Image::Magick 
----
RiveScript-1.15
http://search.cpan.org/~kirsle/RiveScript-1.15/
Rendering Intelligence Very Easily 
----
Sort-Packed-0.02
http://search.cpan.org/~salva/Sort-Packed-0.02/
Sort records packed in a vector 
----
Statistics-ANOVA-0.01
http://search.cpan.org/~rgarton/Statistics-ANOVA-0.01/
Perform oneway analyses of variance 
----
Statistics-Deviation-0.01
http://search.cpan.org/~rgarton/Statistics-Deviation-0.01/
Basic ztest and normal probability reporting 
----
Statistics-SDT-0.03
http://search.cpan.org/~rgarton/Statistics-SDT-0.03/
Signal detection theory measures of sensitivity and response-bias 
----
Statistics-Sequences-0.01
http://search.cpan.org/~rgarton/Statistics-Sequences-0.01/
Tests of sequential structure in the form of runs, joins, bunches, etc. 
----
String-CaseProfile-0.09
http://search.cpan.org/~enell/String-CaseProfile-0.09/
Get/Set the letter case profile of a string 
----
Sys-Info-0.52_5
http://search.cpan.org/~burak/Sys-Info-0.52_5/
Fetch information from the host system 
----
Template-Plugin-Cycle-1.06
http://search.cpan.org/~adamk/Template-Plugin-Cycle-1.06/
Cyclically insert into a Template from a sequence of values 
----
Template-Plugin-Multisource-2.02
http://search.cpan.org/~sbeck/Template-Plugin-Multisource-2.02/
Interface to Data::NDS::Multisource operations 
----
Test-Most-0.04
http://search.cpan.org/~ovid/Test-Most-0.04/
Most commonly needed test functions and features. 
----
Test-Pod-Content-v0.0.4
http://search.cpan.org/~mkutter/Test-Pod-Content-v0.0.4/
Test a Pod's content 
----
Test-Smoke-1.33
http://search.cpan.org/~abeltje/Test-Smoke-1.33/
The Perl core test smoke suite 
----
Text-MediawikiFormat-v1.0
http://search.cpan.org/~dprice/Text-MediawikiFormat-v1.0/
Translate Wiki markup into other text formats 
----
Thread-CriticalSection-0.02
http://search.cpan.org/~melo/Thread-CriticalSection-0.02/
Run a coderef inside a critical section 
----
URI-Find-Simple-1
http://search.cpan.org/~tomi/URI-Find-Simple-1/
a simple interface to URI::Find 
----
URI-Title-1.80
http://search.cpan.org/~tomi/URI-Title-1.80/
get the titles of things on the web in a sensible way 
----
WWW-Blogger-2008.0619
http://search.cpan.org/~ermeyers/WWW-Blogger-2008.0619/
Blogger Development Interface (BDI) 
----
WWW-Curl-4.02
http://search.cpan.org/~szbalint/WWW-Curl-4.02/
Perl extension interface for libcurl 
----
WWW-Myspace-0.82
http://search.cpan.org/~grantg/WWW-Myspace-0.82/
Access MySpace.com profile information from Perl 
----
Win32-EnvProcess-0.04
http://search.cpan.org/~clive/Win32-EnvProcess-0.04/
Perl extension to set or get environment variables from other processes 
----
WordPress-XMLRPC-1.11
http://search.cpan.org/~leocharre/WordPress-XMLRPC-1.11/
----
stockmonkey-2.6
http://search.cpan.org/~jettero/stockmonkey-2.6/
----
threads-shared-1.23
http://search.cpan.org/~jdhedden/threads-shared-1.23/
Perl extension for sharing data structures between threads 


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/>
Smalltalk/Perl/Unix consulting, Technical writing, Comedy, etc. etc.
See http://methodsandmessages.vox.com/ for Smalltalk and Seaside discussion


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

Date: Fri, 20 Jun 2008 00:14:00 +0200
From: Martijn Lievaart <m@rtij.nl.invlalid>
Subject: Re: Perl DBI Module: SQL query where there is space in field name
Message-Id: <pan.2008.06.19.22.14.00@rtij.nl.invlalid>

On Thu, 12 Jun 2008 01:21:58 -0700, Waylen Gumbal wrote:

> What you both are demonstrating is the core constant problem on Usenet:
> failing to communicate; failing to even attempt to understand the other
> person's point of view. I see people like you respond to people like
> DeFaria (people who you obviously consider to be inferior) and display a
> complete inability to see past your own views, and thus you have a never
> ending fight between the academia types and the more every day types.

FWIW,

I actually tried to communicate with DeFaria. Being on usenet for about 
20 years I think of myself as kind of a veteran and I hope I learned some 
communication skills in the meantime, especially on usenet.

But communication with DeFaria is impossible.

This group should be gentler with newbies, better at assuming someone 
didn't exactly mean what they said. And as communication on usenet and 
communication about programming languages are both tricky, they should 
learn the newbie how to communicate.

And everyone should learn for themselves. How do my preconceptions stand 
in the way of effective communication. Are we turning into an inbred 
group?

But you picked the complete wrong example. DeFaria is hopeless. Whatever 
communication deficiency this group has, DeFaria has it ten times over. 
Don't waste any time on him. Don't use him as an example.

M4


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

Date: Thu, 19 Jun 2008 08:45:13 -0500
From: Ted Zlatanov <tzz@lifelogs.com>
Subject: Re: Perl Script
Message-Id: <863an9y1w6.fsf@lifelogs.com>

On Wed, 18 Jun 2008 22:23:18 -0700 Andrew DeFaria <Andrew@DeFaria.com> wrote: 

AD> cartercc wrote:
>> On Jun 18, 10:47 am, Andrew DeFaria <And...@DeFaria.com> wrote:
>>> That depends on what kind of encryption you use...
>> This particular database is Postgres. It uses a one way hash. 

AD> No, you don't understand. You could encrypt things yourself then
AD> just store the encrypted result in the database. Then, later on,
AD> extract it and reverse the encryption. IOW you're not limited to
AD> just what Postgres (or any other database for that matter) has to
AD> offer.

Usually this is a bad idea, because whoever has the key can also decrypt
all the passwords.  It's mildly less dangerous with asymmetric
encryption, but still not a good idea and more complicated.

Hashing passwords is much safer than reversible encryption (regardless
whether it's symmetric or asymmetric).  MD5 hashing is popular because
it's fast, but there have been exploits against it so one of the newer
hashing algorithms may be better.  Hashing is not reversible so you
can't get the original passwords from the database.  You can only check
that the given password hashes to the same value as the one in the
database  Thus, "one-way hash".

Usually it's implemented with extra salt, so you hash
"secrettextPASSWORD" instead of just "PASSWORD" as extra protection
against brute-force attacks.  It won't help if the attacker has access
to the code and can see what "secrettext" is, but if the attacker can
only see the passwords table it's a decent defense.  It makes the
password harder to guess, especially with a longer secret text.

Ted


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

Date: Thu, 19 Jun 2008 08:19:37 -0700 (PDT)
From: cartercc <cartercc@gmail.com>
Subject: Re: Perl Script
Message-Id: <14897209-7ff0-425d-881a-581d7ce36a45@m73g2000hsh.googlegroups.com>

On Jun 19, 1:23 am, Andrew DeFaria <And...@DeFaria.com>
> > Key management is one headache that I don't have. ;-)
>
> I'd really like to know who you work for - so I can avoid them!

I work for a large public university. 'Management' is mostly academic,
not business. I'd like to avoid them as well, but hey, working
conditions are great and I get a lot of time off, even though the pay
sucks.

As to this entire issue, I don't WANT to be able to decrypt SSNs. I
crypt() them into the database and then delete the input file, and I'm
happy. If I have to match SSNs (which happens on rare occasions) I
just have to match the hash. One of the things on my not-to-do list is
maintain keys. Maintaining passwords in the clear is bad enough, but
I've CYAed myself in that regard.

CC


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

Date: Thu, 19 Jun 2008 23:40:10 +0200
From: Martijn Lievaart <m@rtij.nl.invlalid>
Subject: Re: Perl Script
Message-Id: <pan.2008.06.19.21.40.10@rtij.nl.invlalid>

On Thu, 19 Jun 2008 08:45:13 -0500, Ted Zlatanov wrote:

> Usually it's implemented with extra salt, so you hash
> "secrettextPASSWORD" instead of just "PASSWORD" as extra protection
> against brute-force attacks.  It won't help if the attacker has access
> to the code and can see what "secrettext" is, but if the attacker can
> only see the passwords table it's a decent defense.  It makes the
> password harder to guess, especially with a longer secret text.

Actually, IIRC, you just need a different salt for different users. It 
doesn't matter to much if the salt is known for a particular user. In 
fact, if you know the MD5 hash, you know the salt, as these are stored 
together.

What a salt protects against is someone pre-computing the md5 (or 
whatever) hash for a dictionary and comparing this pre-computed result 
against a password file. Just having a salt, a different one for each 
password, known or not, protects against this attack.

One may implement this as a secret salt, the same for all users, as Ted 
seems to imply. This is a bad idea, for the reasons he noted. However, 
this is not what a salt is about normally.

M4


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

Date: Thu, 19 Jun 2008 23:43:12 +0200
From: Martijn Lievaart <m@rtij.nl.invlalid>
Subject: Re: Perl Script
Message-Id: <pan.2008.06.19.21.43.12@rtij.nl.invlalid>

On Wed, 18 Jun 2008 08:28:49 -0700, cartercc wrote:

> On Jun 18, 10:47 am, Andrew DeFaria <And...@DeFaria.com> wrote:
>> That depends on what kind of encryption you use...
> 
> This particular database is Postgres. It uses a one way hash. We also
> receive social security numbers, which we are required to read into the
> database but not required to read out, so we hash these.
> 
> Key management is one headache that I don't have. ;-)

But key collisions may be.

I agree with your reasoning, except it may introduce another risk. If the 
SSN is just used for an check, so you check it against a known record, 
OK, no problem. But if you use it as a search key, there may be a hash 
collision.

Probably you mean the former, in which case I didn't say anything.

Cheers,
M4


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

Date: Fri, 20 Jun 2008 06:13:50 GMT
From: tadmc@seesig.invalid
Subject: Posting Guidelines for comp.lang.perl.misc ($Revision: 1.8 $)
Message-Id: <yUH6k.14571$co7.14053@nlpi066.nbdc.sbc.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.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: Thu, 19 Jun 2008 23:03:15 -0500
From: DanB <dbxxxxxxx@yahoo.com>
Subject: Print Spanish characters in Perl?
Message-Id: <8uadnRPbiISescbVnZ2dnUVZ_jSdnZ2d@oco.net>

This is probably has a simple answer, but it isn't in my Perl books and I
have been trying to google it up using a dialup line locked down by the
telephone company to 20k bps. (And they don't offer what they call
broadband.  i.e 56k)

Anyway, after a couple of hours of surfing through a very small part of
about 5 zillion hits for "Perl Unicode Spanish" at the rate of about one
page per minute, I decided to cheat and just ask.

Using Debian etch.
I am trying to build a set of Spanish flash cards using TK, and I need to
be able to display the accented characters.  I know that I need to specify
them in some unicode besides utf-8, but an example of the actual Perl code
to activate(?) and use the proper unicode table is what I can't find.
Actually, Unicode is such a big topic that as a Perl beginner I might not
recognise the answer if I managed to google it up.

Anybody?

Thanks
Dan


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

Date: Fri, 20 Jun 2008 04:37:34 GMT
From: Jürgen Exner <jurgenex@hotmail.com>
Subject: Re: Print Spanish characters in Perl?
Message-Id: <mdcm54h9j1jn083kpng5qa4eqv1865q4rj@4ax.com>

DanB <dbxxxxxxx@yahoo.com> wrote:
>I am trying to build a set of Spanish flash cards using TK, and I need to
>be able to display the accented characters.  I know that I need to specify
>them in some unicode besides utf-8,

Actually, you don't. Just put them into your code in your favourite
editor and treat them like any ASCII character. 

A problems arise only if your editor saves the file in a different
encoding then your display device expects. Typical examples are e.g.
saving as UTF-8, then including the text in an HTML page but forgetting
to specify UTF-8 as charset. In this case the browser defaults to
ISO-Latin-1 and the non-ASCII characters will be messed up, of course.
Or saving the file as Windows-1252 (or ISO-Latin-1) and then viewing the
output in a DOS Window which for western languages uses OEM CP 850.

jue


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

Date: Fri, 20 Jun 2008 03:58:34 -0700 (PDT)
From: Bill H <bill@ts1000.us>
Subject: Re: Print Spanish characters in Perl?
Message-Id: <91571ed9-04af-4977-9c2a-a5cc3824b787@f63g2000hsf.googlegroups.com>

On Jun 20, 12:37=A0am, J=FCrgen Exner <jurge...@hotmail.com> wrote:
> DanB <dbxxxx...@yahoo.com> wrote:
> >I am trying to build a set of Spanish flash cards using TK, and I need t=
o
> >be able to display the accented characters. =A0I know that I need to spe=
cify
> >them in some unicode besides utf-8,
>
> Actually, you don't. Just put them into your code in your favourite
> editor and treat them like any ASCII character.
>
> A problems arise only if your editor saves the file in a different
> encoding then your display device expects. Typical examples are e.g.
> saving as UTF-8, then including the text in an HTML page but forgetting
> to specify UTF-8 as charset. In this case the browser defaults to
> ISO-Latin-1 and the non-ASCII characters will be messed up, of course.
> Or saving the file as Windows-1252 (or ISO-Latin-1) and then viewing the
> output in a DOS Window which for western languages uses OEM CP 850.
>
> jue

I know if I am writing some code using Edit.com (yes dos - can't get
away from the simplicity of it) I can add the foriegn language
characters to my programs just using the ALT+0??? code and it works
fine. I haven't tried doing it in a windows based editor.



Bill H


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

Date: Thu, 19 Jun 2008 18:11:05 -0700 (PDT)
From: cartercc <cartercc@gmail.com>
Subject: Windows firewall administration
Message-Id: <bda1484c-18f7-420d-bcbe-b64c4a2bf03c@c65g2000hsa.googlegroups.com>

Tomorrow morning when I get to work, I will be asked to write a script
that will do a bunch of stuff to servers running the Windows firewall.
I don't know anything about Windows firewalls or Windows networking,
but I was handed a half-inch thick sheaf of papers on the topic
tonight, with these words, 'If we only had Novell all our problems
would be solved.' This project involves over 1,000 servers over a five
state region and apparently will be a real headache to do manually.
I've been told that this involves opening ports, closing ports,
configuring firewalls, and other things, I asked for a requirements
specification but was told there wasn't one..

In addition to the papers I was given, I have an old copy of Dave
Roth's book on Win32 Perl Scripting which I picked up and attempted to
scan through ... not that it's done much good. Also, I was told that
the ideal technology would be Power Shell (this is why they came to
me, I've been going through the Power Shell tutorial and writing some
cute scripts that don't do much except impress the unwashed.)

You now know about as much as I do. Questions:
1. Is this something that Perl can be useful at?
2. Does the Win32 API on the Active State 5.8.4.810 Perl support this?
3. Any pointers of places to look for help?
4. Any repository of scripts? I've checked CPAN but the only module I
say was for reading Windows firewall logs.
5. This isn't my job, but I have a very high incentive to be
successful at this project. Should I cut my losses and beg off from
the beginning?

Thanks to all who care to respond to what must seem a somewhat idiodic
post.

CC


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

Date: Fri, 20 Jun 2008 08:53:55 +0200
From: Martijn Lievaart <m@rtij.nl.invlalid>
Subject: Re: Windows firewall administration
Message-Id: <pan.2008.06.20.06.53.55@rtij.nl.invlalid>

On Thu, 19 Jun 2008 18:11:05 -0700, cartercc wrote:

> You now know about as much as I do.

Which isn't much, certainly not enough to get started.

> Questions:
> 1. Is this something that Perl can be useful at?

Probably. Then maybe not.

> 2. Does the Win32 API on the Active State 5.8.4.810 Perl support this?

First find out what interfaces are supported by the firewall. There 
probably is a COM or .NET interface, which you can call from any 
language, including Perl.

> 5. This isn't my job, but I have a very high incentive to be successful
> at this project. Should I cut my losses and beg off from the beginning?

Just make sure from the beginning that there is a real chance of failure. 
If what you have given us is really everything you know, you should first 
investigate what they want, only then look at the technology needed to 
accomplish it. Don't lock yourself in on Perl, although there is a good 
chance it's a good tool for the job.

HTH,
M4


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

Date: Thu, 19 Jun 2008 09:29:30 -0700
From: David Filmer <usenet@davidfilmer.com>
Subject: Re: Wrtiting to a file in LDIF format
Message-Id: <qpSdnRk9sIDbFMfV4p2dnAA@giganews.com>

dakin999 wrote:
> Sorry for the confusion, but I am just looking to create a output LDIF
> file without doing anything after that

Show us a sample of your input data.  If you're using an array or hash, 
show us the results of Data::Dumper's Dumper(\@foo) or Dumper(\%foo)


-- 
David Filmer (http://DavidFilmer.com)
The best way to get a good answer is to ask a good question.


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

Date: Thu, 19 Jun 2008 19:32:07 +0200
From: Martijn Lievaart <m@rtij.nl.invlalid>
Subject: Re: Wrtiting to a file in LDIF format
Message-Id: <pan.2008.06.19.17.32.07@rtij.nl.invlalid>

On Thu, 19 Jun 2008 01:09:19 -0700, dakin999 wrote:

> Sorry for the confusion, but I am just looking to create a output LDIF
> file without doing anything after that. (No loading to LDAP server, etc.
> just a plain LDIF file in the format I mentioned at the top).

I would say perldap-1.4 can do exactly that. Where exactly does it not 
meet your needs?

M4


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

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 1661
***************************************


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