[10195] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 3788 Volume: 8

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Tue Sep 22 16:07:19 1998

Date: Tue, 22 Sep 98 13:00:23 -0700
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, 22 Sep 1998     Volume: 8 Number: 3788

Today's topics:
    Re: [Q]Net::Ftp - How to set local dir? (Mike Wescott)
    Re: Beginners Problem - Running Shell commands in perl <fn@Radio-do.de>
    Re: can MSWord and Adobe PDF docs be read for indexing? scott@softbase.com
        changing $ 'variables' in regexprs (David Rouse)
    Re: changing $ 'variables' in regexprs <uri@camel.fastserv.com>
    Re: dbi dbd::ORACLE insert questions (John D Groenveld)
    Re: Enumerating Properties and Methods <JKRY3025@comenius.ms.mff.cuni.cz>
    Re: Hidden field??? <evonzee@tritechnet.com>
    Re: Hidden field??? (brian d foy)
        ignore "abort" signal from Child, how? (Dr H. T. Leung)
        Installing Perl 5.004 <ripcon@webgen.net>
        mail with sendmail <mfn@hem.passagen.se>
    Re: mail with sendmail (brian d foy)
    Re: Perl & Java - differences and uses <zenin@bawdycaste.org>
    Re: Perl & Java - differences and uses <jdporter@min.net>
    Re: Perl & Java - differences and uses <jdporter@min.net>
    Re: Perl & Java - differences and uses <jdporter@min.net>
    Re: Perl & Java - differences and uses <jdporter@min.net>
    Re: Perl & Java - differences and uses <borg@imaginary.com>
    Re: Perl & Java - differences and uses <borg@imaginary.com>
    Re: Perl & Java - differences and uses <uri@camel.fastserv.com>
    Re: Query WINS (or other NBNS) from NT? <eashton@bbnplanet.com>
    Re: Query WINS (or other NBNS) from NT? <charleskerekes@hotmail.com>
    Re: Query WINS (or other NBNS) from NT? <eashton@bbnplanet.com>
    Re: question cgi <mb10265@tvd.be>
    Re: Shell/System scripts <webmaster@fccjmail.fccj.cc.fl.us>
    Re: Shell/System scripts <uri@camel.fastserv.com>
        sorting Unix pathnames of unequal length by filename (Lynn D. Newton)
    Re: sorting Unix pathnames of unequal length by filenam <zenin@bawdycaste.org>
    Re: speed of subroutine call vs. call by function refer <zenin@bawdycaste.org>
    Re: What happened to perl.moderated? droby@copyright.com
    Re: Win32::ODBC strange (?) error?! <JKRY3025@comenius.ms.mff.cuni.cz>
        Special: Digest Administrivia (Last modified: 12 Mar 98 (Perl-Users-Digest Admin)

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

Date: 22 Sep 1998 15:07:17 -0400
From: wescott@cygnus.ColumbiaSC.NCR.COM (Mike Wescott)
Subject: Re: [Q]Net::Ftp - How to set local dir?
Message-Id: <x4iuig6k62.fsf@cygnus.ColumbiaSC.NCR.COM>

In article <3607AD4D.6D7431D3@citicorp.com> Raj Subramani writes:
>   In interactive ftp one can set lcd to /foo/bar
>   so that any get commands will store the remote
>   file in my /foo/bar dir.

>   The Net::Ftp modules does'nt seem to define such
>   an option.

Maybe because it has nothing to do with ftp, the protocol. Why not use chdir()?

-- 
	-Mike Wescott
	 mike.wescott@ColumbiaSC.NCR.COM


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

Date: 22 Sep 1998 20:52:02 +0200
From: Frank Nobis <fn@Radio-do.de>
Subject: Re: Beginners Problem - Running Shell commands in perl
Message-Id: <yge3e9knfot.fsf@trinity.radio-do.de>

>>>>> "Steve" == Steve Adams <smadams@ozemail.com.au> writes:

    Steve> I need to be able to run a normal shell command in my perl
    Steve> script. How do I do this? The command I need to run in the
    Steve> perl script is

    Steve> ftp -n ftp.ozemail.com.au <script.ftp

There are many ways to do this.

1. $ret = `ftp -n ftp.ozemail.com.au <script.ftp`

2. open (PIPE, "| ftp -n ftp.ozemail.com.au")
   print PIPE "<commands>"

3. use Net::FTP

Regards
	Frank
-- 
 Frank Nobis                            Email: PGP AVAILABLE
 Landgrafenstr. 130                     dg3dcn   http://www.radio-do.de/~fn/
 44139 Dortmund				Powered by SMP FreeBSD



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

Date: 22 Sep 1998 19:50:08 GMT
From: scott@softbase.com
Subject: Re: can MSWord and Adobe PDF docs be read for indexing?
Message-Id: <3607ff70.0@news.new-era.net>

David Cantrell (NukeEmUp@ThePentagon.com) wrote:
> On 22 Sep 1998 12:56:44 GMT,
>   scott@softbase.com enlightened us thusly:

> >James T. Vradelis (jvradelis@mediaone.net) wrote:
> >> Pat Trainor wrote:
> >> > They will be residing on a unix box and at my mercy.
> >> You can write msword and excel files using the Win32::OLE module.
> >
> >Not on UNIX!

> And I believe that you would still need Word or Excel on the machine
> to be able to do that.

If you used Automation to create a Whatever.Application object, that
object would have to be installed. Obviously there's no "Word for
UNIX". If you were doing this as some type of search engine, speed
would become a big factor, because starting an instance of a
Whatever.Application is the same difference as starting the program and
would have a negative impact on the system's performance.

Retrieving legacy data is problematic. This is yet another symptom!
The idea is to get it into a neutral format like HTML, or eventually
XML, which other tools can read. Back when Word, WordPerfect, etc began
using their formats, they were not anticipating cross-platform
information searching :)

Scott
--
Look at Softbase Systems' client/server tools, www.softbase.com
Check out the Essential 97 package for Windows 95 www.skwc.com/essent
All my other cool web pages are available from that site too!
My demo tape, artwork, poetry, The Windows 95 Book FAQ, and more. 


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

