[13460] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 870 Volume: 9

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Tue Sep 21 20:07:20 1999

Date: Tue, 21 Sep 1999 17:05:12 -0700 (PDT)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Message-Id: <937958712-v9-i870@ruby.oce.orst.edu>
Content-Type: text

Perl-Users Digest           Tue, 21 Sep 1999     Volume: 9 Number: 870

Today's topics:
    Re: a simple redirect with bells and whistles <aslamj@hotmail.com>
    Re: a simple redirect with bells and whistles <aslamj@hotmail.com>
    Re: a simple redirect with bells and whistles <aslamj@hotmail.com>
    Re: a simple redirect with bells and whistles (Kragen Sitaker)
    Re: Ad hominem (was Re: perl related question now!) <elaine@chaos.wustl.edu>
    Re: Ad hominem (was Re: perl related question now!) <cassell@mail.cor.epa.gov>
    Re: Ad hominem (was Re: perl related question now!) <elaine@chaos.wustl.edu>
    Re: Ad hominem (was Re: perl related question now!) (Kragen Sitaker)
    Re: Ad hominem (was Re: perl related question now!) (Martien Verbruggen)
    Re: Ad hominem (was Re: perl related question now!) <elaine@chaos.wustl.edu>
    Re: Anomymous Hash <kjmojek@oakland.edu>
    Re: answers <tchrist@mox.perl.com>
    Re: Case insensitive SQL query mrbog@my-deja.com
    Re: Case insensitive SQL query <cassell@mail.cor.epa.gov>
    Re: Combining variables - newbie (Martien Verbruggen)
    Re: hyperlink submits (Abigail)
    Re: image upload using form (Abigail)
    Re: mkdir(). What am I doing wrong? <sephiroth@id-base.com>
    Re: mkdir(). What am I doing wrong? (Kragen Sitaker)
    Re: need to write www search engine gregory.zhuravlev@gs.com
    Re: Optimizing processing of text files <cassell@mail.cor.epa.gov>
    Re: Perl and WIN32 GUI <email@reply2.field>
    Re: perl related question now! <elaine@chaos.wustl.edu>
    Re: perl related question now! <cassell@mail.cor.epa.gov>
    Re: perl related question now! <elaine@chaos.wustl.edu>
    Re: Recommendation for introductory classroom textbook? <roger@coelacanth.com>
    Re: Saving a list of filenames from directory into an a (Kragen Sitaker)
    Re: Web browers <cassell@mail.cor.epa.gov>
    Re: What happens with this slice? <alex@kawo2.rwth-aachen.de>
    Re: Which are the best books for learning Perl for use  <theglauber@my-deja.com>
        Digest Administrivia (Last modified: 16 Sep 99) (Perl-Users-Digest Admin)

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

Date: Tue, 21 Sep 1999 22:32:11 GMT
From: Jamil Aslam <aslamj@hotmail.com>
Subject: Re: a simple redirect with bells and whistles
Message-Id: <37E8066F.995D3FAB@hotmail.com>

I'm not too good at explaining things so heres another attempt...

[start snip from my code]
use HTTP::Request::Common qw(POST);
use LWP::UserAgent;

$ua = new UserAgent;
$ua->request(POST 'http://localhost/test.php', [%FORM]);
[end snip from my code]

happily, I'll get the response of the request if I print $ua->as_string but it
doesn't do what I want it to do...that is to update the browser automatically
to the POSTed page. The end result should be that as soon as I send the
request, the browser should immediately jump to the page that is being posted
at. The php script in the above example should then create a page based on the
%FORM data it is sent.

What do you think?

Jamil

Makarand Kulkarni wrote:

