[13655] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 1065 Volume: 9

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Fri Oct 15 14:51:57 1999

Date: Fri, 15 Oct 1999 11:51:43 -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: <940013501-v9-i1065@ruby.oce.orst.edu>
Content-Type: text

Perl-Users Digest           Fri, 15 Oct 1999     Volume: 9 Number: 1065

Today's topics:
        how to get a script load as the first page rancorr@hotmail.com
    Re: how to get a script load as the first page <rootbeer@redcat.com>
    Re: how to get a script load as the first page <jtribbeck@argogroup.com>
    Re: how to get a script load as the first page <c4jgurney@my-deja.com>
    Re: how to get a script load as the first page <gellyfish@gellyfish.com>
    Re: how to get a script load as the first page <makkulka@cisco.com>
    Re: how to get a script load as the first page <af778NOafSPAM@iname.com.invalid>
    Re: How to get last dir from path??????????? <gellyfish@gellyfish.com>
    Re: How to get last dir from path??????????? (Peter J. Kernan)
    Re: How to get last dir from path??????????? (Larry Rosler)
    Re: How to get last dir from path??????????? (Peter J. Kernan)
        How to inquire, position and click the mouse in PERL? (Nim Chu)
        How to make a perlscript run as a deamon <volleymicke@hotmail.com>
    Re: How to make a perlscript run as a deamon (Clinton Pierce)
        How to resize a web browser <ruby@ebooksys.com>
    Re: How to resize a web browser <marcel.grunauer@lovely.net>
    Re: How to resize a web browser <makkulka@cisco.com>
    Re: How to resize a web browser <cassell@mail.cor.epa.gov>
    Re: How to resize a web browser <aaron@aaronpropst.com>
    Re: How to resize a web browser <gellyfish@gellyfish.com>
    Re: How to resize a web browser <aaron@aaronpropst.com>
    Re: How to resize a web browser <gellyfish@gellyfish.com>
    Re: How to resize a web browser <pdobbs@home.com>
        How to tie a hash of references to a DB_File (oivvio polite)
    Re: How to tie a hash of references to a DB_File (Eric Bohlman)
    Re: HPUX 11 (I.J. Garlick)
        HPUX 9.x Perl binaries (Michael Blackmore)
    Re: HPUX 9.x Perl binaries <rootbeer@redcat.com>
        HTTPD::Daemon and HTTP::Request (Bill Moseley)
    Re: HTTPD::Daemon and HTTP::Request <gisle@aas.no>
        Digest Administrivia (Last modified: 16 Sep 99) (Perl-Users-Digest Admin)

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

Date: Thu, 14 Oct 1999 01:27:33 GMT
From: rancorr@hotmail.com
Subject: how to get a script load as the first page
Message-Id: <7u3bhl$m3e$1@nnrp1.deja.com>

I'm trying to get a perl script to load up as the first page of my
website; however, my ISP instinctively loads up the index.html file
when a particular HTML file is not specified by the domain name.

how can i work around this?  can i get my index.html file to autoload
my perl script?  if so, how would I do this?

please reply to rancorr@hotmail.com  Thanks!


Sent via Deja.com http://www.deja.com/
Before you buy.


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

Date: Wed, 13 Oct 1999 19:06:10 -0700
From: Tom Phoenix <rootbeer@redcat.com>
Subject: Re: how to get a script load as the first page
Message-Id: <Pine.GSO.4.10.9910131901560.25558-100000@user2.teleport.com>

On Thu, 14 Oct 1999 rancorr@hotmail.com wrote:

> I'm trying to get a perl script to load up as the first page of my
> website; 

It sounds as if you want to get your webserver to do something. Your local
expert or webmaster will know more about your webserver and how it's
configured than anyone in the far reaches of the net. But if you must ask
someone on the net, you should search for a newsgroup about webservers and
related issues, and read its FAQ first. Cheers!

-- 
Tom Phoenix       Perl Training and Hacking       Esperanto
Randal Schwartz Case:     http://www.rahul.net/jeffrey/ovs/



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

Date: Thu, 14 Oct 1999 10:05:30 +0100
From: Jason P Tribbeck <jtribbeck@argogroup.com>
Subject: Re: how to get a script load as the first page
Message-Id: <38059CDA.2A9F47A8@argogroup.com>

