[30315] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 1558 Volume: 11

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Tue May 20 03:09:43 2008

Date: Tue, 20 May 2008 00:09:09 -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, 20 May 2008     Volume: 11 Number: 1558

Today's topics:
    Re: ARGV[] unable to pick up command line arguments <rvtol+news@isolution.nl>
    Re: ARGV[] unable to pick up command line arguments <jurgenex@hotmail.com>
        Example for open3 on windows? <mreimer@expires-31-05-2008.news-group.org>
        new CPAN modules on Tue May 20 2008 (Randal Schwartz)
    Re: Perl 6 <gordon@ .>
    Re: Perl 6 (Ben Bullock)
        Perl equivalent of htmlspecialchars() <yogeshkagrawal@gmail.com>
    Re: pop langs website ranking (Ben Bullock)
        Posting Guidelines for comp.lang.perl.misc ($Revision:  tadmc@seesig.invalid
    Re: script to find the files with very long names <jurgenex@hotmail.com>
        Server-side modules <stpra123@gmail.com>
    Re: Tk with Thread <slick.users@gmail.com>
    Re: Tk with Thread <joost@zeekat.nl>
    Re: Tk with Thread <slick.users@gmail.com>
    Re: Tk with Thread <joost@zeekat.nl>
    Re: Tk with Thread <slick.users@gmail.com>
    Re: Tk with Thread <ben@morrow.me.uk>
    Re: Using Win32::OLE(?in?) (Ben Bullock)
        Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)

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

Date: Tue, 20 May 2008 03:04:59 +0200
From: "Dr.Ruud" <rvtol+news@isolution.nl>
Subject: Re: ARGV[] unable to pick up command line arguments
Message-Id: <g0tf7k.1fc.1@news.isolution.nl>

Jürgen Exner schreef:

> As evidenced by the command prompt
> U:\....
> the OP is using Windows. Therefore the shebang line will happily be
> ignored.

"ignored" is too strong: any options, like -T, can still be obeyed.

-- 
Affijn, Ruud

"Gewoon is een tijger."



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

Date: Tue, 20 May 2008 01:25:38 GMT
From: Jürgen Exner <jurgenex@hotmail.com>
Subject: Re: ARGV[] unable to pick up command line arguments
Message-Id: <03a4345unfm3afc6dkhnfjb4fqhqfeat4j@4ax.com>

"Dr.Ruud" <rvtol+news@isolution.nl> wrote:
>Jürgen Exner schreef:
>
>> As evidenced by the command prompt
>> U:\....
>> the OP is using Windows. Therefore the shebang line will happily be
>> ignored.
>
>"ignored" is too strong: any options, like -T, can still be obeyed.

Ok, 
	s/the/this/
because the one offered didn't have any options.

jue


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

Date: Tue, 20 May 2008 07:33:37 +0200
From: Manuel Reimer <mreimer@expires-31-05-2008.news-group.org>
Subject: Example for open3 on windows?
Message-Id: <1211261617.05@user.newsoffice.de>

Hello,

I tried to forward input, output and error of a command to files using 
open3 on windows.

I used the following code:

open(F_IN, "<$f_in");
open(F_OUT, ">$f_out");
open(F_ERR, ">$f_err");
my $pid = open3(\*F_IN, \*F_OUT, \*F_ERR, "$command");
waitpid($pid, 0);

Anything, this code does, is hanging on waitpid.

Does open3 work on windows? If yes: How can I use it to forward all 
input/output channels to files?

Thanks in advance

CU

Manuel



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

Date: Tue, 20 May 2008 04:42:18 GMT
From: merlyn@stonehenge.com (Randal Schwartz)
Subject: new CPAN modules on Tue May 20 2008
Message-Id: <K15H2I.1vyJ@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.