> [ MJA wrote:
>
> > (More detailed)...my script once completed should send data to another
> > script as though it was posting the information from the client to a
> > FORM on that html page. Note: the browser should display the new page.
>
> As your Question is not very clear my answer might be at best approximate.
>
> Read your cgi params as usual and run your script as usual. Assume
> this is cgi1.  After you run thru cgi1 you will have your name & value
> params for your next script cgi2. Access the dynamic page created
> by cgi2 using LWP::UserAgent and HTTP::Request::Common ( the
> perldocs will give you good sample code ). Return this page
> to the browser.
>
> As a result of these steps the o/p from cgi2 gets sent to the browser
> and cgi1 remains silent.
>
> --



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

Date: Tue, 21 Sep 1999 22:36:55 GMT
From: Jamil Aslam <aslamj@hotmail.com>
Subject: Re: a simple redirect with bells and whistles
Message-Id: <37E8078B.7DE9FB1D@hotmail.com>

I forgot to mention that although I could print the response, the URI of the
browser would obviously not point to the right place and instead at the original
script. I'm trying to make the whole operation invisible to the end user. i think.

Jamil Aslam wrote:

> I'm not too good at explaining things so heres another attempt...
>
> [start snip from my code]
> use HTTP::Request::Common qw(POST);
> use LWP::UserAgent;
>
> $ua = new UserAgent;
> $ua->request(POST 'http://localhost/test.php', [%FORM]);
> [end snip from my code]
>
> happily, I'll get the response of the request if I print $ua->as_string but it
> doesn't do what I want it to do...that is to update the browser automatically
> to the POSTed page. The end result should be that as soon as I send the
> request, the browser should immediately jump to the page that is being posted
> at. The php script in the above example should then create a page based on the
> %FORM data it is sent.
>
> What do you think?
>
> Jamil
>
> Makarand Kulkarni wrote:
>
> > [ MJA wrote:
> >
> > > (More detailed)...my script once completed should send data to another
> > > script as though it was posting the information from the client to a
> > > FORM on that html page. Note: the browser should display the new page.
> >
> > As your Question is not very clear my answer might be at best approximate.
> >
> > Read your cgi params as usual and run your script as usual. Assume
> > this is cgi1.  After you run thru cgi1 you will have your name & value
> > params for your next script cgi2. Access the dynamic page created
> > by cgi2 using LWP::UserAgent and HTTP::Request::Common ( the
> > perldocs will give you good sample code ). Return this page
> > to the browser.
> >
> > As a result of these steps the o/p from cgi2 gets sent to the browser
> > and cgi1 remains silent.
> >
> > --



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

Date: Tue, 21 Sep 1999 22:52:16 GMT
From: Jamil Aslam <aslamj@hotmail.com>
Subject: Re: a simple redirect with bells and whistles
Message-Id: <37E80B25.9696A324@hotmail.com>

Ray,
sorry! I didn't get all of that...
I got as far as subclassing the UserAgent..but where does that redirect_ok thing
come from? and what exactly would it do? I like the idea, but not to sure how to
do it. And does it mean that the browser will be sent to the new page?

Jamil.

RayG wrote:

> On Tue, 21 Sep 1999, Kragen Sitaker wrote:
>
> > In article <37E7E0AB.B3CEC9BB@hotmail.com>, MJA  <aslamj@hotmail.com> wrote:
> > >How can I redirect the browser and send data (in the POST method) to
> > >another script?
> >
> > You can't.  And you're asking in the wrong newsfroup.
>
> i thought you could subclass LWP::UserAgent and then modify redirect_ok to
> allow for this action.



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

Date: Tue, 21 Sep 1999 23:41:40 GMT
From: kragen@dnaco.net (Kragen Sitaker)
Subject: Re: a simple redirect with bells and whistles
Message-Id: <UIUF3.2106$QJ.73936@typ11.nn.bcandid.com>

In article <37E8078B.7DE9FB1D@hotmail.com>,
Jamil Aslam  <aslamj@hotmail.com> wrote:
>I forgot to mention that although I could print the response, the URI of the
>browser would obviously not point to the right place and instead at the original
>script. I'm trying to make the whole operation invisible to the end
>user. i think.

Can't be done by legitimate means.  You could probably do it by taking
control of your user's browser, e.g. with JavaScript or another
security hole.  But I don't know much about that.


-- 
<kragen@pobox.com>       Kragen Sitaker     <http://www.pobox.com/~kragen/>
Tue Sep 21 1999
48 days until the Internet stock bubble bursts on Monday, 1999-11-08.
<URL:http://www.pobox.com/~kragen/bubble.html>


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

Date: Tue, 21 Sep 1999 18:07:32 -0400
From: Elaine -HFB- Ashton <elaine@chaos.wustl.edu>
Subject: Re: Ad hominem (was Re: perl related question now!)
Message-Id: <37E80141.9A05EBBC@chaos.wustl.edu>

Kragen Sitaker wrote:
> >Fallacy? Hmmm...I'm not sure that is totally correct, though it might be
> >a nuance. I would call it annoying, argumentative, incendiary. :)
> 
> "In everyday English the word "fallacy" is used to refer to mistaken
>  beliefs, as well as to the faulty reasoning that leads to those
>  beliefs. In logic, the term is generally used for a form of technically
>  incorrect argument -- especially if the argument appears valid or
>  convincing." -- http://www.geocities.com/Athens/5948/logic.htm

I understand the definition of fallacy. However, one man's mistaken
beliefs is another man's mission from god, his deus machina, raison
d'etre, etc. It may be a fallacy to all but the loon, but the fact that
the person does it either out of ignorance or ire doesn't matter, the
argument is valid to them. Also, ad hominem arguments are usually devoid
of all reason. It is in that sense that I think fallacy is best used
elsewhere. I see fallacy used more for benign impersonal arguments.

> Ubi parva leves, ibi anima de Kragen.

Sember ubi, sub ubi. :)