Tom Phoenix wrote:
> 
> On Thu, 14 Oct 1999 rancorr@hotmail.com wrote:
> 
> > I'm trying to get a perl script to load up as the first page of my
> > website;
> 
> It sounds as if you want to get your webserver to do something. Your local
> expert or webmaster will know more about your webserver and how it's

What you could do if your server doesn't allow this to happen (ie. you
don't have control over the configuration files) is to create an
index.html page which does a meta-refresh to index.cgi with a 0 second
refresh period.

-- 
Jason Tribbeck                                          Argo Interactive
ltd
Senior Design Engineer                             7 Dukes Court,
Chichester
                                                       West Sussex, PO19
2FX
Tel: +44 1243 815 815 Fax: +44 1243 815 805                         
England


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

Date: Thu, 14 Oct 1999 10:24:13 GMT
From: Jeremy Gurney <c4jgurney@my-deja.com>
Subject: Re: how to get a script load as the first page
Message-Id: <7u4b06$bbb$1@nnrp1.deja.com>

In article <38059CDA.2A9F47A8@argogroup.com>,
  Jason P Tribbeck <jtribbeck@argogroup.com> wrote:
<snippage>
> What you could do if your server doesn't allow this to happen (ie. you
> don't have control over the configuration files) is to create an
> index.html page which does a meta-refresh to index.cgi with a 0 second
> refresh period.

Or have your index page as a frameset definition with index.cgi as the
only frame, or use SSI to execute your CGI from your index page.

Jeremy Gurney
SAS Programmer  |  Proteus Molecular Design Ltd.
"What if there were no hypothetical situations?"


Sent via Deja.com http://www.deja.com/
Before you buy.


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

Date: 14 Oct 1999 14:31:41 +0100
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: how to get a script load as the first page
Message-Id: <3805db3d_2@newsread3.dircon.co.uk>

Jason P Tribbeck <jtribbeck@argogroup.com> wrote:
> Tom Phoenix wrote:
>> 
>> On Thu, 14 Oct 1999 rancorr@hotmail.com wrote:
>> 
>> > I'm trying to get a perl script to load up as the first page of my
>> > website;
>> 
>> It sounds as if you want to get your webserver to do something. Your local
>> expert or webmaster will know more about your webserver and how it's
> 
> What you could do if your server doesn't allow this to happen (ie. you
> don't have control over the configuration files) is to create an
> index.html page which does a meta-refresh to index.cgi with a 0 second
> refresh period.
> 

But this doesnt have anything to do with Perl ...

/J\
-- 
"It's times like this I wish I had a penis" - Duckman


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

Date: Thu, 14 Oct 1999 16:02:22 -0700
From: Makarand Kulkarni <makkulka@cisco.com>
Subject: Re: how to get a script load as the first page
Message-Id: <380660FE.2D7844F5@cisco.com>

rancorr@hotmail.com wrote:

> I'm trying to get a perl script to load up as the first page of my
> website; however, my ISP instinctively loads up the index.html file
> when a particular HTML file is not specified by the domain name.
>
> how can i work around this?  can i get my index.html file to autoload
> my perl script?  if so, how would I do this?

Two ways
(1) ask webmaster to configure the webserver
(2)  Use a REFRESH  meta tag to do this .
This tag specifies the time in seconds before the Web browser reloads the

document automatically. Alternatively, it can specify a different URL for
the
browser to load.
<META HTTP-EQUIV="Refresh"
CONTENT="0;URL=http://www.newurl.com">
--



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

Date: Fri, 15 Oct 1999 03:38:39 -0700
From: AF778 <af778NOafSPAM@iname.com.invalid>
Subject: Re: how to get a script load as the first page
Message-Id: <000b8d9b.dd8107c8@usw-ex0101-007.remarq.com>

Hi friends

If your ISP uses Apache as web server, the better and most transparent
thing is the URL rewriting mechanism of that web server.
Just use the following rule:

RewriteEngine  on
RewriteBase    /
RewriteRule    ^index\.html$  index.cgi  [T=application/x-httpd-cgi]

Using this, any request to /index.html is redirected in the parsing
phase of the server to index.cgi, with any modification or refreshing
tag in your html set.

Ask your webmaster if you can do this.

Anne