Alien-wxWidgets-0.36
http://search.cpan.org/~mbarbon/Alien-wxWidgets-0.36/
building, finding and using wxWidgets binaries 
----
App-SweeperBot-0.02
http://search.cpan.org/~pjf/App-SweeperBot-0.02/
Play windows minesweeper, automatically! 
----
Attribute-Util-1.03
http://search.cpan.org/~dankogai/Attribute-Util-1.03/
Assorted general utility attributes 
----
Bio-Das-1.08
http://search.cpan.org/~lds/Bio-Das-1.08/
Interface to Distributed Annotation System 
----
CPAN-Reporter-1.15
http://search.cpan.org/~dagolden/CPAN-Reporter-1.15/
Adds CPAN Testers reporting to CPAN.pm 
----
CSS-DOM-0.02
http://search.cpan.org/~sprout/CSS-DOM-0.02/
Document Object Model for Cascading Style Sheets 
----
Cache-Memcached-Managed-0.20
http://search.cpan.org/~elizabeth/Cache-Memcached-Managed-0.20/
provide API for managing cached information 
----
Compress-unLZMA-0.02
http://search.cpan.org/~ferreira/Compress-unLZMA-0.02/
Interface to LZMA decompression library 
----
Config-Model-0.623
http://search.cpan.org/~ddumont/Config-Model-0.623/
Framework to create configuration validation tools and editors 
----
Config-Model-TkUI-0.105
http://search.cpan.org/~ddumont/Config-Model-TkUI-0.105/
Tk GUI to edit config data through Config::Model 
----
Data-CloudWeights-0.2.48
http://search.cpan.org/~pjfl/Data-CloudWeights-0.2.48/
Calculate values for an HTML tag cloud 
----
Data-ResourceSet-0.00003
http://search.cpan.org/~dmaki/Data-ResourceSet-0.00003/
A Bundle Of Resources 
----
DateTime-Locale-0.4001
http://search.cpan.org/~drolsky/DateTime-Locale-0.4001/
Localization support for DateTime.pm 
----
Devel-CoverX-Covered-0.009
http://search.cpan.org/~johanl/Devel-CoverX-Covered-0.009/
Collect and report caller (test file) and covered (source file) statistics from the cover_db 
----
Devel-Profit-0.33
http://search.cpan.org/~lbrocard/Devel-Profit-0.33/
----
Egg-Release-3.12
http://search.cpan.org/~lushe/Egg-Release-3.12/
Version of Egg WEB Application Framework. 
----
Egg-Release-3.13
http://search.cpan.org/~lushe/Egg-Release-3.13/
Version of Egg WEB Application Framework. 
----
HTML-DOM-0.011
http://search.cpan.org/~sprout/HTML-DOM-0.011/
A Perl implementation of the HTML Document Object Model 
----
HTML-FormWidgets-0.1.37
http://search.cpan.org/~pjfl/HTML-FormWidgets-0.1.37/
Create HTML form markup 
----
Ham-APRS-FAP-1.12
http://search.cpan.org/~hessu/Ham-APRS-FAP-1.12/
Finnish APRS Parser (Fabulous APRS Parser) 
----
IO-Async-0.14
http://search.cpan.org/~pevans/IO-Async-0.14/
a collection of modules that implement asynchronous filehandle IO 
----
IO-Lambda-0.16
http://search.cpan.org/~karasik/IO-Lambda-0.16/
non-blocking I/O in lambda style 
----
Locale-PO-0.21
http://search.cpan.org/~ken/Locale-PO-0.21/
Perl module for manipulating .po entries from GNU gettext 
----
MRO-Compat-0.06_01
http://search.cpan.org/~blblack/MRO-Compat-0.06_01/
mro::* interface compatibility for Perls < 5.9.5 
----
Module-Optional-0.03
http://search.cpan.org/~ivorw/Module-Optional-0.03/
Breaking module dependency chains 
----
MooseX-InsideOut-0.003
http://search.cpan.org/~hdp/MooseX-InsideOut-0.003/
inside-out objects with Moose 
----
Net-IMAP-Server-0.7
http://search.cpan.org/~alexmv/Net-IMAP-Server-0.7/
A single-threaded multiplexing IMAP server implementation, using Net::Server::Coro. 
----
ORLite-0.02
http://search.cpan.org/~adamk/ORLite-0.02/
Extremely light weight SQLite-specific ORM 
----
POE-Component-Client-NNTP-2.08
http://search.cpan.org/~bingos/POE-Component-Client-NNTP-2.08/
A POE component that implements an RFC 977 NNTP client. 
----
POE-Component-Client-Pastebot-1.04
http://search.cpan.org/~bingos/POE-Component-Client-Pastebot-1.04/
Interact with Bot::Pastebot web services from POE. 
----
POE-Component-Client-SOCKS-0.10
http://search.cpan.org/~bingos/POE-Component-Client-SOCKS-0.10/
SOCKS enable any POE Component 
----
POE-Component-Proxy-SOCKS-0.08
http://search.cpan.org/~bingos/POE-Component-Proxy-SOCKS-0.08/
A POE based SOCKS 4 proxy server. 
----
POE-Filter-IRCD-2.38
http://search.cpan.org/~bingos/POE-Filter-IRCD-2.38/
A POE-based parser for the IRC protocol. 
----
PPI-1.204_01
http://search.cpan.org/~adamk/PPI-1.204_01/
Parse, Analyze and Manipulate Perl (without perl) 
----
PPIx-LineToSub-0.33
http://search.cpan.org/~lbrocard/PPIx-LineToSub-0.33/
Find the package and subroutine by line 
----
Parse-RecDescent-Topiary-0.05
http://search.cpan.org/~ivorw/Parse-RecDescent-Topiary-0.05/
tree surgery for Parse::RecDescent autotrees 
----
PerlIO-Util-0.13
http://search.cpan.org/~gfuji/PerlIO-Util-0.13/
A selection of general PerlIO utilities 
----
Sub-Identify-0.03
http://search.cpan.org/~rgarcia/Sub-Identify-0.03/
Retrieve names of code references 
----
TAP-Formatter-HTML-0.03
http://search.cpan.org/~spurkis/TAP-Formatter-HTML-0.03/
TAP Test Harness output delegate for html output 
----
Test-DBUnit-0.04
http://search.cpan.org/~adrianwit/Test-DBUnit-0.04/
Database test framework. 
----
Test-DBUnit-0.05
http://search.cpan.org/~adrianwit/Test-DBUnit-0.05/
Database test framework. 
----
Test-GlassBox-Heavy-0.03
http://search.cpan.org/~oliver/Test-GlassBox-Heavy-0.03/
Non-invasive testing of subroutines within Perl programs 
----
Test-Reporter-1.40
http://search.cpan.org/~dagolden/Test-Reporter-1.40/
sends test results to cpan-testers@perl.org 
----
WebService-Google-Language-0.02
http://search.cpan.org/~hma/WebService-Google-Language-0.02/
Perl interface to the Google AJAX Language API 
----
Wx-0.83
http://search.cpan.org/~mbarbon/Wx-0.83/
interface to the wxWidgets cross-platform GUI toolkit 
----
autobox-2.50
http://search.cpan.org/~chocolate/autobox-2.50/
call methods on native types 
----
dan-0.551.2
http://search.cpan.org/~yappo/dan-0.551.2/
The literal unread 
----
openStatisticalServices-0.012
http://search.cpan.org/~rphaney/openStatisticalServices-0.012/
----
openStatisticalServices-0.013
http://search.cpan.org/~rphaney/openStatisticalServices-0.013/


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: Mon, 19 May 2008 16:37:01 -0700
From: "Gordon Etly" <gordon@ .>
Subject: Re: Perl 6
Message-Id: <69eh8vF32f7v1U1@mid.individual.net>

