[28734] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 10098 Volume: 10

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Wed Dec 27 03:06:10 2006

Date: Wed, 27 Dec 2006 00:05:15 -0800 (PST)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)

Perl-Users Digest           Wed, 27 Dec 2006     Volume: 10 Number: 10098

Today's topics:
    Re: Blather-Adjusting Programs <grammatim@verizon.net>
    Re: Blather-Adjusting Programs vjp2.at@at.BioStrategist.dot.dot.com
        Finding directory in file list. mihirtr@gmail.com
    Re: Finding directory in file list. <mritty@gmail.com>
    Re: Finding directory in file list. <joe@inwap.com>
        HTTP POST without LWP <pratap.ram@gmail.com>
    Re: HTTP POST without LWP <tadmc@augustmail.com>
    Re: HTTP POST without LWP <john@castleamber.com>
        Meta-issue - don't use valid domains that aren't yours (Randal L. Schwartz)
        new CPAN modules on Wed Dec 27 2006 (Randal Schwartz)
    Re: perl better than python for users with disabilities <nnorwitz@gmail.com>
    Re: Perl Code Connects to Database Across IP and Not Ho rminnis82@hotmail.com
        Perl equivalent to the following shell operation. <cdalten@gmail.com>
    Re: Perl equivalent to the following shell operation. <cdalten@gmail.com>
    Re: Using clearcase command in perl script mnt006@gmail.com
    Re: Using clearcase command in perl script <mritty@gmail.com>
    Re: Want to create a website using perl and CGI <jgibson@mail.arc.nasa.gov>
        Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)

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

Date: 26 Dec 2006 16:20:17 -0800
From: "Peter T. Daniels" <grammatim@verizon.net>
Subject: Re: Blather-Adjusting Programs
Message-Id: <1167178816.961697.55560@i12g2000cwa.googlegroups.com>


Harlan Messinger wrote:
> vjp2.at@at.BioStrategist.dot.dot.com wrote:
> >    You folks mean to tell me there's no program out there that would take a
> > file of simple text and blatherise it to the level of another "reference"
> > file?
>
> "You folks mean?" Did someone here (sci.lang) say that?
>
> > Or Adjust the "Fog Index" of a text file up or down from its input
> > level. I'm totally serious. I'm tired of fighting.  I just want to "get
> > along".
>
> Fighting what?
>
> >    I have one idea: you score each verb and noun on, say, five, different
> > scales, then you pile on similarly ranked adverbs and adjectives until you
> > meet the volume requirement. Or you remove accordingly. In MS-Word type
> > environments, you score less necessary modifiers, say , with orange-colored
> > undersquiggles, the less necessary, the more undersquiggles.
>
> If it's so simple, go ahead and make it happen.
>
> (Are you under the impression that software exists that has that degree
> of facility with human language?)

He's a rwnc who frequently posts off-topic political assertions at
nyc.transit, but does sometimes discuss NY transit..



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

Date: Wed, 27 Dec 2006 07:53:37 +0000 (UTC)
From: vjp2.at@at.BioStrategist.dot.dot.com
Subject: Re: Blather-Adjusting Programs
Message-Id: <emt8q1$fev$1@reader2.panix.com>

   I have seen programs which can be called "proof of concept".  I'm not as
familiar with natural language processing, though I have seen many
unfulfilled promises about it.  (What I most need it to do is take the prose
of heavily filtered press releases and simplify entering its valuable info
into my contact manager.)  Usually it takes a few generations, usually three
for a type of program to go from "proof of concept" to "production". 
Microsoft Beijing has developed search engines that can determine the 
user's gender from the structure of the query. 

   I genuinely do seek a tool to ease my having to deal with pompous people
who refuse to accept simple language, but go out of their way to demand
pompous blather. Such people do exist, and unfortunately their number is
growing rapidly (which admittedly bodes ill for our national productuvity).

*+-a rwnc who frequently posts off-topic political assertions at

That's the New Gorista Way of explaining away "inconvenient" opponents..

So much for their believing in free speech..