Date: Tue, 22 Sep 1998 15:14:38 -0500
From: 4newsargus@mail.entrsft.com (David Rouse)
Subject: changing $ 'variables' in regexprs
Message-Id: <4newsargus-2209981514390001@192.36.36.47>

I'm setting up a script to clean up (poorly) automatically generated HTML.
I'm using this contruct:

$fileholder =~ s/<p><HR>([^-|\n]+)(-|\n)/<P><HR><B>$1<\/B>$2/g;

to find all the text starting with <p><HR> and ending with a '-' or a
newline and put bold tags around the text. All is well, but what I really
need to be able to do is force $1 into ALL CAPS. Sadly, this is a 'read
only variable' and a one line command.

I'm baffled, to the point of not even knowing *how* to look for a
solution, although I have looked through "Learning Perl" and "Programming
Perl."

Any advice welcome!

David 'struggling student of perl' Rouse


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

Date: 22 Sep 1998 15:53:45 -0400
From: Uri Guttman <uri@camel.fastserv.com>
To: 4newsargus@mail.entrsft.com (David Rouse)
Subject: Re: changing $ 'variables' in regexprs
Message-Id: <sarr9x3gbzq.fsf@camel.fastserv.com>

>>>>> "DR" == David Rouse <4newsargus@mail.entrsft.com> writes:

  DR> I'm setting up a script to clean up (poorly) automatically
  DR> generated HTML.  I'm using this contruct:

  DR> $fileholder =~ s/<p><HR>([^-|\n]+)(-|\n)/<P><HR><B>$1<\/B>$2/g;

what is the | in the [] for? it does not mean alternation ther, it is
a plain | so you can remove it. [] is a char set, not a list of possible
strings.

  DR> to find all the text starting with <p><HR> and ending with a '-'
  DR> or a newline and put bold tags around the text. All is well, but
  DR> what I really need to be able to do is force $1 into ALL
  DR> CAPS. Sadly, this is a 'read only variable' and a one line
  DR> command.

  DR> I'm baffled, to the point of not even knowing *how* to look for a
  DR> solution, although I have looked through "Learning Perl" and
  DR> "Programming Perl."

have you looked at \U? 

hth,

uri


-- 
Uri Guttman                             Speed up your web server with Fast CGI!
uri@fastengines.com                                  http://www.fastengines.com


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

Date: 22 Sep 1998 15:03:16 -0400
From: groenvel@cse.psu.edu (John D Groenveld)
Subject: Re: dbi dbd::ORACLE insert questions
Message-Id: <6u8s9k$fgn$1@tholian.cse.psu.edu>

There's an example of insertion in DBI.pm. perldoc DBI, see
Simple Examples.
John
groenveld@acm.org


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

Date: Tue, 22 Sep 1998 19:54:17 -0700
From: Jan Krynicky <JKRY3025@comenius.ms.mff.cuni.cz>
Subject: Re: Enumerating Properties and Methods
Message-Id: <360862D9.57F3@comenius.ms.mff.cuni.cz>

Jay Guerette wrote:
> 
> >>how could I get a list of the methods and properties available to me from
> >>this class?
> >
> >In all seriousness:  You read the documentation.
> 
> Yes.
> 
> >Perhaps you meant `how can my program get such a list?'  But that's
> >useless, because even if your program had a list of methods, it
> >wouldn't know what the methods were for, so what good would the list
> >be?
> 
> I can guess from the purpose of the class what the methods will do. If
> that's the best I can do, I'm willing to go that route.
> 
> >>or access a property like this:
> >>
> >>$foo->bar->{'prop'}="gnu";
> >
> >Here there is a solution, which I will not tell you, because I suspect
> >that whatever you are really trying to accomplish, this isn't going to
> >help very much.  I urge you to explain what you are really trying to
> >accomplish; there is probably a better solution available.
> 
> This _is_ what I'm really trying to accomplish. I could tell you that I'm
> trying to find out what methods and properties are available from
> '$window->document' under PerlScript, but I hesitate to do that because
> everybody says: "Well, that's PerlSCRIPT and not PERL; we can't help you."
> Of course, people don't understand that PerlScript is simply a wrapper for
> Perl; and for that reason IS Perl. There is NO documentation for client-side
> PerlScript.

But even though most of the replys were not very helpfull, you should
have told us.
Cause it MATTERS if an object is an ordinary Perl-only object with no
magic whatsoever
and if it is a Win32::OLE object.

The methods of Win32::OLE objects are not defined anywhere in any perl
code.
They are "AUTOLOADED". So even if you used the MJD's solution you would
not 
get any helpfull listing. It would list only the "standard" methods
defined 
within Win32::OLE.pm

I'm not sure, but there may be some method for listing methods and
properties, but 
it WILL BE Win32::OLE specific. So search the docs of Win32::OLE or
subscribe to Perl-Win32-Users@lyris.activestate.com and ask there.
Unless of course Jan Dubois (author of Win32::OLE) comes here and
answers the question.

Jenda

P.S.: I assume that you are using ActivePerl.
Build 3xx of ActiveState perl will most probably not have this feature.


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

Date: Tue, 22 Sep 1998 13:23:42 -0500
From: Eric Von Zee <evonzee@tritechnet.com>
Subject: Re: Hidden field???
Message-Id: <3607EB2E.54198E6C@tritechnet.com>

Does HTTP authen work on an NT system?  I thought .htaccess files only applied
to Unix systems..

Maybe I am wrong?  I am, after all, a newbie to the world of decent servers..
up until a month ago, all I had was a Geosh*tties account :)

Cheers,

-Eric

Darin McGrew wrote:

> Why go through all these contortions?  Why not just use HTTP authentication
> and be done with it?
> --
> Darin McGrew, mcgrew@alumni.stanford.org, http://www.rahul.net/mcgrew/
>
> "The man who never makes mistakes never makes much of anything."
>                                                      -- Waite Phillips

--
Best Regards,
Tritech Marketing Inc.

Eric Von Zee
Webmaster




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

Date: Tue, 22 Sep 1998 15:28:21 -0400
From: comdog@computerdog.com (brian d foy)
Subject: Re: Hidden field???
Message-Id: <comdog-ya02408000R2209981528210001@news.panix.com>
Keywords: from just another new york perl hacker

In article <3607EB2E.54198E6C@tritechnet.com>, Eric Von Zee <evonzee@tritechnet.com> posted:

>Does HTTP authen work on an NT system?  I thought .htaccess files only applied
>to Unix systems..

it's a server thing, not an operating system thing.  definately not a 
Perl thing ;)

-- 
brian d foy                                  <comdog@computerdog.com>
CGI Meta FAQ <URL:http://computerdog.com/CGI_MetaFAQ.html>
Comprehensive Perl Archive Network (CPAN) <URL:http://www.perl.com>
Perl Mongers needs volunteers! <URL:http://www.pm.org/to-do.html>


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

Date: 22 Sep 1998 18:36:49 GMT
From: htl10@cus.cam.ac.uk (Dr H. T. Leung)
Subject: ignore "abort" signal from Child, how?
Message-Id: <6u8qo1$1h6$1@pegasus.csx.cam.ac.uk>



I have a little perl script, part of which reads:

    $important_bit =`my_program | grep \" a phrase in the output\" `;
    print $?, $! ;