John Bokma wrote:
> "Gordon Etly" <g.etly@bentsys.INVALID.com> wrote:
> > John Bokma wrote:

> > While I mostly agree, I still believe that if one feels they are
> > going to reply in a negative manner, it may be better just not to
> > post.

> Yes, I have tried that as well, and decided to give up on Usenet
> entirely (well, almost). Too many people who want free help on their
> own terms. I don't mind the free part, but I do mind that instead of a
> "thank you" one might get a personal attack instead.


I don't really see all that many people who come to seek help suddenly 
spurring into a personal attack, and when they do, it is often in 
response to a sour reply they got from someone who found it necessarily 
to make a less-than-helpful remark.

Yes, there are many ungrateful people out there, but at the same time 
there are some people, some of which can be otherwise helpful, who end 
up instigating a flame war they latter blame on the original poster, all 
of which could of been prevented has that regular simply ignored that 
post or thread and moved on to the next. I've seen this happen far too 
often over the past decade and a half. It's far too easy to blame people 
who do not have established reputations.


> > The worst part about how people like post is they act as if someone 
> > is
> > forcing them to post, when the reality is they could just move on to
> > another post or take a break in general. It seems people who are
> > otherwise quite helpful, when they start posting negatively, they
> > lose focus on the helping aspect.