e.


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

Date: Tue, 21 Sep 1999 16:28:46 -0700
From: David Cassell <cassell@mail.cor.epa.gov>
Subject: Re: Ad hominem (was Re: perl related question now!)
Message-Id: <37E814AE.2F2FBF03@mail.cor.epa.gov>

Elaine -HFB- Ashton wrote:
[snip]
> I understand the definition of fallacy. However, one man's mistaken
> beliefs is another man's mission from god, his deus machina, raison

or even his _deus_ex_machina_ 

> d'etre, etc.
[snip]

David
-- 
David Cassell, OAO                     cassell@mail.cor.epa.gov
Senior computing specialist
mathematical statistician


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

Date: Tue, 21 Sep 1999 19:44:22 -0400
From: Elaine -HFB- Ashton <elaine@chaos.wustl.edu>
Subject: Re: Ad hominem (was Re: perl related question now!)
Message-Id: <37E817EC.DECC7EF2@chaos.wustl.edu>

David Cassell wrote:
> or even his _deus_ex_machina_

yup. :)

e.


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

Date: Tue, 21 Sep 1999 23:49:04 GMT
From: kragen@dnaco.net (Kragen Sitaker)
Subject: Re: Ad hominem (was Re: perl related question now!)
Message-Id: <QPUF3.2143$QJ.81965@typ11.nn.bcandid.com>

In article <37E80141.9A05EBBC@chaos.wustl.edu>,
Elaine -HFB- Ashton  <elaine@chaos.wustl.edu> wrote:
>Kragen Sitaker wrote:
>> >Fallacy? Hmmm...I'm not sure that is totally correct, though it might be
>> >a nuance. I would call it annoying, argumentative, incendiary. :)
>> 
>> "In everyday English the word "fallacy" is used to refer to mistaken
>>  beliefs, as well as to the faulty reasoning that leads to those
>>  beliefs. In logic, the term is generally used for a form of technically
>>  incorrect argument -- especially if the argument appears valid or
>>  convincing." -- http://www.geocities.com/Athens/5948/logic.htm
>
>I understand the definition of fallacy. However, one man's mistaken
>beliefs is another man's mission from god, his deus machina, raison
>d'etre, etc.

Right.  Argumentum ad hominem is a fallacy in the other sense, the
sense of a logically invalid argument.

>> Ubi parva leves, ibi anima de Kragen.

>Sember ubi, sub ubi. :)

Sorry, I can't understand that.  I think my Latin classes, such as they
were, are fading after years of disuse.  :(


-- 
<kragen@pobox.com>       Kragen Sitaker     <http://www.pobox.com/~kragen/>
Tue Sep 21 1999
48 days until the Internet stock bubble bursts on Monday, 1999-11-08.
<URL:http://www.pobox.com/~kragen/bubble.html>


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

Date: Tue, 21 Sep 1999 23:56:11 GMT
From: mgjv@comdyn.com.au (Martien Verbruggen)
Subject: Re: Ad hominem (was Re: perl related question now!)
Message-Id: <vWUF3.64$ml3.5445@nsw.nnrp.telstra.net>

In article <xaPF3.520$QJ.20558@typ11.nn.bcandid.com>,
	kragen@dnaco.net (Kragen Sitaker) writes:

> If I say your ideas about genetic superiority resemble the discredited
> ideas of the Nazis and of social Darwinists, that is not argumentum ad
> hominem.  If I say you are a Nazi, that is argumentum ad hominem.

How come you mentioned Nazis and the thread is still going? Maybe you
should have mentioned Hitler personally :)

Martien
-- 
Martien Verbruggen                  | 
Interactive Media Division          | Begin at the beginning and go on till
Commercial Dynamics Pty. Ltd.       | you come to the end; then stop.
NSW, Australia                      | 


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

Date: Tue, 21 Sep 1999 20:06:34 -0400
From: Elaine -HFB- Ashton <elaine@chaos.wustl.edu>
Subject: Re: Ad hominem (was Re: perl related question now!)
Message-Id: <37E81D1F.892EBDC5@chaos.wustl.edu>

Kragen Sitaker wrote:
> Right.  Argumentum ad hominem is a fallacy in the other sense, the
> sense of a logically invalid argument.

Right, but in the denotative sense, not quite so much in the connotative
sense. 

> Sorry, I can't understand that.  I think my Latin classes, such as they
> were, are fading after years of disuse.  :(

Semper ubi sub ubi = Always wear under wear. :) 