It prints out "0, Illegal seek" and carried on - this I understand - the child 
process returned success, but the grep has reached the end of the pipe. But 
sometimes, it returns "256", and the perl script aborts at run time. I suppose 
the child "my_program" has died a painful death, but how can I force the
execution of the perl script to carry on beyond that point, despite that? I 
am new to perl, and doesn't understand much about signal handling either...

Platform is linux, and if necessary, I'll install any needed modules...
-- 
          --------------------------------------------------
"What you don't care cannot hurt you."            Chap. 7a, AMS-NS


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

Date: Tue, 22 Sep 1998 15:55:29 -0400
From: Kyle Vealey <ripcon@webgen.net>
Subject: Installing Perl 5.004
Message-Id: <360800B1.7972@webgen.net>

Hi All! I am trying to install Perl 5.004 for win32 systems (yeah a
newbie!!!). It told me to add c:\perl\bin to the PATH by clicking the
environment tab. I went to "start" "settings" "control panel"
and....guess what? NO ENVIRONMENT TAB!!! ARGH!! Am I in the wrong spot
or something? ANY help would be great.

				Thanx, Ripcon


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

Date: Tue, 22 Sep 1998 20:41:46 +0200
From: "Martin Franson" <mfn@hem.passagen.se>
Subject: mail with sendmail
Message-Id: <3607ef65.0@d2o37.telia.com>

Hi
I read somewhere there4s got to be a lot of code in the top of a mail before
the real message. I just don4t remember what should be there.
Does anyone no the code to put there.

Thanx
Martin




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

Date: Tue, 22 Sep 1998 15:30:33 -0400
From: comdog@computerdog.com (brian d foy)
Subject: Re: mail with sendmail
Message-Id: <comdog-ya02408000R2209981530330001@news.panix.com>
Keywords: from just another new york perl hacker

In article <3607ef65.0@d2o37.telia.com>, "Martin Franson" <mfn@hem.passagen.se> posted:

>I read somewhere there4s got to be a lot of code in the top of a mail before
>the real message. I just don4t remember what should be there.
>Does anyone no the code to put there.

perhaps you mean the mail header?  there are all sorts of things you
could put there.  a sendmail reference along with the appropriate RFCs
should tell you everything you need to know.

and, if you don't want to learn that much, you can use the Perl Mail::*
modules.

good luck :)

-- 
brian d foy                                  <comdog@computerdog.com>
CGI Meta FAQ <URL:http://computerdog.com/CGI_MetaFAQ.html>
Comprehensive Perl Archive Network (CPAN) <URL:http://www.perl.com>
Perl Mongers needs volunteers! <URL:http://www.pm.org/to-do.html>


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

Date: 22 Sep 1998 18:32:12 GMT
From: Zenin <zenin@bawdycaste.org>
Subject: Re: Perl & Java - differences and uses
Message-Id: <906489072.659699@thrush.omix.com>

--------------------------------------------------------------------------
|                     George Reese for President!                        |
--------------------------------------------------------------------------

George, you *really* need to step back and actually *read* what you've wrote
sometime.

You've contradicted yourself in this thread more times then The Hitchhiker's
Guide to the Galaxy.  When confronted with empirical evidence to such
blatant contradictions you start playing semantic games that rival Clinton's
legal team.

So what if your *exact* words where not, "Python, Java, and OO rule!  Perl, C,
SmallTalk and structured programming suck!".  This has been the mainstay of
your arguments since the start of the thread.  You can play all the semantic
games you like, however as long as there is a DejaNews we all can see exactly
what you've written and exactly what you mean.  You have been nothing if not
vocal and clear.

John Klassa quotes from you included the exact message IDs to insure that
everyone could easily see the context was clear and correct.

This isn't politics where the world will forget what you said 6 months ago
and such semantic games might actually work.  This is USENET.  Funny thing
about USENET, it evens the playing field.  Unlike the "real world", in
USENET your ideas and convictions must be able to stand on there own merits,
be you Brian Kernigan or a kid in Jr. High.  Contradicting yourself and not
fessing up when confronted is bad style at best, lies at worst.

As can clearly be seen from the followups to your posts, your ideas fall far
short of reality.  You have an extremely narrow and confused view of the
world, and your statements, contradictions, and semantic games border on
self dilution.

George, seek help.  I'm beginning to think you might actually believe what
you are saying.

Is this a personal attack?  Maybe (probably), however I consider it much
more of a badly needed wakeup call to try and bring you back in touch with
reality.  You've clearly lost your grip...