> People who want to help often get carried away: they have reserved a
> certain amount of time to post every day, and if there is nothing to
> post, they look closer at other posts. At least that's how it works
> for me.


That isn't an excuse for post in a needlessly negative manner. It 
doesn't serve anyone and too often it takes threads in the wrong 
direction.


> > > But why the hurry? PHP is at version 6, (or is it 7 already) and
> > > from what I've heard their Unicode support is still flaky.

> > According to http://www.php.net/downloads.php, the currently stable
> > release is 5.2.6, so unless you're referring to the minor part, I'm
> > not usre where you got those numbers.

> <http://blog.agoraproduction.com/index.php?/archives/19-Installing-PHP6-
> F or-beginners.html>
>
> Written almost 1.5 years ago.


That doesn't change the fact the newest I can find is 5.2.6, so I have 
conclude that that article is mistaken.


-- 
G.Etly 




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

Date: Tue, 20 May 2008 03:00:01 +0000 (UTC)
From: benkasminbullock@gmail.com (Ben Bullock)
Subject: Re: Perl 6
Message-Id: <g0terh$1i7$1@ml.accsnet.ne.jp>

John Bokma <john@castleamber.com> wrote:
> Yes, I have tried that as well, and decided to give up on Usenet
> entirely (well, almost).

Typical addict talk. If you were going to give up you would have given
up already instead of keeping on posting (three times now) about how
you're going to give up. I'll bet you even post a followup to this.

> Too many people who want free help on their own terms.

Aw shucks!

> I don't mind the free part, but I do mind that instead of a
> "thank you" one might get a personal attack instead. 

What I have seen here is lots of people coming in to get help and then
getting fairly unpleasant responses from some of the "regulars". It's
hardly surprising that people are often too scared to post a follow
up.
 
> Yup, the people who need help insist too hard on getting help, and
> forgot often that this is not a help desk.

I don't notice it. What I notice here as a general pattern is that
many random people come in, ask just one question, then leave.  I'm
sure that the reason some of them leave is because they're alarmed or
confused by many of the responses they get.

> People who want to help often
> get carried away: they have reserved a certain amount of time to post
> every day, and if there is nothing to post, they look closer at other
> posts.

Translation: the "regulars" get bored and decide to start harassing
people, following up posters with lots of pointless, whiney complaints
about trivial things.

> I learned Perl with Perl 4, and to me it was not a big step to Perl 5.
> All new things where just - to me, and what I can recall from that time
> - logical extensions to Perl 4. With Perl 6 I don't have that feeling.
> To me it looks more like a new language based on Perl 5. (Or: a logical
> rewrite of Perl 5 instead of a logical extension). 

My guess is that you don't really know anything about Perl 6, so
perhaps your IMNSHO should be IMHO.

--
perl -e'@a=qw/Harder Better Faster Stronger/;use Time::HiRes "ualarm";$|=1;
$t=432250;@v=("Work It","Make It","Do It","Makes Us");sub w{("")x$_[0]}@z=(0,2,
4,6);@f=split"/","More Than/Ever/Hour/After/Our/Work Is/Never/Over";@e=((map{
join(":",@f[$_,$_+1])}@z),"");@w=map"$v[$_]:$a[$_]",0..3;@h=(@w,@e);@j=w(5);
@t=(@v,@j,@a,@j);@l=(@t,@f[@z],@j,(map{$f[$_+1]}@z),@j,@t,@w,@j,@e,w(4),
(@h)x6,w(9),(@h)x7);ualarm$t,$t;$SIG{ALRM}=\&b;while(1){}sub b{print p()}
sub p{if(($c++)%2){exit if!@l;if($_=shift@l){if(/(.*):(.*)/){$s=$2;$1}else{
"$_\n"}}}elsif($s){" $s\n",$s=""}}'


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