I always asserted privacy and free speech are mutually exclusive, 
and such people seem determined to prove me correct..

				    - = -
 Vasos Panagiotopoulos, Columbia'81+, Reagan, Mozart, Pindus, BioStrategist
	   http://ourworld.compuserve.com/homepages/vjp2/vasos.htm
  ---{Nothing herein constitutes advice.  Everything fully disclaimed.}---
   [Homeland Security means private firearms not lazy obstructive guards]
 [Urb sprawl confounds terror] [Remorse begets zeal] [Windows is for Bimbos]


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

Date: 26 Dec 2006 09:36:52 -0800
From: mihirtr@gmail.com
Subject: Finding directory in file list.
Message-Id: <1167154612.580519.67610@48g2000cwx.googlegroups.com>

Hi,
 I am using perl's find command to find list of files, sub-directories.
I have storred it in local array. Following how it looks.

   find (sub{push @dirList, $File::Find::name},$localdir);

where $localdir is directory from where I want to find list of files,
diretories.
@dirList is array which contains this list.

I want to perform specific function if the element in @dirList is a
file and perform some other function if element is a directory. Is
there a way to distinguish between file and directory in this list?

Thanks.



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

Date: 26 Dec 2006 09:38:51 -0800
From: "Paul Lalli" <mritty@gmail.com>
Subject: Re: Finding directory in file list.
Message-Id: <1167154731.838543.28170@h40g2000cwb.googlegroups.com>

mihi...@gmail.com wrote:

> I want to perform specific function if the element in @dirList is a
> file and perform some other function if element is a directory. Is
> there a way to distinguish between file and directory in this list?

perldoc -f -X

Paul Lalli



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

Date: Wed, 27 Dec 2006 00:04:23 -0800
From: Joe Smith <joe@inwap.com>
Subject: Re: Finding directory in file list.
Message-Id: <QP2dnXh8s7uQtA_YnZ2dnUVZ_ue3nZ2d@comcast.com>

mihirtr@gmail.com wrote:

>    find (sub{push @dirList, $File::Find::name},$localdir);
> 
> I want to perform specific function if the element in @dirList is a
> file and perform some other function if element is a directory. Is
> there a way to distinguish between file and directory in this list?

I would make that distinction before putting the name into an array.

   use File::Find;
   find(sub {push @{-d $_ ? \@dirs : \@files}, $File::Find::name}, $localdir);
   print "$_ is a directory\n"     foreach @dirs;
   print "$_ is not a directory\n" foreach @files;

	-Joe



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

Date: 26 Dec 2006 15:07:36 -0800
From: "pratap" <pratap.ram@gmail.com>
Subject: HTTP POST without LWP
Message-Id: <1167174455.973606.183580@i12g2000cwa.googlegroups.com>

Hi,

I am trying to write a script to do a HTTP POST. So, I tried doing it
using LWP and it worked. The problem is, the computer in which I will
be running this code cannot not have LWP. So, I have to do it without
LWP. So, I can think of a couple of options that I have,

1. I can write the "HTTP POST" code using sockets ... which I assume
would take a lot of time to make the packets (or is it simply
$sock->send("POST http://a.com/abc.php in1=val1&in2=val ") or some
such?).

2. I can run LWP in another computer (with LWP) and take a "packet
dump" like ToString of the Object, and pass this information to the
actual machine. But I do not know how to do this.

I am a newbie so any help or suggestions for the above would be great.
Thanks a lot.
-Pratap



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

Date: Tue, 26 Dec 2006 17:51:37 -0600
From: Tad McClellan <tadmc@augustmail.com>
Subject: Re: HTTP POST without LWP
Message-Id: <slrnep3dc9.ag5.tadmc@tadmc30.august.net>

pratap <pratap.ram@gmail.com> wrote:

> The problem is, the computer in which I will
> be running this code cannot not have LWP.


Why not?


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


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

Date: 27 Dec 2006 03:38:15 GMT
From: John Bokma <john@castleamber.com>
Subject: Re: HTTP POST without LWP
Message-Id: <Xns98A5DC1BDB2A1castleamber@130.133.1.4>

"pratap" <pratap.ram@gmail.com> wrote:

> Hi,
> 
> I am trying to write a script to do a HTTP POST. So, I tried doing it
> using LWP and it worked. The problem is, the computer in which I will
> be running this code cannot not have LWP.

Doubtful. You can always install the module in a user specific location, 
together with your script.

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

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


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

Date: 26 Dec 2006 11:11:04 -0800
From: merlyn@stonehenge.com (Randal L. Schwartz)
To: vjp2@BioStrategist.com
Subject: Meta-issue - don't use valid domains that aren't yours
Message-Id: <86ac1ajwvr.fsf@blue.stonehenge.com>


>>>>> "vjp2" == vjp2 at <vjp2.at@at.BioStrategist.dot.dot.com> writes:
[blather]

When you're making up spam-proofed addresses, be careful that you
either have an invalid syntax (hard to do!) or use .invalid or example.com.

Because otherwise, unlesss you actually know this guy:

    Registrant:
    Bob Gustwick Assoc.
       POB 301660
       Austin, TX 78703
       US

       Domain Name: DOT.COM

       Administrative Contact, Technical Contact:
          Gustwick, Bob		rt_tech@REALTIME.NET
          Real/Time Communications
          POB 301660
          Austin, TX 78703
          US
          +1 512 451 0046 fax: +1 512 459 3858

then you've polluted *his* legal namespace with your made-up name.

Don't do that.

Remember the rule of domain names... if it's legal, it's taken.
(Even com.com is taken... it belongs to CNet, so they can say news.com.com.)

Just another guy who has been around Usenet since 1981 (yeah, old-timer),
-- 
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<merlyn@stonehenge.com> <URL:http://www.stonehenge.com/merlyn/>
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!

-- 
Posted via a free Usenet account from http://www.teranews.com



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

Date: Wed, 27 Dec 2006 05:42:10 GMT
From: merlyn@stonehenge.com (Randal Schwartz)
Subject: new CPAN modules on Wed Dec 27 2006
Message-Id: <JAx3uA.xJG@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.

Algorithm-RabinKarp-0.41
http://search.cpan.org/~nnunley/Algorithm-RabinKarp-0.41/
Rabin-Karp streaming hash
----
AxKit-App-TABOO-0.51
http://search.cpan.org/~kjetilk/AxKit-App-TABOO-0.51/
Object Oriented Publishing Framework for AxKit
----
Class-TransparentFactory-0.01
http://search.cpan.org/~gaal/Class-TransparentFactory-0.01/
Transparently choose a provider class with an automatic facade
----
Crypt-SSLeay-0.53
http://search.cpan.org/~dland/Crypt-SSLeay-0.53/
OpenSSL glue that provides LWP https support
----
DBIx-Class-DigestColumns-Lite-0.01
http://search.cpan.org/~nekokak/DBIx-Class-DigestColumns-Lite-0.01/
easy to use Digest Value for DBIx::Class
----
Image-Pngslimmer-0.01
http://search.cpan.org/~acmcmen/Image-Pngslimmer-0.01/
slims (dynamically created) PNGs
----
LaTeX-Pod-0.04
http://search.cpan.org/~schubiger/LaTeX-Pod-0.04/
Transform LaTeX source files to POD (Plain old documentation)
----
Statistics-Smoothing-SGT-2.0.2
http://search.cpan.org/~bjoernw/Statistics-Smoothing-SGT-2.0.2/
A Simple Good-Turing (SGT) smoothing implementation
----
Time-LST-0.02
http://search.cpan.org/~rgarton/Time-LST-0.02/
Convert datetime representations to local sidereal time via Astro-Time
----
threads-1.57
http://search.cpan.org/~jdhedden/threads-1.57/
Perl interpreter-based 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/>
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!


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

Date: 26 Dec 2006 10:34:32 -0800
From: "nnorwitz@gmail.com" <nnorwitz@gmail.com>
Subject: Re: perl better than python for users with disabilities?
Message-Id: <1167158072.767316.31940@a3g2000cwd.googlegroups.com>