George Reese <borg@imaginary.com> wrote:
: In comp.lang.java.programmer John Klassa <klassa@aur.alcatel.com> wrote:
: : On Mon, 21 Sep 1998 20:12:10 GMT, George Reese <borg@imaginary.com> wrote:
: :   > I advise you to go back and take a remedial reading comprehension
: :   > class.  I have never argued anything of the sort of "Perl is so far
: :   > beneath Python".  You just made that up.
:
: : Really?  Maybe I suffer from an inability to comprehend what I read, too,
: : but the following would suggest that he didn't just make that up.
:
: : Message-ID: <MpFJ1.544$E9.1882388@ptah.visi.com>
: : Perl has no real use.  If you have to do scripting or text processing, use
: : Python.  Otherwise, use Java.
:
: : Message-ID: <pFRJ1.634$E9.2309187@ptah.visi.com>
: : One of the measures of a successful language is how easy it is for people
: : to pick it up and also for how easy it is for those who know the language
: : to read legacy code.  Perl is notoriously bad on this count.  To compound
: : its horrid syntax, it also has the single nastiest OO paradigm I have ever
: : seen in a programming language.
:
: : Message-ID: <CLaL1.1514$E9.5234013@ptah.visi.com>
: : Larry Wall was simply wrong.
:
: : Message-ID: <96gL1.1626$E9.5495820@ptah.visi.com>
: : Perl is just chaos.
:
: You do have a reading comprehension problem.  Especially since you
: have taken all of this out of context.  
:
: All of these things actually say different things, none of which are
: functional comparisons of perl and python.
:
: "Perl is chaos" is a comment on perl's syntax.  
:
: "Larry Wall was simply wrong" was a response to someone who posted
: some quote or another.  This, honestly, was a really stupid quote for
: you to post since it says zippo about perl or python.
:
: And the other two basically say that wherever perl can solve a
: problem, either python or java (or both) are equally able to solvve
: that problem.
:
: Of course, you have left out the parts where I went into that claim
: further.  The parts where I say the reason is due to the
: maintainability and extensibility of python, not because of some grand
: feature set of python.
:
: -- 
: George Reese (borg@imaginary.com)       http://www.imaginary.com/~borg
: PGP Key: http://www.imaginary.com/servlet/Finger?user=borg&verbose=yes
:    "Keep Ted Turner and his goddamned Crayolas away from my movie."
: 			    -Orson Welles

-- 
-Zenin (zenin@archive.rhps.org)           From The Blue Camel we learn:
BSD:  A psychoactive drug, popular in the 80s, probably developed at UC
Berkeley or thereabouts.  Similar in many ways to the prescription-only
medication called "System V", but infinitely more useful. (Or, at least,
more fun.)  The full chemical name is "Berkeley Standard Distribution".



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

Date: Tue, 22 Sep 1998 14:44:33 -0400
From: John Porter <jdporter@min.net>
Subject: Re: Perl & Java - differences and uses
Message-Id: <3607F011.C287303F@min.net>

John Porter wrote:
> 
> ... nor have you proffered one single snippet of code.

Actually I have to amend that: George Reese did provide
one sample of code, in <RncK1.906$E9.3137532@ptah.visi.com>,
about 20 lines of CGI.

Interestingly, it was not written in an OO style, except for
calling methods on the cgi module.

-- 
John "Many Jars" Porter


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

Date: Tue, 22 Sep 1998 15:00:12 -0400
From: John Porter <jdporter@min.net>
Subject: Re: Perl & Java - differences and uses
Message-Id: <3607F3BC.4D6E27FD@min.net>

George Reese wrote:
> 
> John Porter wrote in message <3606B683.2640764@min.net>...
> >No one has done as much harm to your reputation as you have done
> >yourself.
> 
> My reputation is fine.  People like you who throw insults at me as a means
> of argument have no respect from me, so I would hardly care what your level
> of respect for me is.

O.k.; at least we have reached an understanding on that point.


> >> You and Uri just keep repeating the mantra that I think OO is for
> everything
> >> in spite of the fact that I have repeatedly stated that is not the case.
> >
> >No, you have consistently stated that it *IS* the case, as support
> >for the notion that Python is "therefore" superior to Perl.
> 
> Please provide any quote where I have said this.

Glad to oblige.


> I clearly believe strongly in the OO way of life.

> OO is not simply a tool. 

> Java is pure OO.  Python is close enough.

Besides being wrong about Java, this shows that you think Python
is superior to Perl on the basis of its OO-ness.
Better OO => Better Language.  Clearly OO-ness is driving the
"quality" metric.


> Python's power in these respects derives from its clean syntax and
> well-defined OO paradigm -- two things Perl simply does not have.

OO => Power.  Wow!


> A good OO language is an
> important tool in maintaining the OO paradigm across the process.

This begs the question of whether the OO paradigm *ought* to be
maintained across the process.  Clearly, you think it does.


> You should parse the [pattern match] results within an OO framework.

This is saying that all operations, regardless of scale, should
be performed in an OO framework.  Which sounds a lot like
"OO Everywhere" to me.


> If [the code] is properly OO, it is very likely to be reusable.

> OO is the single best path to code reuse.

> software reuse does not make something OO.

These statements clearly betray your priorities: you think the
means (OO) is more important than the end (code reuse).


So, are we unclear as to where you stand on OO?



> >If OO is not for everything (as you now appear to be admitting),
> >then languages which support both OO and non-OO programming are more
> >broadly useful than languages which support only OO programming.
> 
> This is a logical fallacy.

Not at all.


> Just because perl allows programming under non-OO paradigms does not imply
> that perl is the best tool for working in those paradigms.

I didn't say otherwise!

Your statement would make sense, if one were to choose a language from
a small set, say [ Perl, Python ].  Of these two, Perl is the more
broadly useful, since it does not enforce one paradigm over another.

(Of course, I admit that that is faulty, since in fact Python does
not enforce OO any more than Perl does. But that's a different
argument...)

Btw, can you say how well (if at all) Python supports a functional
programming style?  Does it have closures, partial evaluation, and
continuations?  Just curious...


> I am saying and I have maintained all along that in an OO paradigm, python
> makes more sense as it is functionally similar but more strictly OO (plus
> several other things not related to this particular line of argument).

Yes, I know.

> Those things for which OO is not the right solution [yada yada]