Date: Mon, 19 May 2008 23:43:32 -0700 (PDT)
From: Yogi <yogeshkagrawal@gmail.com>
Subject: Perl equivalent of htmlspecialchars()
Message-Id: <6434cd5f-1113-4ab1-b537-13ccc71ee2f7@u36g2000prf.googlegroups.com>

Hi,

I am looking for perl equivalent of PHP functions htmlspecialchars()
and stripslashes() to parse a html page.  Any pointers will be of
great help.

Regards,
-Yogesh


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

Date: Tue, 20 May 2008 03:00:03 +0000 (UTC)
From: benkasminbullock@gmail.com (Ben Bullock)
Subject: Re: pop langs website ranking
Message-Id: <g0terj$1i7$2@ml.accsnet.ne.jp>

In comp.lang.perl.misc xahlee@gmail.com <xahlee@gmail.com> wrote:
> In February, i spent few hours researching the popularity of some
> computer language websites.

One way to do such research is for you to publish the actual number of
hits on your website. It's also easy to analyze logfile data with free
tools like analog or awstats, and publish the number of unique
visitors, pages hit, bandwidth, etc. It would also be possible for you
to work out how accurate the Alexa numbers actually are compared to
the numbers you see in your logs.


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

Date: Tue, 20 May 2008 06:12:04 GMT
From: tadmc@seesig.invalid
Subject: Posting Guidelines for comp.lang.perl.misc ($Revision: 1.8 $)
Message-Id: <UYtYj.4077$ah4.588@flpi148.ffdc.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: Mon, 19 May 2008 23:56:19 GMT
From: Jürgen Exner <jurgenex@hotmail.com>
Subject: Re: script to find the files with very long names
Message-Id: <d94434hooi2jh36ger39usqo47ro1vhtfo@4ax.com>

dkcombs@panix.com (David Combs) wrote:
>In article <4812C50A.2010409@lsupcaemnt.com>,
>Ed Morton  <morton@lsupcaemnt.com> wrote:
>>On 6/12/2006 2:34 AM, pui ming Wong wrote:
>>> My objective is to go down the current directory
>>> and have the system tells me which files have their names
>>> longer than say 26 characters
>>> 
>>> i think mixing the unix find command 
>>> with some other commands might do it.
>>> But a perl script might do it more tidily and faster ?
>>
>>find . -name "??????????????????????????*"

Ouch! 

Ok, here's a fish:

use strict; use warnings;
use File::Find;
sub wanted{print "$_\n" if length>26;}
find(\&wanted, '.');

jue


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

Date: Mon, 19 May 2008 19:03:37 -0700 (PDT)
From: hotkitty <stpra123@gmail.com>
Subject: Server-side modules
Message-Id: <1681c076-6f14-4039-bbdf-3fab9a08da7d@8g2000hse.googlegroups.com>

I am trying to setup a script on my server (godaddy.com, if anyone has
any experience w/ them) and have been ripping my hair out the past
couple of days trying to figure it out. My guess is that the problem
lies in the "Undefined subroutine &utf8::is_utf8 called" but I have no
idea how to correct it. When I run the script on my local machine
everything runs perfectly. When I upload it to the server I get the
following errors (obviously, I;ve cut out a portion that contains some
of the more sensitive details of my site, but you get the idea):

Undefined subroutine &utf8::is_utf8 called at /var/chroot/home/
content/........./html/cgi/modules/lib/Carp/Heavy.pm line 122.
Compilation failed in require at /var/chroot/home/content/.........//
html/cgi/modules/lib/HTML/Entities.pm line 147.
Compilation failed in require at /var/chroot/home/content/.........//
html/cgi/modules/lib/HTML/TokeParser.pm line 11.
BEGIN failed--compilation aborted at /var/chroot/home/
content/.........//html/cgi/modules/lib/HTML/TokeParser.pm line 11.
Compilation failed in require at /var/chroot/home/content/.........//
html/cgi/cctest.pl line 6.
BEGIN failed--compilation aborted at /var/chroot/home/
content/.........//html/cgi/cctest.pl line 6.