* Sent from RemarQ http://www.remarq.com The Internet's Discussion Network *
The fastest and easiest way to search and participate in Usenet - Free!



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

Date: 12 Oct 1999 21:17:04 -0000
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: How to get last dir from path???????????
Message-Id: <7u08gg$1rj$1@gellyfish.btinternet.com>

On Tue, 12 Oct 1999 11:55:11 -0700 Larry Rosler wrote:
> In article <7tvtr2$567$1@nnrp1.deja.com> on Tue, 12 Oct 1999 18:15:14 
> GMT, krun@my-deja.com <krun@my-deja.com> says...
>> How can I parse out the last dir. from a path? For example I have the
>> following in an array:
>> 
>> .\alpha\prod\debug\exe\extsw\MedCom_src
>> .\alpha\prod\debug\exe\extsw\MedCom_src\AT
>> .\alpha\prod\debug\exe\extsw\MedCom_src\AT\genericmain
>> .\alpha\prod\debug\exe\extsw\MedCom_src\AT\genericmain\src
>> .\alpha\prod\debug\exe\extsw\MedCom_src\AT\gmaincompmfc
>> 
>> How would I get:
>> 
>> MedCom_src
>> AT
>> genericmain
>> src
>> gmaincompmfc
>> 
>> into a different array? Thank you.
> 
> There are several ways.  Here's a relatively advanced (i.e., compact) 
> way.  It can also be done with a regex instead of split(), and with 
> foreach() and push() instead of map().
> 
>   my @last_dirs = map +(split /\\/)[-1], @dirs;

Also for a poorer golf score but taking the scenic route:

    my @last_dirs = map { substr($_,rindex($_,'\\')+1) } @dirs;
> 
> I would suggest reading about these functions in perlfunc.
> 

Absolutely ;-}

/J\
-- 
Jonathan Stowe <jns@gellyfish.com>
<http://www.gellyfish.com>
Hastings: <URL:http://dmoz.org/Regional/UK/England/East_Sussex/Hastings>


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

Date: 12 Oct 1999 21:31:56 GMT
From: pete@theory2.phys.cwru.edu (Peter J. Kernan)
Subject: Re: How to get last dir from path???????????
Message-Id: <slrn807a6c.hdi.pete@theory2.phys.cwru.edu>

On 12 Oct 1999 21:17:04 -0000, 
  Jonathan Stowe <gellyfish@gellyfish.com> wrote:
 .=> 
 .=>   my @last_dirs = map +(split /\\/)[-1], @dirs;
 .=
 .=Also for a poorer golf score but taking the scenic route:
 .=
 .=    my @last_dirs = map { substr($_,rindex($_,'\\')+1) } @dirs;
 .=> 
real golf surpasses perl golf, but I am inside today, so
                      map {m/([^\\]+)$/} @dirs;
--
  Pete


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

Date: Tue, 12 Oct 1999 15:25:33 -0700
From: lr@hpl.hp.com (Larry Rosler)
Subject: Re: How to get last dir from path???????????
Message-Id: <MPG.126d5534d3eed47898a083@nntp.hpl.hp.com>

In article <slrn807a6c.hdi.pete@theory2.phys.cwru.edu> on 12 Oct 1999 
21:31:56 GMT, Peter J. Kernan <pete@theory2.phys.cwru.edu> says...
> On 12 Oct 1999 21:17:04 -0000, 
>   Jonathan Stowe <gellyfish@gellyfish.com> wrote:
> .=> 
> .=>   my @last_dirs = map +(split /\\/)[-1], @dirs;
> .=
> .=Also for a poorer golf score but taking the scenic route:
> .=
> .=    my @last_dirs = map { substr($_,rindex($_,'\\')+1) } @dirs;
> .=> 
> real golf surpasses perl golf, but I am inside today, so
>                       map {m/([^\\]+)$/} @dirs;
                             ^
                             bogey!

-- 
(Just Another Larry) Rosler
Hewlett-Packard Laboratories
http://www.hpl.hp.com/personal/Larry_Rosler/
lr@hpl.hp.com


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

Date: 13 Oct 1999 04:08:45 GMT
From: pete@localhost.localdomain (Peter J. Kernan)
Subject: Re: How to get last dir from path???????????
Message-Id: <slrn8081ea.la3.pete@localhost.localdomain>