It's a quip darling. Dumb Latin humour like us chemists have old yuks
like this one:

	FE
    /   \
  OC     CO
   |	    |		=  	?
  OC     CO
    \   /
      FE


:)

e.


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

Date: Tue, 21 Sep 1999 18:56:10 -0400
From: "Kevin Mojek" <kjmojek@oakland.edu>
Subject: Re: Anomymous Hash
Message-Id: <7s8gm3$rob$1@news2.acs.oakland.edu>


Anders Wallin wrote in message <7s5hig$i5k$1@nnrp1.deja.com>...
>Hi !
>
>I need to build a structure that looks as follows while processing a
>text file:
>
>  Country
>     City
>         Street
>
>Example:
>   SWEDEN
>       STOCKHOLM
>           street1
>           street2
>       LUND
>           street1
>           street3
>   NORWAY
>       OSLO
>           street 1....
>
>It seemed that the concept of anonymous hashes could be useful. I am
>however stuck getting this to work (both creating the hashes and
>printing them). I would greatly appreciate any help.

This will do it using two simple classes...


package City;
sub new {
  my ($pkg, $name) = @_;
  bless {
    name => $name,
    streets => [ ],
  }, $pkg;
}
sub addStreet($$) {
  my ($self, $street) = @_;
  my $ar = $self->{streets};
  push @$ar, $street;
}
sub print($) {
  my $self = shift;
  my $name = $self->{name};
  my $streets = $self->{streets};
  print "  City '$name':\n";
  foreach $street (@$streets) {
    print "    Street '$street'\n";
  }
}

package Country;
sub new {
  my ($pkg,$name) = @_;
  bless {
    name => $name,
    cities => [ ],
  }, $pkg;
}
sub addCity($$) {
  my ($self,$city) = @_;
  my $ar = $self->{cities};
  push @$ar, $city;
}
sub print($) {
  my $self = shift;
  my $name = $self->{name};
  my $cities= $self->{cities};
  print "Country '$name':\n";
  foreach $city(@$cities) {
    $city->print();
  }
}

package main;
my $country = new Country('SWEDEN');
my $city = new City('STOCKHOLM');
$country->addCity($city);
$city->addStreet('Street 1');
$city->addStreet('Street 2');
$country->print();




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

Date: 21 Sep 1999 16:27:02 -0700
From: Tom Christiansen <tchrist@mox.perl.com>
Subject: Re: answers
Message-Id: <37e80636@cs.colorado.edu>

In comp.lang.perl.misc, "Andrew" <casino@start.com.au> writes:
:love the way people say...
:'not a perl question'
:or
:'read some doco'
:
:is this because you are so arrogant or just don't know?

Anybody want to bet me this is a Prisoner of Bill?  Sure smells of it.

--tom
-- 
 "If you steal from 1 you are plagarizing If you steal from 10 you
 are doing research If you steal from 100 you are an expert." -B Delaney


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

Date: Tue, 21 Sep 1999 22:04:07 GMT
From: mrbog@my-deja.com
Subject: Re: Case insensitive SQL query
Message-Id: <7s8vcg$1v2$1@nnrp1.deja.com>



The connection here is that it's tangentially related to perl. That's
the connection.  A policy of just "perl only" is TOO RESTRICTIVE. Ever
heard of that concept? "too restrictive"?  It applies to your overly
strict perl-only theory.




In article <slrn7uddav.18s.mstevens@swirl.internal.fict>,
  mstevens@ashre.demon.co.uk (Michael Stevens) wrote:
> On Mon, 20 Sep 1999 21:55:07 GMT, mrbog@my-deja.com <mrbog@my-
deja.com> wrote:
> >No, the goal isn't to solve people's perl problems, it's to solve
their
> >problems! If one of "the regulars" has the answer to a question that
is
> >tangentially related to perl, as mine was, then it does just as much
> >good for him to answer it as anyone.
>
> Does the name of the group not suggest anything to you? People
> come here to discuss perl. Why do you want to force them to talk
> about other things?
>
> >Remember, there are people asking perl questions on non-perl
newsgroups
> >as well, so the argument that "oh there are sooo many questions" is
> >completely ridiculous.
>
> Make the connection here or expect people to consider this silly.
>
>


Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.


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

Date: Tue, 21 Sep 1999 16:38:36 -0700
From: David Cassell <cassell@mail.cor.epa.gov>
Subject: Re: Case insensitive SQL query
Message-Id: <37E816FC.EEC725E9@mail.cor.epa.gov>

mrbog@my-deja.com wrote:
> 
> The connection here is that it's tangentially related to perl. That's
> the connection.  A policy of just "perl only" is TOO RESTRICTIVE. Ever
> heard of that concept? "too restrictive"?  It applies to your overly
> strict perl-only theory.