I even tried to upload the modules I am using and still get the error.
I haven't a clue how to resolve it. Here's the script:


#!/usr/bin/perl -T
use lib "/var/chroot/home/content/....../html/cgi/modules/lib";
use warnings;

use LWP::Simple;
use HTML::TokeParser;
use PDF::API2;
use PDF::API2::Simple;
print "Working it.......";
 ...
 ...
 ..
 ..
 ..
 .
 .
 .
 .


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

Date: Mon, 19 May 2008 16:22:08 -0700 (PDT)
From: Slickuser <slick.users@gmail.com>
Subject: Re: Tk with Thread
Message-Id: <97f78235-7241-4d69-8394-1ac1c081eeab@59g2000hsb.googlegroups.com>

So I should used threads and not Thread?

Also, I look at fork. Will this help me?

Thanks.

On May 14, 6:19 pm, Ben Morrow <b...@morrow.me.uk> wrote:
> QuothSlickuser<slick.us...@gmail.com>:
>
> > I am currently using perl, v5.8.8 built for MSWin32-x86-multi-thread.
>
> > I have a Button on my GUI, when I pressed the button. It will parse
> > some file.
> > The parsing will run but my GUI will freeze. Once it's done parsing, I
> > can control my GUI again.
>
> A straightforward way around this is to call $mainwindow->update
> periodically during the processing. This can, however, be a little
> tricky to arrange, depending on what the parsing consists of.
>
> > Is there a way to use Thread so my parsing is running and I can still
> > use my GUI?
>
> Don't use Thread. It was part of the old 5005threads model that came
> with 5.5; in 5.8 it is just a pass-through for threads.
>
> > I was looking athttp://visitorflow.com/perl/lib/Thread.html
>
> It's best to read the documentation that comes with your version of
> perl. That page appears to belong with 5.6.0: a lot has changed since
> then, particularly wrt threads.
>
> > But it doesn't work for me. I also try 'threads' as well.
>
> 'Doesn't work' is not a helpful problem description. Please reduce your
> program to a minimal example (preferably just aTkwindow with a single
> button, and a sub that calls something like 'sleep 500' to simulate the
> parsing) and post it. Also describe what it is doing that you don't
> expect.
>
> Tkwill work in multithreaded programs, but be sure to only access theTkobjects from one thread.Tkitself isn't threadsafe.
>
> Ben
>
> --
> And if you wanna make sense / Whatcha looking at me for?          (Fiona Apple)
>                             * b...@morrow.me.uk *



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

Date: Tue, 20 May 2008 01:25:48 +0200
From: Joost Diepenmaat <joost@zeekat.nl>
Subject: Re: Tk with Thread
Message-Id: <87k5hpswoz.fsf@zeekat.nl>

Slickuser <slick.users@gmail.com> writes:

> So I should used threads and not Thread?

Yes. And make sure you've got a recent version of perl.

> Also, I look at fork. Will this help me?

Maybe. You could also check out Tk::fileevent, perlopentut, and
IO::AIO on CPAN.

-- 
Joost Diepenmaat | blog: http://joost.zeekat.nl/ | work: http://zeekat.nl/


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

Date: Mon, 19 May 2008 16:57:14 -0700 (PDT)
From: Slickuser <slick.users@gmail.com>
Subject: Re: Tk with Thread
Message-Id: <379b2e96-4955-432f-a626-9cd2cb3a8f9c@27g2000hsf.googlegroups.com>

Here is a sample code:

use strict;
use warnings;
use Tk;
use threads;

my $mainWindow = MainWindow->new;
my $textBox = $mainWindow->Scrolled("Text", -width=>80, -height=>7, -
scrollbars=>"ose", -wrap=>"word")->pack();

$mainWindow->Button(-foreground=>"blue", -text=>"Click", -command=>
\&excecute)->pack();

MainLoop;

sub excecute
{
	my $thr = threads->new(\&click);
	$thr->join;
	$thr->detach;
}