On Tue, 12 Oct 1999 15:25:33 -0700, Larry Rosler <lr@hpl.hp.com> wrote:
 .=In article <slrn807a6c.hdi.pete@theory2.phys.cwru.edu> on 12 Oct 1999 
 .=21:31:56 GMT, Peter J. Kernan <pete@theory2.phys.cwru.edu> says...
 .=> On 12 Oct 1999 21:17:04 -0000, 
 .=>   Jonathan Stowe <gellyfish@gellyfish.com> wrote:
 .=> .=> 
 .=> .=>   my @last_dirs = map +(split /\\/)[-1], @dirs;
 .=> .=
 .=> .=Also for a poorer golf score but taking the scenic route:
 .=> .=
 .=> .=    my @last_dirs = map { substr($_,rindex($_,'\\')+1) } @dirs;
 .=> .=> 
 .=> real golf surpasses perl golf, but I am inside today, so
 .=>                       map {m/([^\\]+)$/} @dirs;
 .=                             ^
 .=                             bogey!
                          map/([^\\]+)$/,@dirs;
            mulligan----^
-- 
  Pete


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

Date: Fri, 15 Oct 1999 13:39:44 GMT
From: nimchu@hal-pc.org (Nim Chu)
Subject: How to inquire, position and click the mouse in PERL?
Message-Id: <7u70a0$1ve1$1@news.hal-pc.org>

I am using Windows 98. I think there may exists a PERL module to
inquire the current position of the mouse (which can be anywhere on
the screen), set it to a new position, and right click the mouse, all
under PERL script control. Can anyone give me some directions where to
look. Thanks.



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

Date: Fri, 15 Oct 1999 17:39:52 +0200
From: "Eagleone" <volleymicke@hotmail.com>
Subject: How to make a perlscript run as a deamon
Message-Id: <7u4tnk$ke6$1@yggdrasil.utfors.se>

I have perl script I like to start as a deamon.

My problem is that when I start the script as at deamon it stop working
after one hour. If i run it in a terminal window it works perfect!




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

Date: Thu, 14 Oct 1999 18:16:32 GMT
From: cpierce1@ford.com (Clinton Pierce)
Subject: Re: How to make a perlscript run as a deamon
Message-Id: <38071dae.783157901@news.ford.com>