It's tangentially related to programming too.  Maybe you should
post it to comp.lang.misc and comp.algorithms just to make sure
it gets out to the right places.

Hasn't anyone explained to you that newsgroups are what their
*creators* wanted, not what *you* would like them to be?  Or do
you also go to alt.food.dennys and insist that they discuss
racism? [That's a reference, in case you wonder.]  Go to
news.newusers.questions and read the part about newsgroups
and charters.

David
-- 
David Cassell, OAO                     cassell@mail.cor.epa.gov
Senior computing specialist
mathematical statistician


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

Date: Tue, 21 Sep 1999 23:52:19 GMT
From: mgjv@comdyn.com.au (Martien Verbruggen)
Subject: Re: Combining variables - newbie
Message-Id: <TSUF3.61$ml3.5445@nsw.nnrp.telstra.net>

In article <7s8fo7$9rc$1@murdoch.acc.virginia.edu>,
	mdz4c@node14.unix.Virginia.EDU (Matthew David Zimmerman) writes:
> In article <7s71hj$km9$1@nnrp1.deja.com>, Graham W. Boyes  <me@toao.net> wrote:
>>Hello,
>>
>>I have two variables, $var1 and $var2 which I'd like to combine into a
>>single variable $var3 with a space in between.  How should I do this?
>>
>>I grant that sounds really, REALLY stupid.
> 
> It's a very simple question. But don't mind the gurus. They can be
> cranky.

Not at all :). The thread that got started here is actually quite
entertaining.  Thanks! :)

Martien
-- 
Martien Verbruggen                  | 
Interactive Media Division          | 
Commercial Dynamics Pty. Ltd.       | "Mr Kaplan. Paging Mr Kaplan..."
NSW, Australia                      | 


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

Date: 21 Sep 1999 18:18:55 -0500
From: abigail@delanet.com (Abigail)
Subject: Re: hyperlink submits
Message-Id: <slrn7ug4np.cng.abigail@alexandra.delanet.com>

James W Corpening (jwc@acsu.buffalo.edu) wrote on MMCCXII September
MCMXCIII in <URL:news:37E7B509.34EAAF0@buffalo.edu>:
`` 
`` I've searched the FAQs, perl.com, and other places, but I haven't found
`` a hint as to how to make a hyperlink work as a submit button.  Is it
`` possible (I sorta remember seeing instructions, somewhere)?  If so, how?


What makes you think perl.com would have any information about that?
Did you go to www.eiffel.com as well? Or to www.python.org? And what
FAQs did you read? There are hundreds of them on rtfm.mit.edu.



Abigail
-- 
perl  -e '$_ = q *4a75737420616e6f74686572205065726c204861636b65720a*;
          for ($*=******;$**=******;$**=******) {$**=*******s*..*qq}
          print chr 0x$& and q
          qq}*excess********}'


  -----------== Posted via Newsfeeds.Com, Uncensored Usenet News ==----------
   http://www.newsfeeds.com       The Largest Usenet Servers in the World!
------== Over 73,000 Newsgroups - Including  Dedicated  Binaries Servers ==-----


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

Date: 21 Sep 1999 18:25:05 -0500
From: abigail@delanet.com (Abigail)
Subject: Re: image upload using form
Message-Id: <slrn7ug53b.cng.abigail@alexandra.delanet.com>

me (jmontany@clarityconnect.com) wrote on MMCCXII September MCMXCIII in
<URL:news:37de1d72.7267557@news1.clarityconnect.com>:
;; 
;; The problem is, when image files are saved, they are useless. All the
;; data is there but they are no longer usable. Does anybody know why?
;; and how it can be fixed?


What do you mean by "no longer usable"?



Abigail
-- 
perl -wlne '}print$.;{' file  # Count the number of lines.


  -----------== Posted via Newsfeeds.Com, Uncensored Usenet News ==----------
   http://www.newsfeeds.com       The Largest Usenet Servers in the World!
------== Over 73,000 Newsgroups - Including  Dedicated  Binaries Servers ==-----


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

Date: Tue, 21 Sep 1999 23:05:16 +0100
From: "sephiroth@id-base.com" <sephiroth@id-base.com>
Subject: Re: mkdir(). What am I doing wrong?
Message-Id: <37E8011B.F2619BF3@id-base.com>

David Cassell wrote:

> Oh, really?  Did you try that on his OS?
>
> He has his permissions wrong.

hey just pointing out a common mistake which brings up the "forbidden access"
message. On your standard linux server, if there is no web page defined as
the index page, then the directory is usually declared as forbidden depending
on it's permissions. If you have total access, then you will probably get the
full listing of the directory.