sub click
{

	open(FILE,"C:/file.txt") or die "can't open\n";
	while(<FILE>)
	{
		my $line = $_;

		$textBox->insert('end', "$line\n");
		$textBox->see('end');
		$textBox->update;
	}
	return;
}


I got the following error:
Tk::Error: Can't call method "WidgetMethod" on an undefined value at
C:/Perl/sit
e/lib/Tk.pm line 252, <FILE> line 5568.
 [set,{}]
 (vertical scrolling command executed by text)
Tk::Error: Can't call method "WidgetMethod" on an undefined value at
C:/Perl/sit
e/lib/Tk.pm line 252, <FILE> line 5807.
 [set,{}]
 (vertical scrolling command executed by text)
Terminating on signal SIGINT(2)




On May 19, 4:25 pm, Joost Diepenmaat <jo...@zeekat.nl> wrote:
> Slickuser<slick.us...@gmail.com> writes:
> > So I should used threads and not Thread?
>
> Yes. And make sure you've got a recent version of perl.
>
> > Also, I look at fork. Will this help me?
>
> Maybe. You could also check outTk::fileevent, perlopentut, and
> IO::AIO on CPAN.
>
> --
> Joost Diepenmaat | blog:http://joost.zeekat.nl/| work:http://zeekat.nl/



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

Date: Tue, 20 May 2008 02:03:23 +0200
From: Joost Diepenmaat <joost@zeekat.nl>
Subject: Re: Tk with Thread
Message-Id: <87fxsdsuyc.fsf@zeekat.nl>

Slickuser <slick.users@gmail.com> writes:

 > Here is a sample code:
>
> use strict;
> use warnings;
> use Tk;
> use threads;
>
> my $mainWindow = MainWindow->new;
> my $textBox = $mainWindow->Scrolled("Text", -width=>80, -height=>7, -
> scrollbars=>"ose", -wrap=>"word")->pack();
>
> $mainWindow->Button(-foreground=>"blue", -text=>"Click", -command=>
> \&excecute)->pack();
>
> MainLoop;
>
> sub excecute
> {
> 	my $thr = threads->new(\&click);
> 	$thr->join;
> 	$thr->detach;
> }
>
> sub click
> {
>
> 	open(FILE,"C:/file.txt") or die "can't open\n";
> 	while(<FILE>)
> 	{
> 		my $line = $_;
>
> 		$textBox->insert('end', "$line\n");
> 		$textBox->see('end');
> 		$textBox->update;
> 	}
> 	return;
> }

You shouldn't expect to be able to close over or otherwise refer to
objects in multiple threads, unless the docs for those objects
explictely say you can.

IOW: perl threads do not work like C/Java type low-level threads, and
mostly you want to minimize the communication between them.

-- 
Joost Diepenmaat | blog: http://joost.zeekat.nl/ | work: http://zeekat.nl/


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

Date: Mon, 19 May 2008 17:16:44 -0700 (PDT)
From: Slickuser <slick.users@gmail.com>
Subject: Re: Tk with Thread
Message-Id: <18f89eb3-626f-47f1-b12b-cd8770c6c997@m36g2000hse.googlegroups.com>

Here is the update code with the same error.

I would like to be able to move my Tk window when a button is press.
Currently, it's freeze until it's done parsing.

use strict;
use warnings;
use Tk;
use threads;

my $mainWindow = MainWindow->new;
my $textBox = $mainWindow->Scrolled("Text", -width=>80, -height=>7, -
scrollbars=>"ose", -wrap=>"word")->pack();

$mainWindow->Button(-foreground=>"blue", -text=>"Click", -command=>
\&excecute)->pack();

MainLoop;

sub excecute
{
	my $thr = threads->new(\&click);
	$thr->join;
	#$thr->detach;
}

sub click
{
	my @data;

	open(FILE,"C:/file.txt") or die "can't open\n";
	while(<FILE>)
	{
		my $line = $_;
		push(@data,$line);
	}
	close(FILE);

	$textBox->insert('end', "@data\n");
	$textBox->see('end');
	$textBox->update;

	return;
}