[poster cc'd in e-mail]

On Fri, 15 Oct 1999 17:39:52 +0200, "Eagleone" <volleymicke@hotmail.com>
wrote:
>I have perl script I like to start as a deamon.
>
>My problem is that when I start the script as at deamon it stop working
>after one hour. If i run it in a terminal window it works perfect!

The basics of this are an FAQ:

 perlfaq8, question 36: How do I fork a daemon process?

But you say it dies after an /hour/?  That might be a plain-old bug.
Follow perlfaq8's instructions, and go from there.

-- 
Clinton A. Pierce       "If you rush a Miracle Man, you get rotten
clintp@geeksalad.org        Miracles."  -- Miracle Max, The Princess Bride
http://www.geeksalad.org


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

Date: Wed, 13 Oct 1999 18:55:30 -0700
From: "Wang Mu Shan" <ruby@ebooksys.com>
Subject: How to resize a web browser
Message-Id: <7u1o9a$hdm$1@newton.pacific.net.sg>

Hi, there

How can I resize a web browser (such as IE4.0) to  make it big or small  by
using a function in Perl?

Thanks,
Mu Shan






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

Date: Wed, 13 Oct 1999 18:22:20 GMT
From: Marcel Grunauer <marcel.grunauer@lovely.net>
Subject: Re: How to resize a web browser
Message-Id: <pNsEOKJQMkVxYO+YBZASBXUSMD3t@4ax.com>

On Wed, 13 Oct 1999 18:55:30 -0700, "Wang Mu Shan" <ruby@ebooksys.com>
wrote:

> How can I resize a web browser (such as IE4.0) to  make it big or small  by
> using a function in Perl?

unlink() is a good function to use on IE4. It makes it very small
indeed...


-- 
Marcel, Perl Padawan
sub AUTOLOAD{$_=$AUTOLOAD;s;.*::;;;y;_; ;;print}&Just_Another_Perl_Hacker;


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

Date: Wed, 13 Oct 1999 12:53:34 -0700
From: Makarand Kulkarni <makkulka@cisco.com>
Subject: Re: How to resize a web browser
Message-Id: <3804E33E.6617B704@cisco.com>

{ Wang Mu Shan wrote:

> How can I resize a web browser (such as IE4.0) to  make it big or small  by
> using a function in Perl?

You cannot.
--



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

Date: Wed, 13 Oct 1999 15:05:23 -0700
From: David Cassell <cassell@mail.cor.epa.gov>
Subject: Re: How to resize a web browser
Message-Id: <38050223.55F51C9D@mail.cor.epa.gov>

Wang Mu Shan wrote:
> 
> Hi, there

Howdy

> How can I resize a web browser (such as IE4.0) to  make it big or small  by
> using a function in Perl?

If you're asking how to write Perl code to run from your
webserver to affect a client browser like this, the answer
is "you can't get there from here."

If you're asking how to manipulate your own browser, you
can get at it using OLE.  Look at the Win32::OLE module,
and the extensive docs in the ActivePerl [win32] FAQ.

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


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

Date: Wed, 13 Oct 1999 18:00:56 -0600
From: "Aaron Propst" <aaron@aaronpropst.com>
Subject: Re: How to resize a web browser
Message-Id: <7u36f4$mms@yuma.ACNS.ColoState.EDU>

don't know why no one hasn't suggested this.. but learn javascript..
browser resizes.. etc. would definitely be a client side thing.. and perl is
generally server side..
still.. even there you will encounter limitations...



Wang Mu Shan <ruby@ebooksys.com> wrote in message
news:7u1o9a$hdm$1@newton.pacific.net.sg...
> Hi, there
>
> How can I resize a web browser (such as IE4.0) to  make it big or small
by
> using a function in Perl?
>
> Thanks,
> Mu Shan
>
>
>
>




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

Date: 14 Oct 1999 09:35:13 +0100
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: How to resize a web browser
Message-Id: <380595c1_2@newsread3.dircon.co.uk>

Aaron Propst <aaron@aaronpropst.com> wrote:
> don't know why no one hasn't suggested this.. but learn javascript..

Because it has nothing to do with Perl.

/J\
-- 
"The Tory Party is like a wonky shopping trolley - it pulls to the
left, it pulls to the right, but you just can't get it to go forward"
- John Prescott


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

Date: Thu, 14 Oct 1999 11:16:29 -0600
From: "Aaron Propst" <aaron@aaronpropst.com>
Subject: Re: How to resize a web browser
Message-Id: <7u5352$1pfu@yuma.ACNS.ColoState.EDU>

just because this is a perl newsgroup doesn't mean that javascript is a bad
word...
when i create a web application.. i use the most useful tool for each
task... sometimes it's perl, sometimes it's javascript, sometimes it's even
cold fusion... ignoring everything that isn't perl is pretty limiting.

Aaron




Jonathan Stowe <gellyfish@gellyfish.com> wrote in message
news:380595c1_2@newsread3.dircon.co.uk...
> Aaron Propst <aaron@aaronpropst.com> wrote:
> > don't know why no one hasn't suggested this.. but learn javascript..
>
> Because it has nothing to do with Perl.
>
> /J\
> --
> "The Tory Party is like a wonky shopping trolley - it pulls to the
> left, it pulls to the right, but you just can't get it to go forward"
> - John Prescott




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

Date: 14 Oct 1999 20:14:35 -0000
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: How to resize a web browser
Message-Id: <7u5djb$1a5$1@gellyfish.btinternet.com>

On Thu, 14 Oct 1999 11:16:29 -0600 Aaron Propst wrote:
> Jonathan Stowe <gellyfish@gellyfish.com> wrote in message
> news:380595c1_2@newsread3.dircon.co.uk...
>> Aaron Propst <aaron@aaronpropst.com> wrote:
>> > don't know why no one hasn't suggested this.. but learn javascript..
>>
>> Because it has nothing to do with Perl.
>>
> 
> just because this is a perl newsgroup doesn't mean that javascript is a bad
> word...
> when i create a web application.. i use the most useful tool for each
> task... sometimes it's perl, sometimes it's javascript, sometimes it's even
> cold fusion... ignoring everything that isn't perl is pretty limiting.
> 

Yes, yes, yes.  But you posed a question:

    "don't know why no one hasn't suggested this"

and I was answering.  The reason that no-one has suggested it is because
it has nothing to do with Perl.  If you want to talk about web development
in general please do so in a group that is concerned with such things.

People write CGI applications in C or Informix 4GL as well but you dont
get this stuff in the groups that discuss them.

/J\
-- 
Jonathan Stowe <jns@gellyfish.com>
<http://www.gellyfish.com>
Hastings: <URL:http://dmoz.org/Regional/UK/England/East_Sussex/Hastings>


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

Date: Fri, 15 Oct 1999 15:35:00 GMT
From: Paul D <pdobbs@home.com>
Subject: Re: How to resize a web browser
Message-Id: <38074ACA.C3925759@home.com>

Seems to be a lot of inconsiderate twits in this group who refuse
to help anyone unless the question is only, absolutely, nothing BUT
Perl related. Any hint of other external connections to the web of any
form immediately seems to give them justifcation for being dick heads.
So don't take the multiple replies to your question to heart.. I
consider those types to be the people who have no friends in life
anyway.

I'm rambling I know, but I've gone over alot of messages here today
and I'm sick of these jerks bashing people asking for help.


Someone here suggested you use javascript. That will work. BUT.. what
also should have been said (if it ain't obvious) is that you can
drive that javascript out of Perl. Use your perl program to write
the javascript to the client side as you need it to be. I haven't done
anything really with JS.. but it certainly doesn't look much at all
different from Perl. So you will have significant power here.. you
can write your script to be selective to the very browser type and
to the size of the window you want with just a few if's and elses's 

Good luck. Do post us all here if you come up with a cool solution.
I too may be seeking such an answer soon enough for a message forum
program I am finishing up (it kicks UBB forum's ass too! and it will
be FREE, not $230!).

Paul
http://24.112.27.28/cgi-bin/PaulsWall.cgi (simple one line graffiti
wall)
http://24.112.27.28/cgi-bin/PDMsg2.cgi (my developing message forum)


Wang Mu Shan wrote:
> 
> Hi, there
> 
> How can I resize a web browser (such as IE4.0) to  make it big or small  by
> using a function in Perl?
> 
> Thanks,
> Mu Shan


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

Date: Thu, 14 Oct 1999 14:10:20 GMT
From: oivvio@polite.se (oivvio polite)
Subject: How to tie a hash of references to a DB_File
Message-Id: <3805de78.77029815@192.0.4.1>

hi all.

i and a friend of mine are fooling around with a program that retrievs
news webpages and stores them in a database.

today i tried to figure out how to tie a hash containing references to
objects to a DB_File.

i figured out how to do that and realised that i probably want to do
something else!

i had hoped that copies of the actual objects would be stored in the
DB_File. instead the (not very surprising i guess) references are
stored. these references aren't worth much the next time i run the
program.

what should i do instead?
_programming perl_ tells me that the correct way to do complex
datastructures is using references, but how do i map those
datastructures to a for instance a DB_File?



just another newbie





---------------------
this is my script

use NewsObject;  # a class of mine. i don't think it's the cause of my
		 #problem
use Fcntl;   
use DB_File; 
use strict;



my $filename = "c:/temp/infolilla.txt";
my $dbfilename = "c:/temp/infobeat.db";




my %newshash;

tie %newshash, "DB_File", $dbfilename, O_RDWR|O_CREAT, 0640, $DB_HASH 
        || die "Cannot open file $dbfilename: $!\n" ;


&parse_file($filename, \%newshash);


untie %newshash;


sub parse_file {
    
    my ($infile, $inhashref) = @_;
    my ($Bucket, $Object);
    my $Index = 0;
    my($Sourcefilename, $Date, $Subject, $Body, $Departement,
$Location, $Source) = 
	["C:\pellerin.txt", "xxxx-xx-xx", "Subject", "Body",
"Departement", "Location", "Source"];
    
    open (INFILE, $infile) ||
	die "\ncan't open file : $infile";
    
    #outer loop

    while (<INFILE>){
	if( /From:	InfoBeat/){
	    $Bucket = <INFILE>; $Bucket = <INFILE>;
	    $Date   = <INFILE>;
	    $Date =~ s/.*@ *//;
	    chomp($Date);
	}
	
	if( /\A\*{3} /){
	    $Subject = $_;
	    chomp($Subject);

	    $Body = "";
	    while (!(/http:/)){
		$_ = <INFILE>;
		if (!(/http:/)){
		    $Body = $Body . $_;
		}
	    }

	    # this is were i references to my objects in the hash.


	    $Object = NewsObject->new($Sourcefilename, $Date,
$Subject, $Body, $Departement, $Location, $Source);
	    $$inhashref{$Index++} =  $Object;
	}
    }
    close INFILE;
}


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

this is the contents of c:/temp/infobeat.db


NewsObject=HASH(0x8b5a20)
NewsObject=HASH(0x8b5a80)
NewsObject=HASH(0x8b5ae0)
NewsObject=HASH(0x8b5a44)
NewsObject=HASH(0x8b5aa4)
NewsObject=HASH(0x8b5a50)
NewsObject=HASH(0x8b5ab0)
NewsObject=HASH(0x8b5a2c)
NewsObject=HASH(0x8b5a8c)
NewsObject=HASH(0x8b5a20)
NewsObject=HASH(0x8b5a80)
NewsObject=HASH(0x8b5ae0)
NewsObject=HASH(0x8b5a44)
NewsObject=HASH(0x8b5aa4)
 ....

and so on

not quite what i hoped for.
 .................................................
                                    oivvio polite

varvsgatan 10A         office +46 (0)8  669 64 18
s-117 29 stockholm        fax +46 (0)8   84 00 18
sweden               cellular +46 (0)709 30 40 30

                          mailto:oivvio@polite.se

     get my pgp key here    http://www.at.pgp.net


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

Date: 14 Oct 1999 19:56:25 GMT
From: ebohlman@netcom.com (Eric Bohlman)
Subject: Re: How to tie a hash of references to a DB_File
Message-Id: <7u5ch9$onm@dfw-ixnews16.ix.netcom.com>

oivvio polite (oivvio@polite.se) wrote:
: today i tried to figure out how to tie a hash containing references to
: objects to a DB_File.

You'll want to look into the MLDBM module, which lets you combine a tied 
hash with a serializer (such as Storable or Data::Dumper) to store 
complex data structures.



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

Date: Thu, 14 Oct 1999 07:56:23 GMT
From: ijg@connect.org.uk (I.J. Garlick)
Subject: Re: HPUX 11
Message-Id: <FJL21z.K4A@csc.liv.ac.uk>

In article <3802F330.1DE9D0C5@altavista.net>,
Andy Marden <amarden@altavista.net> writes:
> Has anyone successfully installed Perl on HPUX 11 (64 bit) and are there
> binaries available? I can only find binaries for HPUX 10.20

Yes. We just upgraded to 11 from 10.20 (we had to, we are the main HPUX
archive). Although I didn't do it the sys admins here found that almost
all binaries that compiled under 10.20 worked under 11.

There were a couple of exceptions if an app used curses or something,
noteably VIM5.4 (consternation when that was announced) but there is a
work around.

As for it being 64 bit, I'll have to take a rain check on that.

Have a look at http://hpux.csc.liv.ac.uk/

There are links to local mirrors.

-- 
Ian J. Garlick
ijg@csc.liv.ac.uk

strategy, n.:
        A comprehensive plan of inaction.



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

Date: Wed, 13 Oct 1999 01:27:43 GMT
From: michael.blackmore@kvaerner.com (Michael Blackmore)
Subject: HPUX 9.x Perl binaries
Message-Id: <3803df03.182568028@news.kvaerner.com>

Dear All,

I would like to know if I can get Perl binaries for HPUX 9.04 from
somewhere?

Thanks,

Michael Blackmore
(michael.blackmore@kvaerner.com)
Michael - michael.blackmore@kvaerner.com


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

Date: Wed, 13 Oct 1999 13:46:50 -0700
From: Tom Phoenix <rootbeer@redcat.com>
Subject: Re: HPUX 9.x Perl binaries
Message-Id: <Pine.GSO.4.10.9910131345520.25558-100000@user2.teleport.com>

On Wed, 13 Oct 1999, Michael Blackmore wrote:

> I would like to know if I can get Perl binaries for HPUX 9.04 from
> somewhere?

If you find a source which isn't listed on the CPAN "ports" page, please
submit an update for that page. Cheers!

    http://www.cpan.org/ports/

-- 
Tom Phoenix       Perl Training and Hacking       Esperanto
Randal Schwartz Case:     http://www.rahul.net/jeffrey/ovs/



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

Date: Thu, 14 Oct 1999 09:33:36 -0700
From: moseley@best.com (Bill Moseley)
Subject: HTTPD::Daemon and HTTP::Request
Message-Id: <MPG.126fa5bf22826bfd989802@nntp1.ba.best.com>

I'm using LPW's $ua->max_size(1) to limit the amount of data I read.
I know it is working as this I receive the header

   X-Content-Range: bytes 0-328/1169

back from the remote server.

My question is why don't I see the **Range:** header in my request?

Ok, So I want to see the request I'm sending.  I set up the 
HTTPD::Daemon example, but I added a line to print the request 
information:

   while (my $r = $c->get_request) {
       print $r->as_string();   # Show Request Info here

But I don't see the 'Range:' header being sent.

my lwp.pl below does this:
   $req = HTTP::Request->new(GET => $url);
   $ua->max_size(1);
   $res = $ua->simple_request($req);

(Really, my lwp.pl does a HEAD request, and if that fails it does a GET 
request -- you can see that below.)

Take a look at this:

First, use lwp to get the headers from USPS:

E:\swish\perl>perl lwp.pl http://www.usps.gov
Length: 328
Headers --
 Accept-Ranges -> bytes
 Client-Date -> Thu, 14 Oct 1999 16:12:40 GMT
 Client-Peer -> 56.0.78.11:80
 Content-Length -> 1169
 Content-Type -> text/html
 Date -> Thu, 14 Oct 1999 07:00:27 GMT
 STATUS -> 200 OK
 GET Status -> 200 OK
 HEAD Status -> 500 Server Error
 Last-Modified -> Mon, 04 Oct 1999 20:31:14 GMT
 Server -> Netscape-Enterprise/3.6 SP2
 X-Content-Range -> bytes 0-328/1169   <--- Right here

Ok, let's run the HTTPD::Daemon server:

E:\swish\perl>perl server.pl
Please contact me at: <URL:http://localhost:1061/>

And now request using lwp.pl
E:\swish\perl>perl lwp.pl http://localhost:1061/test.html
Length: 53
Headers --
 Client-Date -> Thu, 14 Oct 1999 16:17:51 GMT
 Client-Peer -> 127.0.0.1:1061
 Content-Length -> 53
 Content-Type -> text/html
 Date -> Thu, 14 Oct 1999 16:17:51 GMT
 GET Status -> 403 Forbidden
 HEAD Status -> 403 Forbidden
 STATUS -> 403 Forbidden
 SUCCESS ->
 Server -> libwww-perl-daemon/1.21
 TIME -> 1
 Title -> 403 Forbidden
 X-Content-Range -> bytes 0-53/53  <--- HTTPD::Dameon is doing it right


Here's the output from that 
       print $r->as_string();   # Show Request Info here
line:

HEAD http://localhost:1061/test.html HTTP/1.0
Host: localhost:1061
User-Agent: Mozilla/4.08 [en] (Win98; U ;Nav)


GET http://localhost:1061/test.html HTTP/1.0
Host: localhost:1061
User-Agent: Mozilla/4.08 [en] (Win98; U ;Nav)

But WHY don't I see the "Range:" header here in the request object?
Shouldn't $r->as_string print all the headers?




-- 
Bill Moseley mailto:moseley@best.com
pls note the one line sig, not counting this one.


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

Date: 14 Oct 1999 22:25:50 +0200
From: Gisle Aas <gisle@aas.no>
Subject: Re: HTTPD::Daemon and HTTP::Request
Message-Id: <m3iu49d701.fsf@eik.g.aas.no>

moseley@best.com (Bill Moseley) writes:

> I'm using LPW's $ua->max_size(1) to limit the amount of data I read.
> I know it is working as this I receive the header
> 
>    X-Content-Range: bytes 0-328/1169
> 
> back from the remote server.
>
> My question is why don't I see the **Range:** header in my request?

Perhaps because you don't use LWP version 5.44 or better.  Before 5.44
LWP did not send this header in the request.  It just closed the
connection when we had seen enough response content.  The
X-Content-Range header is generated by LWP, and does not really come
from the origin server.

-- 
Gisle Aas


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

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


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