--
Aaron jp----is----------------------
Dj ShinyBlue--owner--of-------------
http://www.freelocalcalls.com/p3----
http://get.to/blahblur--------------
http://members.dencity.com/blahblur-




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

Date: Tue, 21 Sep 1999 23:44:55 GMT
From: kragen@dnaco.net (Kragen Sitaker)
Subject: Re: mkdir(). What am I doing wrong?
Message-Id: <XLUF3.2121$QJ.80358@typ11.nn.bcandid.com>

In article <37E8011B.F2619BF3@id-base.com>,
sephiroth@id-base.com <sephiroth@id-base.com> wrote:
>hey just pointing out a common mistake which brings up the "forbidden access"
>message. On your standard linux server, if there is no web page defined as
>the index page, then the directory is usually declared as forbidden depending
>on it's permissions. If you have total access, then you will probably get the
>full listing of the directory.

Standard Linux does not include a Web server.  Most Linux
distributions, however, include Apache, which does not behave as you
describe.


-- 
<kragen@pobox.com>       Kragen Sitaker     <http://www.pobox.com/~kragen/>
Tue Sep 21 1999
48 days until the Internet stock bubble bursts on Monday, 1999-11-08.
<URL:http://www.pobox.com/~kragen/bubble.html>


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

Date: Tue, 21 Sep 1999 22:22:37 GMT
From: gregory.zhuravlev@gs.com
Subject: Re: need to write www search engine
Message-Id: <7s90f2$2p0$1@nnrp1.deja.com>

Mike,

do you know where I can find a source code for any web spider? Doesn't
have to be fancy, but sth that I can start to work with?

Thanks,
Greg


In article <37E07AC3.BDE22F61@ix.netcom.com>,
  gremlin <gremlin_NO_SPAM_@ix.netcom.com> wrote:
> This is a total guess, so I guess it is as much a question as an
> answer.  But why not have your crawlers start off by working from a
> result list for "URL:gov" or whatever the exact syntax is from
> AlstaVista, etc.?  This way you let the big search engines do some of
> the up front work for you.  You might even be able to be more specific
> for your "chunks", e.g., "URL: *NOAA*.gov".  The crawlers could build
> their own list/database of links by extracting them from the sites as
> you search them.  Is this totally stupid?  Wouldn't be the first time
:)
>
> Mike
>
> Roger Jacques wrote:
> >
> > I want to write a robot program that will search all www sites by
> > domain type and return the <title>.
>


Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.


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

Date: Tue, 21 Sep 1999 16:23:22 -0700
From: David Cassell <cassell@mail.cor.epa.gov>
Subject: Re: Optimizing processing of text files
Message-Id: <37E8136A.68C219A9@mail.cor.epa.gov>

Andy Squires wrote:
> 
> Hi everyone,

Howdy.

> I guess I'm  looking for ideas on how I can make a process more efficient.
> I have a directory with a boatload of .html, .jpg, and .txt files.  All of
> the file names are in lower case.  I want to change all of the links in the
> ..html files which reference any of the files in the directory to lower
> case.  Now there a mishmash of lower, upper and mixed case and a nightmare
> to maintain.  Borrowing from the Perl FAQ I wrote the code below, but it
> takes many hours to process a directory with about 980 files.  Any ideas on
> how I might make it run more quickly?  TIA, I appreciate it.

Okay, I would suggest that you re-consider your algorithm.
You've got nested loops over a huge set of files.  Not the
way to go.  Instead, go back to the FAQ and look at how to
match a whole set of patterns at the same time.  Look for this
in perlfaq6:

"How do I efficiently match many regular expressions at once?"

Build your search string as in that FAQ.  Then walk through
your array @htmlfiles one time only, making the substitution
pretty much as you already have it.  That ought to really 
decrease your time.

> #!/usr/local/bin/perl -w

Good.  I would also recommend moving to 'use strict;' as well.
You'll have to my() variables like $some_dir .

> $some_dir = '/home/squires/www';
> 
>     opendir(DIR, $some_dir) || die "can't opendir $some_dir: $!";

Good!  Checking your returns.  More good karma accrues.

[snip of similar code]
 
> foreach $file (@files) {
> foreach $htmlfile (@htmlfiles) {
> &procfiles($file, $htmlfile);
> }
> }

Yep, here's the killer.  Modifying your algorithm so
you don't have this N-squared feature will make your life
a lot easier.
 
HTH,
David
-- 
David Cassell, OAO                     cassell@mail.cor.epa.gov
Senior computing specialist
mathematical statistician


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

Date: Wed, 22 Sep 1999 00:53:56 +0200
From: "Joe Yates" <email@reply2.field>
Subject: Re: Perl and WIN32 GUI
Message-Id: <37e80cc5.0@news.dada.it>