On May 19, 4:57 pm, Slickuser <slick.us...@gmail.com> wrote:
> Here is a sample code:
>
> use strict;
> use warnings;
> use Tk;
> use threads;
>
> my $mainWindow = MainWindow->new;
> my $textBox = $mainWindow->Scrolled("Text", -width=>80, -height=>7, -
> scrollbars=>"ose", -wrap=>"word")->pack();
>
> $mainWindow->Button(-foreground=>"blue", -text=>"Click", -command=>
> \&excecute)->pack();
>
> MainLoop;
>
> sub excecute
> {
>         my $thr = threads->new(\&click);
>         $thr->join;
>         $thr->detach;
>
> }
>
> sub click
> {
>
>         open(FILE,"C:/file.txt") or die "can't open\n";
>         while(<FILE>)
>         {
>                 my $line = $_;
>
>                 $textBox->insert('end', "$line\n");
>                 $textBox->see('end');
>                 $textBox->update;
>         }
>         return;
>
> }
>
> I got the following error:
> Tk::Error: Can't call method "WidgetMethod" on an undefined value at
> C:/Perl/sit
> e/lib/Tk.pm line 252, <FILE> line 5568.
>  [set,{}]
>  (vertical scrolling command executed by text)
> Tk::Error: Can't call method "WidgetMethod" on an undefined value at
> C:/Perl/sit
> e/lib/Tk.pm line 252, <FILE> line 5807.
>  [set,{}]
>  (vertical scrolling command executed by text)
> Terminating on signal SIGINT(2)
>
> On May 19, 4:25 pm, Joost Diepenmaat <jo...@zeekat.nl> wrote:
>
> > Slickuser<slick.us...@gmail.com> writes:
> > > So I should used threads and not Thread?
>
> > Yes. And make sure you've got a recent version of perl.
>
> > > Also, I look at fork. Will this help me?
>
> > Maybe. You could also check outTk::fileevent, perlopentut, and
> > IO::AIO on CPAN.
>
> > --
> > Joost Diepenmaat | blog:http://joost.zeekat.nl/|work:http://zeekat.nl/



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

Date: Tue, 20 May 2008 01:12:19 +0100
From: Ben Morrow <ben@morrow.me.uk>
Subject: Re: Tk with Thread
Message-Id: <3kh9g5-d4i1.ln1@osiris.mauzo.dyndns.org>

[please quote properly]

Quoth Slickuser <slick.users@gmail.com>:
> So I should used threads and not Thread?

Yes.

> Also, I look at fork. Will this help me?
> 
> On May 14, 6:19 pm, Ben Morrow <b...@morrow.me.uk> wrote:
> > QuothSlickuser<slick.us...@gmail.com>:
> >
> > > I am currently using perl, v5.8.8 built for MSWin32-x86-multi-thread.
                                                
Since you are on Win32, no. Win32 doesn't provide fork, and perl
emulates it using threads. If you aren't trying to write code which is
portable to Unix, it's probably better to use threads directly.

Ben

-- 
It will be seen that the Erwhonians are a meek and long-suffering people,
easily led by the nose, and quick to offer up common sense at the shrine of
logic, when a philosopher convinces them that their institutions are not based 
on the strictest morality.  [Samuel Butler, paraphrased]       ben@morrow.me.uk


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

Date: Tue, 20 May 2008 03:00:05 +0000 (UTC)
From: benkasminbullock@gmail.com (Ben Bullock)
Subject: Re: Using Win32::OLE(?in?)
Message-Id: <g0terl$1i7$3@ml.accsnet.ne.jp>

Cosmic Cruizer <XXjbhuntxx@white-star.com> wrote:
> Everyday I'm finding out more and more I can do with Win32::OLE(?in?) to 
> help me manage and review remote servers. It's turning out to be a great 
> tool to gather information for documentation and troubleshooting.
> 
> With everything I've already done, I know there must be a huge number of 
> other objects I don't even know exist. Is there somewhere online that lists  
> all of the objects and gives a brief description on each one?

I don't know about online, but usually OLE is automating "something",
so you need to go and look at the documentation for "something" to
find out what objects and methods it's got. Perl documentation won't
help. I usually have to work with Microsoft Office programs like Word,
Outlook, and Excel so I go to the "Object browser" in the Visual Basic
Editor to get information.



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

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


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