Yes, you've memorized the party line quite nicely.

-- 
John "Many Jars" Porter


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

Date: Tue, 22 Sep 1998 15:09:10 -0400
From: John Porter <jdporter@min.net>
Subject: Re: Perl & Java - differences and uses
Message-Id: <3607F5D6.88538EC6@min.net>

George Reese wrote:
> 
> In comp.lang.java.programmer John Porter <jdporter@min.net> wrote:
> 
> : Actually, the Amazon ranking is almost totally meaningless,
> : for the simple reason that readers are far more likely to review
> : a book they liked than one they didn't.
> 
> You cannot have it both ways.  Either the reviews mean something or
> they do not.  You cannot use comments taken out of context of a review
> where I got 4 out of 5 stars as evidence of how much a book sucks and
> then say well, the good parts of the review don't count.

I am not suggesting that we have it both ways.

I am saying that the usefulness of Amazon rankings is limited
like this:  it is not the absolute ratio of favorable to
unfavorable reviews for a book that matters; it is the relative
ratio, compared to the ratios for other books.  Nearly every
book reviewed at Amazon has a preponderance of favorable reviews.
Does that mean that all these books are good?  Of course not.
Any book that gets an unusually large proportion of unfavorable
reviews -- even if it is still less than half -- is probably
a pretty poor book, to have motivated that many people to log
on and submit a review.

Of course, the other problem is sheer sample size: very few
books get enough reviews of (any kind) to be statistically
significant.

-- 
John "Many Jars" Porter


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

Date: Tue, 22 Sep 1998 15:18:30 -0400
From: John Porter <jdporter@min.net>
Subject: Re: Perl & Java - differences and uses
Message-Id: <3607F806.DBDC31F8@min.net>

George Reese wrote:
> 
> In comp.lang.java.programmer John Porter <jdporter@min.net> wrote:
> : Not until recently have you moderated your vitriol, to the point of
> : allowing that some folks might prefer Perl, for whatever personal
> : reasons.
> 
> I am not modifying my views in any way, shape, or form. 

I can easily believe that your opinions haven't changed at all.
But it did seem as though the tone of your anti-Perl rhetoric
was softening a little.  

-- 
John "Many Jars" Porter


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

Date: Tue, 22 Sep 1998 19:53:24 GMT
From: George Reese <borg@imaginary.com>
Subject: Re: Perl & Java - differences and uses
Message-Id: <UeTN1.1428$Ge.4453816@ptah.visi.com>

In comp.lang.java.programmer John Porter <jdporter@min.net> wrote:
: George Reese wrote:
:> 
:> In comp.lang.java.programmer John Porter <jdporter@min.net> wrote:
:> : Not until recently have you moderated your vitriol, to the point of
:> : allowing that some folks might prefer Perl, for whatever personal
:> : reasons.
:> 
:> I am not modifying my views in any way, shape, or form. 

: I can easily believe that your opinions haven't changed at all.
: But it did seem as though the tone of your anti-Perl rhetoric
: was softening a little.  

I think what has happened is that in the course of a few dozen posts
the nuances of my opinions have been explored--in fact, explored as
nauseum.

-- 
George Reese (borg@imaginary.com)       http://www.imaginary.com/~borg
PGP Key: http://www.imaginary.com/servlet/Finger?user=borg&verbose=yes
   "Keep Ted Turner and his goddamned Crayolas away from my movie."
			    -Orson Welles


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

Date: Tue, 22 Sep 1998 19:54:43 GMT
From: George Reese <borg@imaginary.com>
Subject: Re: Perl & Java - differences and uses
Message-Id: <7gTN1.1429$Ge.4453816@ptah.visi.com>

In comp.lang.java.programmer John Porter <jdporter@min.net> wrote:
: George Reese wrote:
:> 
:> In comp.lang.java.programmer John Porter <jdporter@min.net> wrote:
:> 
:> : Actually, the Amazon ranking is almost totally meaningless,
:> : for the simple reason that readers are far more likely to review
:> : a book they liked than one they didn't.
:> 
:> You cannot have it both ways.  Either the reviews mean something or
:> they do not.  You cannot use comments taken out of context of a review
:> where I got 4 out of 5 stars as evidence of how much a book sucks and
:> then say well, the good parts of the review don't count.

: I am not suggesting that we have it both ways.

: I am saying that the usefulness of Amazon rankings is limited
: like this:  it is not the absolute ratio of favorable to
: unfavorable reviews for a book that matters; it is the relative
: ratio, compared to the ratios for other books.  Nearly every
: book reviewed at Amazon has a preponderance of favorable reviews.
: Does that mean that all these books are good?  Of course not.
: Any book that gets an unusually large proportion of unfavorable
: reviews -- even if it is still less than half -- is probably
: a pretty poor book, to have motivated that many people to log
: on and submit a review.

: Of course, the other problem is sheer sample size: very few
: books get enough reviews of (any kind) to be statistically
: significant.

This would be an excellent point if it were *I* who was offering up
the reviews at amazon.com as having any meaning.  I was in fact
responding to someone else who tried to read meaning into them that
did not exist.

-- 
George Reese (borg@imaginary.com)       http://www.imaginary.com/~borg
PGP Key: http://www.imaginary.com/servlet/Finger?user=borg&verbose=yes
   "Keep Ted Turner and his goddamned Crayolas away from my movie."
			    -Orson Welles


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

Date: 22 Sep 1998 15:55:48 -0400
From: Uri Guttman <uri@camel.fastserv.com>
Subject: Re: Perl & Java - differences and uses
Message-Id: <sarogs7gbwb.fsf@camel.fastserv.com>

>>>>> "GR" == George Reese <borg@imaginary.com> writes:

  GR> I think what has happened is that in the course of a few dozen
  GR> posts the nuances of my opinions have been explored--in fact,
  GR> explored as nauseum.
               ^^^^^^^^^^

well put!! :-)

-- 
Uri Guttman                             Speed up your web server with Fast CGI!
uri@fastengines.com                                  http://www.fastengines.com


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