Jon Banquer <jbtech@mpinet.net> wrote in message
news:ruen7vdrlg737@corp.supernews.com...
> >I am trying to find out if there is sufficient interest in this stuff
before
> >contributing it and this depends on how many people use, or would like to
> >use, perl as a tool in Windows programming.
>
> I might be, if an easy tool for interfacing with the Windows API was
> available and if the documentation was Laura Lemay like.
>
> jon
>
I think Aldo Calpini's WIN32 module is a very good tool. I am at present
suggesting some additions.

The only problem with Perl is that it keep you away from playing around with
pointers. Clearly you can us XS, but that's another matter.

My interest is not so much calling Windows API functions from perl, rather
the use of Perl in C++/Visual Basic programs.

As so many computers have Windows and Perl is so wonderful for text, is
nobody else working with both? If so, how?

Joe Yates





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

Date: Tue, 21 Sep 1999 19:01:38 -0400
From: Elaine -HFB- Ashton <elaine@chaos.wustl.edu>
Subject: Re: perl related question now!
Message-Id: <37E80DEB.AF1D2513@chaos.wustl.edu>

Larry Rosler wrote:
> Each of your four examples uses the 'ad quem' phrase as a noun-modifier,
> i.e. an adjective.  I'm having trouble coming up with an adverbial use
> (i.e., verb-, adjective-, or adverb-modifier).

Hmm...yes, I should have paid more attention. "She ad hominemly bickered
to her husband." or "She ad remly protested to the Dean"...hmmm...of
course we could split a few infinitives for fun and giggles. :)

> I'm beginning to think the 'adv' is just an error.

It works, but just less often used as it is more awkward perhaps. All
the dictionaries I have refer to both as adj & adv. 

e.


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

Date: Tue, 21 Sep 1999 16:32:07 -0700
From: David Cassell <cassell@mail.cor.epa.gov>
Subject: Re: perl related question now!
Message-Id: <37E81577.CE6579EF@mail.cor.epa.gov>

Larry Rosler wrote:
> 
> In article <37E7F007.7B804B93@chaos.wustl.edu> on Tue, 21 Sep 1999
> 16:53:58 -0400, Elaine -HFB- Ashton <elaine@chaos.wustl.edu> says...
> > Larry Rosler wrote:
> > > Why one of these is described as an adjective and the other as an adverb
> > > is beyond me.  Maybe I need a better dictionary.  :-)

They're usable as both in 'modern' English.  As in:
"He was arguing _ad_hominem_, the big jerk." [adverb]

> Each of your four examples uses the 'ad quem' phrase as a noun-modifier,
> i.e. an adjective.  I'm having trouble coming up with an adverbial use
> (i.e., verb-, adjective-, or adverb-modifier).
> 
> "Her argument was ad hominem."  Still a (predicate) adjective.  I'm
> beginning to think the 'adv' is just an error.

You're just not thinking like an advertising exec.  [Not
that you would want to...]  Now verbify those nouns!  :-)

David
-- 
David Cassell, OAO                     cassell@mail.cor.epa.gov
Senior computing specialist
mathematical statistician


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

Date: Tue, 21 Sep 1999 19:41:12 -0400
From: Elaine -HFB- Ashton <elaine@chaos.wustl.edu>
Subject: Re: perl related question now!
Message-Id: <37E8172F.33C1AED0@chaos.wustl.edu>

David Cassell wrote:
> You're just not thinking like an advertising exec.  [Not
> that you would want to...]  Now verbify those nouns!  :-)

LOL! :)

Ad hominem me! Yeah, baby! Yeah!

e.


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

Date: Tue, 21 Sep 1999 22:41:24 GMT
From: Roger Williams <roger@coelacanth.com>
Subject: Re: Recommendation for introductory classroom textbook?
Message-Id: <m3vh93yjjf.fsf@grouper.coelacanth.com>

>>>>> Tom Christiansen <tchrist@mox.perl.com> writes:

  > My experiences, biased or uncommon though they may be, is that the
  > Perl Cookbook plus the Perl Pocket Reference by JV, combined with
  > lecture notes, are the best for people who know some programming.

Frankly, I've been tending towards this conclusion myself.  

In my Unix class in the spring, I wrote up 100 pages of lecture notes
on Perl, which covered roughly the same material as the Llama book.
We got through those in three weeks, so even a group of slow students
wouldn't be able to stretch out the book past the middle of the
semester.

Depending upon the makeup and interests of my class, I'd probably skip
parts of chapters 13 - 16 (and possible *parts* of 17 - 18) in order
to concentrate on 19 - 20.  I think that I can fit that into 11
three-hour weekly classes.