Dan Jacobson wrote:
> Can I feel even better about using perl vs. python, as apparently
> python's dependence of formatting, indentation, etc. vs. perl's
> "(){};" etc. makes writing python programs perhaps very device
> dependent. Whereas perl can be written on a tiny tiny screen, and can
> withstand all kinds of users with various disabilities, etc.?
> Also perl is easier to squeeze into makefiles.

My esteemed colleague does not agree.
http://googleblog.blogspot.com/2006/07/finding-easy-to-read-web-content_20.html

Reposted with permission:

"""
As for programming in Python while not being able to see, I think
it comes down to the tools you have to do it with.

When in Grad School, all I had was a screenreader, and I stayed
away from python because of the whitespace having semantics
problem. However once i wrote emacspeak, and speech-enabled Barry
Warsaw's python-mode, programming in python has always been a
pleasure -- and the paucity of delimiters actually makes the code
more speakable.
"""

n



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

Date: 26 Dec 2006 16:18:08 -0800
From: rminnis82@hotmail.com
Subject: Re: Perl Code Connects to Database Across IP and Not Host Header
Message-Id: <1167178688.211016.48850@i12g2000cwa.googlegroups.com>

The DSN is already set up as System DSN and not User.

The error occurs when trying to connect to the database when the page
is called from IIS...



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

Date: 26 Dec 2006 19:33:03 -0800
From: "grocery_stocker" <cdalten@gmail.com>
Subject: Perl equivalent to the following shell operation.
Message-Id: <1167190383.574453.326350@a3g2000cwd.googlegroups.com>

I'm analyzing a really large file. While I was bringing in carts at
work, I figured it would be easier/more efficient just to split the
file, sort it in parallel, then merge it. If I wrote a shell script, I
would do something like the following:

#This code is duped from a google search
(cat list1 list2 list3 | sort | uniq > list123) &
(cat list4 list5 list6 | sort | uniq > list456) &

wait

diff list123 list456

However, I'm writing this in Perl because it would be easier to sort
the file using the Schwartzian Transform method. Is there an equivalent
in Perl or would I have to use some kind of existing Perl mod?

Chad



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

Date: 26 Dec 2006 21:16:06 -0800
From: "grocery_stocker" <cdalten@gmail.com>
Subject: Re: Perl equivalent to the following shell operation.
Message-Id: <1167196566.656836.31470@f1g2000cwa.googlegroups.com>


grocery_stocker wrote:
> I'm analyzing a really large file. While I was bringing in carts at
> work, I figured it would be easier/more efficient just to split the
> file, sort it in parallel, then merge it. If I wrote a shell script, I
> would do something like the following:
>
> #This code is duped from a google search
> (cat list1 list2 list3 | sort | uniq > list123) &
> (cat list4 list5 list6 | sort | uniq > list456) &
>
> wait
>
> diff list123 list456
>
> However, I'm writing this in Perl because it would be easier to sort
> the file using the Schwartzian Transform method. Is there an equivalent
> in Perl or would I have to use some kind of existing Perl mod?
>
> Chad

Never mind. I entered the world 'parallel' in the search box thingy and
google magically turned up the answer.



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

Date: 26 Dec 2006 08:14:38 -0800
From: mnt006@gmail.com
Subject: Re: Using clearcase command in perl script
Message-Id: <1167149678.140710.116900@48g2000cwx.googlegroups.com>

Thanks for responding.
Cleartool makebranch command creates branch and checks out the file.
It does take multiple files as input via command line.

Actual command would look file following
> cleartool mkbranch -nc my_branch_name /vobs/abc/foo1.c /vobs/abc/foo2.c

"cleartool mkbranch -nc my_branch_name" would be constant string for
all the files which are needed to be checked out.

So from your suggestion I did try something like following.

system("cleartool mkbranch -nc my_branch_name", @array);

But due to some reason branch wasn't created.

Thanks,