Date: Tue, 22 Sep 1998 18:03:43 GMT
From: Elaine -HappyFunBall- Ashton <eashton@bbnplanet.com>
Subject: Re: Query WINS (or other NBNS) from NT?
Message-Id: <3607E415.950BA6E@bbnplanet.com>

Charles Kerekes wrote:

> Does anyone know of a way to query a WINS server (or other NetBIOS Name
> Server) from a PERL script on NT? I am looking for a quick way to see if a
> machine name exists, before mapping drives to it. If I map to a non-existent
> server, it takes too long to error out and delays our logon script.

You could try using 'netsvc' to query wins then map if it finds it. Just
a thought.

e.

"All of us, all of us, all of us trying to save our immortal souls, some
ways seemingly more round-about and mysterious than others. We're having
a good time here. But hope all will be revealed soon."  R. Carver


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

Date: Tue, 22 Sep 1998 13:16:04 -0500
From: "Charles Kerekes" <charleskerekes@hotmail.com>
Subject: Re: Query WINS (or other NBNS) from NT?
Message-Id: <6u8pee$50d$1@supernews.com>

Thanks for the tip. I tried NETSVC but it is too slow in erring out. I
really need to talk to the WINS server.

Charlie

Elaine -HappyFunBall- Ashton wrote in message
<3607E415.950BA6E@bbnplanet.com>...
>Charles Kerekes wrote:
>
>> Does anyone know of a way to query a WINS server (or other NetBIOS Name
>> Server) from a PERL script on NT? I am looking for a quick way to see if
a
>> machine name exists, before mapping drives to it. If I map to a
non-existent
>> server, it takes too long to error out and delays our logon script.
>
>You could try using 'netsvc' to query wins then map if it finds it. Just
>a thought.
>





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

Date: Tue, 22 Sep 1998 18:21:01 GMT
From: Elaine -HappyFunBall- Ashton <eashton@bbnplanet.com>
Subject: Re: Query WINS (or other NBNS) from NT?
Message-Id: <3607E823.2CBC9397@bbnplanet.com>

Charles Kerekes wrote:

> Thanks for the tip. I tried NETSVC but it is too slow in erring out. I
> really need to talk to the WINS server.

Then go have a look on CPAN as it is very possible that something
already exists. Also, I think you can adjust the timeout value in the
registry. Enjoy.

e.

"All of us, all of us, all of us trying to save our immortal souls, some
ways seemingly more round-about and mysterious than others. We're having
a good time here. But hope all will be revealed soon."  R. Carver


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

Date: Tue, 22 Sep 1998 21:39:07 +0200
From: Bencer <mb10265@tvd.be>
Subject: Re: question cgi
Message-Id: <3607FCDB.AB43F7B0@tvd.be>

Bonjour,

Cela dipend de votre programme perl.
Il vous faut un compilateur perl sur votre machine.
Il existe des compilateurs perl sur toutes les plateformes.

Bien ` vous.







zaliko wrote:

> bonjour
>
> comment tester en local des cgi et programme perl avec mon navigateur
> sans activer un serveur http sur ma machine
> est ce possible ,et comment faire !
>
> Merci pour la reponse





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

Date: Tue, 22 Sep 1998 14:26:26 -0400
From: "Bill Jones, FCCJ Webmaster" <webmaster@fccjmail.fccj.cc.fl.us>
Subject: Re: Shell/System scripts
Message-Id: <3607EBD2.4762450@fccjmail.fccj.cc.fl.us>

Bill Jones, FCCJ Webmaster wrote:
> 
> Hi all :]
> 
> I have been working on a perl script that writes shell scripts.
> I am having trouble getting the output to look like:
> 
> flexanlg  -F -n www.fccj.org -x -i \
> access.22Sep-12AM -o \
> Reports/Report.22Sep-12AM.html -c \
> hnrfeuok -t s5m5h10u10a20r10x10 -l c100h500 -p ctl  2>&1
> 
> As you may see, outputting a '\' is not working as expected.
> 
> I tried to simply execute the above as a system() perl cmd, but
> it doesn't like the -o -c parameters.
> 
> So, today I started on writing a perl script that writes shell
> scripts.  So far I have (shortened for brevity):
> 
> #!/usr/bin/perl -w
> 
> use strict;
> use diagnostics;
> use POSIX;
> use IO;
> 
> # Command to execute:
> my $command = 'flexanlg';
> my $host    = 'www.fccj.org';
> 
> # Get the source file:
> my $source = `ls access.*AM`;
> my $target = $source;
> 
> # Build target file:
> $target =~ /access/;
> $target =  'Reports/Report' . $' . '.html';
> 
> # Create Shell Script:
> my $file = "lganalyz.sh";
> my $fh = new IO::File $file, O_WRONLY|O_TRUNC, 0755;
> 
> # Create shell script...
> if (defined $fh) {
>    print $fh "$command  -F -n $host -x -i \\";
>    print $fh "\n$source -o \\";
>    print $fh "\n$target -c \\";
>    print $fh "\nhnrfeuok -t s5m5h10 -l c1h5 -p ctl  2>\&1\n";
>    undef $fh;
> } else { print "Oops!  Betcha that hurt $!"; }
> 
> 1; # Exit Script...
> 
> But the trick to creating an '\' in the correct spot has
> eluded me ...  :(
> 
> Any pointers, insight, or a simple "It can't be done."
> would be appreciated :]

[FOLLOW-UP POST]

Ummm, I guess I can just do this instead:

#!/bin/sh

#
# BASH Script which Auto-Starts Netscape WWW Log Analysis.
#
# Written by Sneex, FCCJ Webmaster 09/22/98 @ 14:00pm
#

# Prepare for analysis:
PERL=`type perl | awk '{print $3}'`
DIRTARGET='/drv2/usr/ns-home/https-astro/logs'
COMMAND='/drv2/usr/ns-home/extras/flexanlg/flexanlg'
FQDN=`hostname | $PERL -e '$INLINE=<>; chomp $INLINE; ($FQDN,
$GARBAGE)=gethostbyname $INLINE; printf "$FQDN\n";'`
SOURCE=`ls $DIRTARGET/access*AM`
FILENAME=`echo $SOURCE | $PERL -e '$INLINE=<>; chomp $INLINE; ($MAJORNAME,
$MINORNAME)=split (/\./,$INLINE); print $MINORNAME;'`
TARGET="$DIRTARGET/Reports/Report.$FILENAME.html"