-- 
Roger Williams                         finger me for my PGP public key
Coelacanth Engineering Inc    consulting & turnkey product development
Middleborough, Massachusetts           wireless * datacomm * DSP * ATE
tel +1 508 947-5585 * fax +1 508 861-0278 * http://www.coelacanth.com/


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

Date: Tue, 21 Sep 1999 23:43:20 GMT
From: kragen@dnaco.net (Kragen Sitaker)
Subject: Re: Saving a list of filenames from directory into an array.
Message-Id: <sKUF3.2116$QJ.81004@typ11.nn.bcandid.com>

In article <37E7FD9C.EE0B9D27@mail.cor.epa.gov>,
David Cassell  <cassell@mail.cor.epa.gov> wrote:
>It was in the thread.  But a lot of newsfeeds seem to be 
>dropping those Abigail posts lately.  Wasn't Cameron Dorey
>complaining about that just the other week?

Yes.  Someone said newsfeeds.com did a lot to make sure they would
never get good propagation (Sexzilla? Netzilla? spam?).  IMHO, Abigail
should get a decent Usenet provider, one that wouldn't append offensive
ads to the ends of all of his posts.


-- 
<kragen@pobox.com>       Kragen Sitaker     <http://www.pobox.com/~kragen/>
Tue Sep 21 1999
48 days until the Internet stock bubble bursts on Monday, 1999-11-08.
<URL:http://www.pobox.com/~kragen/bubble.html>


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

Date: Tue, 21 Sep 1999 16:24:06 -0700
From: David Cassell <cassell@mail.cor.epa.gov>
Subject: Re: Web browers
Message-Id: <37E81396.43313E18@mail.cor.epa.gov>

Michael Stevens wrote:
> 
> On Tue, 21 Sep 1999 09:56:34 -0700, Jazz <jazzie01NOmsSPAM@hotmail.com> wrote:
> >What web brower was introduced in 1993?
> 
> You posted this twice from different email addresses, and it's not
> a perl question.

But he really needs the answer!  How else is he going to win
that million dollars from Regis Philbin?
 
David
-- 
David Cassell, OAO                     cassell@mail.cor.epa.gov
Senior computing specialist
mathematical statistician


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

Date: Wed, 22 Sep 1999 00:17:35 +0200
From: Alex Farber <alex@kawo2.rwth-aachen.de>
To: Jonathan Stowe <gellyfish@gellyfish.com>, aqumsieh@matrox.com, makkulka@cisco.com
Subject: Re: What happens with this slice?
Message-Id: <37E803FF.53ED6B6B@kawo2.rwth-aachen.de>

[posted+mailed]

Guys,

Jonathan Stowe wrote:
> On Fri, 17 Sep 1999 20:35:38 +0200 Alex Farber wrote:
> > for some strange reason it works now.

thanks again for your help! I know the reason now (one week later): 
this error message "Modification of a read-only value attempted 
at ./print-zurnali.pl line 99." occures only if I have less than 
10 entries in my list of hashes @loh.

Then the slice  (sort { $a->{day} <=> $b->{day} } @l)[0..9]
will contain empty values and when I try to set $href->{rank}
in that line 99 the $href is NULL.

Once I had more than 10 entries in my database (and so in @loh)
the error magically ;-) disappeared.

Regards
Alex


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

Date: Tue, 21 Sep 1999 23:41:08 GMT
From: The Glauber <theglauber@my-deja.com>
Subject: Re: Which are the best books for learning Perl for use in a Web environment?
Message-Id: <7s952h$63u$1@nnrp1.deja.com>

In article <37e762f8_2@newsread3.dircon.co.uk>,
  "Paul" <NoSpam@NoSpam.com> wrote:
> Hi,
>
> I wish to learn Perl for use in a Web environment.  The following
books
> seem to come recommended by many people are they relevant for Web
> programming?
>
> Learning Perl, Programming Perl, Perl Cookbook


If you want a good deal and you don't mind using a computer to read
your books, get "The Perl CD Bookshelf" from O'Reilly. You end up with
6 books for the price of 2.

--
Glauber Ribeiro
theglauber@my-deja.com
"Opinions stated are my own and not representative of Experian"


Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.


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

Date: 16 Sep 99 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin) 
Subject: Digest Administrivia (Last modified: 16 Sep 99)
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: The mail to news gateway, and thus the ability to submit articles
| through this service to the newsgroup, has been removed. I do not have
| time to individually vet each article to make sure that someone isn't
| abusing the service, and I no longer have any desire to waste my time
| dealing with the campus admins when some fool complains to them about an
| article that has come through the gateway instead of complaining
| to the source.

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 V9 Issue 870
*************************************


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