Paul Lalli wrote:
> mnt...@gmail.com wrote:
>
> >  I am having list of files in an array. Example.
> > array[0]=/vobs/abc
> > array[1]=/vobs/abc/foo1.c
> > array[2]=/vobs/abc/foo2.c
>
> Please type real code, even in examples.
>
> my @array = qw(/vobs/abc /vobs/abc/foo1.c /vobs/abc/foo2.c);
>
> > I want to perform clearcase check out command on this list of files.
> > Can anyone suggest how to do this using perl?
>
> Perhaps you could describe how a "clearcase check out command" works or
> at least looks?  Is it something that can only accept one filename as
> the argument?  In that case, do something like:
> foreach my $file (@array) {
>    system("clearcase_checkout_command", $file);
> }
>
> Is it something that accepts multiple file names, all specified on the
> command line?  Then do something like:
> system("clearcase_checkout_command", @array);
>
> Until you tell us how to do the basic task, it's rather difficult to
> help you modify it for the real pursuit...
> 
> Paul Lalli



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

Date: 26 Dec 2006 08:29:15 -0800
From: "Paul Lalli" <mritty@gmail.com>
Subject: Re: Using clearcase command in perl script
Message-Id: <1167150555.216436.63600@79g2000cws.googlegroups.com>

mnt006@gmail.com wrote:

> Actual command would look file following
> > cleartool mkbranch -nc my_branch_name /vobs/abc/foo1.c /vobs/abc/foo2.c
>
> "cleartool mkbranch -nc my_branch_name" would be constant string for
> all the files which are needed to be checked out.
>
> So from your suggestion I did try something like following.
>
> system("cleartool mkbranch -nc my_branch_name", @array);
>
> But due to some reason branch wasn't created.

"some reason"?  Did you bother checking any of the error statuses?  Did
you check the return value of system()?  The value of $? ?  The value
of $! ?

Have you read the documentation for the function you're using?  perldoc
-f system

system("cleartool", "mkbranch", "-nc", "my_branch_name", @array);
will most likely produce better results.  Read the aforementioned
documentation to discover why.

Paul Lalli



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

Date: Tue, 26 Dec 2006 10:56:14 -0800
From: Jim Gibson <jgibson@mail.arc.nasa.gov>
Subject: Re: Want to create a website using perl and CGI
Message-Id: <261220061056146683%jgibson@mail.arc.nasa.gov>

In article <1166802751.267022.6620@73g2000cwn.googlegroups.com>,
<cartercc@gmail.com> wrote:

> Hi, Sherm,
> 
> Just a few more or less random thoughts:
> 

Uri and Sherm have attempted to correct your usage of some technical
terms. I feel the need to respond to your characterization of the
English language.

> 
> 2. My comments about the bookstore were meant to illustrate the current
> usage of the term CGI. English is a descriptive language, not a
> prescriptive one, and you normally get your meaning from the ordinary
> and usual meaning rather than the rare and unusual meaning. Three
> examples:

There are "descriptive" and "prescriptive" people. English as a
language is neither.

>  - (b) Schools graduate, not people, so it's not correct to say, 'I
> graduated from State University in 2006,' but rather 'State University
> graduated me in 2006.' You never hear the latter form anymore but only
> the former, and most people would >correct< you if you said, 'State
> University graduated ...'

Now you have placed yourself firmly in the "prescriptive" camp, where I
also reside. My impression is that we are in the minority
("descriptives" rule).

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


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

Date: 6 Apr 2001 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin) 
Subject: Digest Administrivia (Last modified: 6 Apr 01)
Message-Id: <null>


Administrivia:

#The Perl-Users Digest is a retransmission of the USENET newsgroup
#comp.lang.perl.misc.  For subscription or unsubscription requests, send
#the single line:
#
#	subscribe perl-users
#or:
#	unsubscribe perl-users
#
#to almanac@ruby.oce.orst.edu.  

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

To submit articles to comp.lang.perl.announce, send your article to
clpa@perl.com.

#To request back copies (available for a week or so), send your request
#to almanac@ruby.oce.orst.edu with the command "send perl-users x.y",
#where x is the volume number and y is the issue number.

#For other requests pertaining to the digest, send mail to
#perl-users-request@ruby.oce.orst.edu. Do not waste your time or mine
#sending perl questions to the -request address, I don't have time to
#answer them even if I did know the answer.


------------------------------
End of Perl-Users Digest V10 Issue 10098
****************************************


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