# Execute analysis:
"$COMMAND"  -F -n "$FQDN" -x -i \
"$SOURCE" -o \
"$TARGET" -c \
hnrfeuok -t s5m5h10u10a20r10x10 -l c100h500 -p ctl  2>&1

# Archive the log files:
/usr/bin/rm -f $DIRTARGET/*meta
/usr/sbin/gzip -9 $DIRTARGET/*AM
/usr/bin/mv -i $DIRTARGET/*gz /drv4/Fast*

# Finish w/Current Report linking:
/usr/bin/rm -f $DIRTARGET/Reports/Current.Statistics.html
/usr/bin/ln -s $TARGET $DIRTARGET/Reports/Current.Statistics.html


But, I am still looking for 
a Perl-centric solution :]
-Sneex- 
__________________________________________________________________
Bill Jones FCCJ Webmaster | http://www.fccj.org/cgi/mail?webmaster
__________________________________________________________________
We are the CLPM... Lower your standards and surrender your code...
We will add your biological and technological distinctiveness to 
our own... Your thoughts will adapt to service us...
 ...Resistance is futile...


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

Date: 22 Sep 1998 15:51:11 -0400
From: Uri Guttman <uri@camel.fastserv.com>
To: bill@astro.fccj.cc.fl.us
Subject: Re: Shell/System scripts
Message-Id: <saru320exjj.fsf@camel.fastserv.com>

>>>>> "BJFW" == Bill Jones, FCCJ Webmaster <webmaster@fccjmail.fccj.cc.fl.us> writes:

  BJFW> Bill Jones, FCCJ Webmaster wrote:
  >> 
  >> Hi all :]
  >> 
  >> I have been working on a perl script that writes shell scripts.
  >> I am having trouble getting the output to look like:
  >> 
  >> flexanlg  -F -n www.fccj.org -x -i \
  >> access.22Sep-12AM -o \
  >> Reports/Report.22Sep-12AM.html -c \
  >> hnrfeuok -t s5m5h10u10a20r10x10 -l c100h500 -p ctl  2>&1
  >> 

use \\.

it works with here files or long "" strings

print <<FOO ;
bar \\
shell junk \\
FOO

  BJFW> FQDN=`hostname | $PERL -e '$INLINE=<>; chomp $INLINE; ($FQDN,
  BJFW> $GARBAGE)=gethostbyname $INLINE; printf "$FQDN\n";'`

and just to improve your perl a little this can be done as

hostname | perl -lne 'print ((gethostbyname $_)[0])'

or 

hostname | perl -lpe '$_ = (gethostbyname $_)[0]'

  BJFW> FILENAME=`echo $SOURCE | $PERL -e '$INLINE=<>; chomp $INLINE;
  BJFW> ($MAJORNAME, $MINORNAME)=split (/\./,$INLINE); print
  BJFW> $MINORNAME;'`

similarly this is better as 

echo $SOURCE | perl -pe 's/^.+?([^.]+)\n/$1/'

but if you go a perl centric route these are not needed.

and using uppercase names in perl makes it hard to read.

hth,

uri

-- 
Uri Guttman                             Speed up your web server with Fast CGI!
uri@fastengines.com                                  http://www.fastengines.com


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

Date: 22 Sep 1998 11:20:10 -0700
From: lynn_newton@mcg.mot.com (Lynn D. Newton)
Subject: sorting Unix pathnames of unequal length by filename
Message-Id: <cn1af3sypph.fsf@berio.phx.mcd.mot.com>


Has anyone written any code to sort a list of Unix
pathnames by the final name in the path, regardless of
the number of segments in the path, and using the rest
of the path, from the beginning, as a secondary sort
key? This could be useful in finding duplicate
filenames in different trees. For instance:

/b/c/d/e/f/g/abc.c
/a/b/c/abc.c
/c/aab.c

would be sorted as

/c/aab.c
/a/b/c/abc.c
/b/c/d/e/f/g/abc.c

so that the two paths ending in abc.c would appear
together in the output.

email response would be appreciated. Thank you.

-- 
==================================
Lynn D. Newton
Motorola Computer Group
Tempe, AZ
http://www.eecs.umich.edu/~lnewton
==================================


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

Date: 22 Sep 1998 19:02:44 GMT
From: Zenin <zenin@bawdycaste.org>
Subject: Re: sorting Unix pathnames of unequal length by filename
Message-Id: <906490901.770246@thrush.omix.com>

[posted & mailed]

Lynn D. Newton <lynn_newton@mcg.mot.com> wrote:
: Has anyone written any code to sort a list of Unix
: pathnames by the final name in the path, regardless of
: the number of segments in the path, and using the rest
: of the path, from the beginning, as a secondary sort
: key? This could be useful in finding duplicate
: filenames in different trees. For instance:
	>snip<

	This isn't the fastest code, but it will work:

	use File::Basename;

	my @strings = qw(
	    /b/c/d/e/f/g/abc.c
	    /a/b/c/abc.c
	    /c/aab.c
	);

	@strings = sort {
	    basename ($a) cmp basename ($b)
	    or dirname ($a) cmp dirname ($b)
	} @strings;

	print join "\n", @strings, '';

-- 
-Zenin (zenin@archive.rhps.org)           From The Blue Camel we learn:
BSD:  A psychoactive drug, popular in the 80s, probably developed at UC
Berkeley or thereabouts.  Similar in many ways to the prescription-only
medication called "System V", but infinitely more useful. (Or, at least,
more fun.)  The full chemical name is "Berkeley Standard Distribution".


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

Date: 22 Sep 1998 18:27:38 GMT
From: Zenin <zenin@bawdycaste.org>
Subject: Re: speed of subroutine call vs. call by function reference
Message-Id: <906488798.834029@thrush.omix.com>

John Klassa <klassa@aur.alcatel.com> wrote:
: Under 5.004_04, I get:
:   Benchmark: timing 1000000 iterations of function pointer, subroutine call...
:   function pointer:  7 secs ( 7.95 usr  0.00 sys =  7.95 cpu)
:   subroutine call:  8 secs ( 8.23 usr  0.00 sys =  8.23 cpu)

	You're splitting hairs here.

: I am perplexed by two things:
: 	1.  Why is calling a function via a function reference *faster*
: 	    than a straight subroutine call in 5.004_04?  Seems like there
: 	    ought to be an extra level of indirection, and hence a
: 	    slowdown.

	It's not.  At least, not on all systems:

	Benchmark: timing 1000000 iterations of function pointer, subroutine call...
        function pointer:  2 secs ( 1.24 usr  0.01 sys =  1.25 cpu)
	subroutine call:  1 secs ( 1.21 usr  0.00 sys =  1.21 cpu)

	FreeBSD 2.2.7-STABLE, perl5.00404

: Under 5.005_01, I get:
:   Benchmark: timing 1000000 iterations of function pointer, subroutine call...
:   function pointer: 20 secs (18.92 usr  0.00 sys = 18.92 cpu)
:   subroutine call: 18 secs (17.59 usr  0.00 sys = 17.59 cpu)

: Both versions of perl were compiled with -O, FWIW.

: 	2.  Why is 5.005_01 so much slower?  In the discussions I'd
: 	    seen here, the slowdown associated with having threading
: 	    available (even if not used) was on the order of a few
: 	    percent -- not 100%!

	Not sure, but my non-threaded perl5.00502 isn't nearly this
	much of a difference.  Maybe it's a few percentage overall, but
	function call just happends to be one of the higher hit areas?
	Anyone from p5p like to comment?

-- 
-Zenin (zenin@archive.rhps.org)           From The Blue Camel we learn:
BSD:  A psychoactive drug, popular in the 80s, probably developed at UC
Berkeley or thereabouts.  Similar in many ways to the prescription-only
medication called "System V", but infinitely more useful. (Or, at least,
more fun.)  The full chemical name is "Berkeley Standard Distribution".


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

Date: Tue, 22 Sep 1998 17:50:23 GMT
From: droby@copyright.com
Subject: Re: What happened to perl.moderated?
Message-Id: <6u8o0v$78s$1@nnrp1.dejanews.com>

In article <6u829e$b6n$1@en1.engelschall.com>,
  sb@engelschall.com (Steffen Beyer) wrote:
> I was away from mail and news for 3 months; what happened to the RFV
> for comp.lang.perl.moderated?
>

It passed and the group now exists.

-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/rg_mkgrp.xp   Create Your Own Free Member Forum


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

Date: Tue, 22 Sep 1998 20:32:31 -0700
From: Jan Krynicky <JKRY3025@comenius.ms.mff.cuni.cz>
To: erthling@ihug.co.nz
Subject: Re: Win32::ODBC strange (?) error?!
Message-Id: <36086BCF.34C0@comenius.ms.mff.cuni.cz>

Earthling wrote:
> 
> Gidday folks,
> 
>         I am new to Perl and have decided rather than learning Perl by
> using the useless little programs you see all over the Web (hello
> world, if's, regex stuff etc), I would take a larger task on and see
> if I can't get it to work.
> 
>         What I am trying to do is access an ODBC database (Access 97)
> using the Win32:ODBC interface.  I have successfully set up the
> datasource, I can connect to it and toss simple SQL commands at it..
> All appears to work beautifully.  One thing I have been trying to get
> to work is the TableList() function to work properly.
> 
>         I went to the page of the guy who wrote the ODBC modules for
> Perl to see if I could find out what I needed.  It suggests that once
> I have connected to the datasource, I should be able to do the
> following:
> 
> my(@tables) = $db->TableList;
> 
>         This command on its own produces an error in the odbc module:
> 
> Use of Unitialized value at C:\Perl\5.00502\lib/Win32/ODBC.pm

Looks like Win32::ODBC (at least your version) is not -w safe.
Look at the line in ODBC.pm and try to fix it. If you can't,
drop the -w.

Most probably all you have to do is to add some "defined $variable"
test.

>         This appears, I would be guessing, for each of the tables
> which are in the database.  I am trying to take a list of tables from
> an external file, check to see if they are in my database already, if
> they are, ignore them, if not, then add them.  I have tracked the
> culprit down to this command (with a lot of commenting out parts of
> code).  The funny thing is that the rest of the code works alright, it
> just outputs piles of errors and gets me nervous ;-)  plus, its
> supposed to be outputting to the screen what it is doing, and it just
> doesn't look nice..  At all...

These are NOT errors. These are warnings. Do you hear the difference?
Read perldiag manpage. And also perlrun, for the -w switch.
 
>                                         Regards,
>                                                 Scott

HTH, Jenda


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

Date: 12 Jul 98 21:33:47 GMT (Last modified)
From: Perl-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin) 
Subject: Special: Digest Administrivia (Last modified: 12 Mar 98)
Message-Id: <null>


Administrivia:

Special notice: in a few days, the new group comp.lang.perl.moderated
should be formed. I would rather not support two different groups, and I
know of no other plans to create a digested moderated group. This leaves
me with two options: 1) keep on with this group 2) change to the
moderated one.

If you have opinions on this, send them to
perl-users-request@ruby.oce.orst.edu. 


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.  

To submit articles to comp.lang.perl.misc (and this Digest), send your
article to perl-users@ruby.oce.orst.edu.

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.

The Meta-FAQ, an article containing information about the FAQ, is
available by requesting "send perl-users meta-faq". The real FAQ, as it
appeared last in the newsgroup, can be retrieved with the request "send
perl-users FAQ". Due to their sizes, neither the Meta-FAQ nor the FAQ
are included in the digest.

The "mini-FAQ", which is an updated version of the Meta-FAQ, is
available by requesting "send perl-users mini-faq". It appears twice
weekly in the group, but is not distributed in the digest.

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 V8 Issue 3788
**************************************

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