[10443] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 4036 Volume: 8

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Wed Oct 21 14:04:09 1998

Date: Wed, 21 Oct 98 11:01:34 -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           Wed, 21 Oct 1998     Volume: 8 Number: 4036

Today's topics:
    Re: Perl on NT (Craig Berry)
    Re: Perl on NT <rootbeer@teleport.com>
    Re: Perl Y2K copmliance <sneex@fccj.org>
    Re: Perl Y2K copmliance <perlguy@technologist.com>
        Resubmit: Kindly help with file locking <ff@creative.net>
    Re: Scotch drinkers Unite! [was] Re: Raleigh.pm (Raleig <eashton@bbnplanet.com>
    Re: Scotch drinkers Unite! [was] Re: Raleigh.pm (Raleig <eashton@bbnplanet.com>
    Re: Scotch drinkers Unite! [was] Re: Raleigh.pm (Raleig (Larry Rosler)
    Re: Testing a date (Larry Rosler)
    Re: Text::Wrap is generating a warning (Brand Hilton)
    Re: Text::Wrap is generating a warning <eashton@bbnplanet.com>
        Web DB design in Perl <tedken@manning.com>
        Web DB design in Perl <tedken@manning.com>
    Re: What isn't Perl good for? <uri@fastengines.com>
    Re: Who can help me write full-text search engine in Pe (Danny Groppo)
    Re: Who can help me write full-text search engine in Pe <uri@fastengines.com>
        Special: Digest Administrivia (Last modified: 12 Mar 98 (Perl-Users-Digest Admin)

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

Date: 21 Oct 1998 17:19:48 GMT
From: cberry@cinenet.net (Craig Berry)
Subject: Re: Perl on NT
Message-Id: <70l53k$249$1@marina.cinenet.net>

David Cantrell (NukeEmUp@ThePentagon.com) wrote:
: On Tue, 20 Oct 1998 21:53:11 -0500, "Matt Johnson"
: <mjohnson@getonthe.net> enlightened us thusly:
: >Does anyone know why my perl scripts are looking for files that are in my
: >servers root, instead of the directory that my scripts are in.
: >
: >I am using IIS 3.0.
: 
: That'd be the reason then.

Yes, this is one of my favorite reasons to hate Mickeysoft.  IIS runs
scripts with . set to the doc root, rather than in the script's own home
dir.  Easiest way to circumvent this problem is a chdir in a begin block,
but of course this makes the script less portable.  Sigh.

---------------------------------------------------------------------
   |   Craig Berry - cberry@cinenet.net
 --*--    Home Page: http://www.cinenet.net/users/cberry/home.html
   |      "Ripple in still water, when there is no pebble tossed,
       nor wind to blow..."


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

Date: Wed, 21 Oct 1998 17:50:46 GMT
From: Tom Phoenix <rootbeer@teleport.com>
Subject: Re: Perl on NT
Message-Id: <Pine.GSO.4.02A.9810211047230.5534-100000@user2.teleport.com>

On 21 Oct 1998, Craig Berry wrote:

> IIS runs scripts with . set to the doc root, rather than in the
> script's own home dir.  Easiest way to circumvent this problem is a
> chdir in a begin block, but of course this makes the script less
> portable.  Sigh.

If your CGI program assumes that the working directory will be _any_
particular directory, it's buggy. The server could use the server root
today, the homedir of user nobody tomorrow, and the script's directory on
the day after that. Unless you see something in the CGI spec that I don't!

So, specifying the directory (say, in a configuration section of the
program) is the right way to make the program _more_ portable. Cheers!

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



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

Date: Wed, 21 Oct 1998 13:20:20 +0000
From: Bill Jones <sneex@fccj.org>
Subject: Re: Perl Y2K copmliance
Message-Id: <362DDF93.DF32B73@fccj.org>

Patrick Timmins wrote:
> 
> In article <F14nAF.po@midway.uchicago.edu>,
>   wdr1@pobox.com (William D. Reardon) wrote:
> 
> >       Well, since it affects Microsoft systems, and Perl runs on
> > Microsoft systems, in the end, a person's Perl program may not work as
> > expected in the year 2000.  While the problem is not particular to
> > Perl, it may be something that a Perl programmer need be aware of.[1]
> >       I'd call that appropriate for clp.misc & on topic for this thread.
> >
> > -Bill
> 
> Well, since it affects cash register systems, and I buy my avocados
> at cash registers, it's an avocado problem. :)
> 
> Patrick Timmins
> $monger{Omaha}[0]
> 

Damn those avocados!  I vote to keep Perl out of their hands :]

-Sneex-  :]


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

Date: Wed, 21 Oct 1998 16:46:03 GMT
From: Brent Michalski <perlguy@technologist.com>
To: Patrick Timmins <ptimmins@netserv.unmc.edu>
Subject: Re: Perl Y2K copmliance
Message-Id: <362E0FCB.B54938C@technologist.com>

Patrick,

Sorry!  I was only paying attention to what I wanted to keep in and
didn't mean to make it look like you wrote the Y2K crap.  I KNOW that
YOU know better.

To those who don't know.  I snipped out all of what Patrick wrote but
left his name at the top :-(

Brent
-- 
$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
$            Brent Michalski             $
$         -- Perl Evangelist --          $
$    E-Mail: perlguy@technologist.com    $
$ Resume: http://www.inlink.com/~perlguy $
$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$


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

Date: Wed, 21 Oct 1998 09:43:37 -0700
From: Farhad Farzaneh <ff@creative.net>
Subject: Resubmit: Kindly help with file locking
Message-Id: <362E0F39.BA6C6B45@creative.net>

Hello,

I'm trying to use the lockf module to lock files across the network but
have not had much luck.  Would really appreciate a hint or a clue.  Here's
a simple script that shows the problem:

#!/bin/perl -w

use strict;
use File::lockf;

open F, "<foo" or die "Unable to open foo\n";
my $err = File::lockf::lock(\*F);
print "Error = $err\n";

which prints

Error = 9.

Thanks in advance for any help.  Would also appreciate direct e-mail because
this newsgroup grows so fast and if I don't check for a couple of days I
lose the messages off our server.

-- 
Farhad


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

Date: Wed, 21 Oct 1998 16:27:18 GMT
From: Elaine -HappyFunBall- Ashton <eashton@bbnplanet.com>
Subject: Re: Scotch drinkers Unite! [was] Re: Raleigh.pm (Raleigh, NC, USA perl mongers) has registered
Message-Id: <362E08DD.20158522@bbnplanet.com>

Larry Rosler wrote:

> [Posted to comp.lang.perl.misc and copy mailed.]

Emailed posts are vile and evil. I get enough email, thanks.

> You are now involved in three (3) threads without a shred of Perl
> content.  Isn't it time to give the rest of us a break?

Oh Larry, give it a rest. I'm not the only one posting am I? :P Bite Me.

e.

After all, the cultivated person's first duty is to
always be prepared to rewrite the encyclopedia.  - U. Eco -


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

Date: Wed, 21 Oct 1998 17:30:51 GMT
From: Elaine -HappyFunBall- Ashton <eashton@bbnplanet.com>
Subject: Re: Scotch drinkers Unite! [was] Re: Raleigh.pm (Raleigh, NC, USA perl mongers) has registered
Message-Id: <362E17C3.6CA45EA2@bbnplanet.com>

Larry Rosler wrote:

> Too bad.  So you won't get this one.

Sure I will. I read the ng. 

> You were the last "contributor" to each of these three STUPID threads --
> and despite my post, you continue to add to them.  You are hardly in a
> position to tell *me* to give it a rest.

So then, what are you doing posting to this STUPID thread for Larry? I
appreciate the point, I don't appreciate the public vilification. Having
a bad day or something?

> Maybe the others who have degenerated this into a circus will take heed,
> as you seem to be unable to.  You will have no fun talking to yourself.

Perhaps, it was a slow day, and how we got to scotch I have no idea.
Maybe I'll go do some research on how the Islay Scotch companies use
Perl for their business. It's no fun always seeing RTFM, FAQ, blah,
blah, blah. It was mildly entertaining on a stressful Tuesday.

e.

After all, the cultivated person's first duty is to
always be prepared to rewrite the encyclopedia.  - U. Eco -


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

Date: Wed, 21 Oct 1998 10:10:03 -0700
From: lr@hpl.hp.com (Larry Rosler)
Subject: Re: Scotch drinkers Unite! [was] Re: Raleigh.pm (Raleigh, NC, USA perl mongers) has registered
Message-Id: <MPG.1097b547b81fa3d798982e@nntp.hpl.hp.com>

In article <362E08DD.20158522@bbnplanet.com> on Wed, 21 Oct 1998 
16:27:18 GMT, Elaine -HappyFunBall- Ashton <eashton@bbnplanet.com> 
says...
> Larry Rosler wrote:
> 
> > [Posted to comp.lang.perl.misc and copy mailed.]
> 
> Emailed posts are vile and evil. I get enough email, thanks.

Too bad.  So you won't get this one.

> > You are now involved in three (3) threads without a shred of Perl
> > content.  Isn't it time to give the rest of us a break?
> 
> Oh Larry, give it a rest. I'm not the only one posting am I? :P Bite Me.

You were the last "contributor" to each of these three STUPID threads -- 
and despite my post, you continue to add to them.  You are hardly in a 
position to tell *me* to give it a rest.

Maybe the others who have degenerated this into a circus will take heed, 
as you seem to be unable to.  You will have no fun talking to yourself.

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


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

Date: Wed, 21 Oct 1998 10:40:37 -0700
From: lr@hpl.hp.com (Larry Rosler)
Subject: Re: Testing a date
Message-Id: <MPG.1097bc7018b620d7989830@nntp.hpl.hp.com>

[Posted to comp.lang.perl.misc and a copy mailed.]

In article <fl_aggie-2110981219070001@aggie.coaps.fsu.edu> on Wed, 21 
Oct 1998 12:19:06 -0500, I R A Aggie <fl_aggie@thepentagon.com> says...
> In article <362DD6C6.9AFB9465@whiterabbit.co.uk>, Matt Pryor
> <matt@whiterabbit.co.uk> wrote:
> 
> + if (($year/4) == int($year/4)) {        # leapyear?
> 
> Fortunately for you, the next century year is 2000, which happens
> to be a leap year. But century years need to be divisible by 400.
> 
> So...
> 
> if (!($year % 400) or (!($year % 4) and ($year % 100))) {

I call that the year 2.1K problem, which most of us won't have to deal 
with. :-(  In any case, your suggested formula fails for most Western 
European countries before 1752 (do `cal 1752` and look at September), 
and for Russia before 1918 or so, and ...

Fortunately for most of us, the Unix epoch doesn't include 1900 or 2100.

As a confirmed pedant, I believe there really should be a limit to 
pedantry.

    unless ($year % 4) {                    # leapyear?

will do just fine for me.

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


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

Date: 21 Oct 1998 16:11:17 GMT
From: bhilton@tsg.adc.com (Brand Hilton)
Subject: Re: Text::Wrap is generating a warning
Message-Id: <70l135$9qv1@mercury.adc.com>

In article <362E01EF.107A2DEB@ams.org>, Dan Pelton  <dnp@ams.org> wrote:
>When ever I try an use the Text::Wrap module I get the following
>Warning:
>      "Use of uninitialized value at /usr/local/lib/perl5/Text/Wrap.pm 
>       line 80."
>
>The module works fine, but I was wondering how to get rid of the warning?  I am
>using perl, version 5.003 with EMBED
>        built under dec_osf at May  5 1997 08:47:11
>        + suidperl security patch.

I don't see a warning under 5.004_04.  My guess is you're using an old
version of Text::Wrap (in addition to using an old version of Perl
:-)  My Text::Wrap is version 97.011701.

-- 
 _____ 
|///  |   Brand Hilton  bhilton@adc.com
|  ADC|   ADC Telecommunications, ATM Transport Division
|_____|   Richardson, Texas


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

Date: Wed, 21 Oct 1998 16:41:41 GMT
From: Elaine -HappyFunBall- Ashton <eashton@bbnplanet.com>
Subject: Re: Text::Wrap is generating a warning
Message-Id: <362E0C3C.956F23CB@bbnplanet.com>

Dan Pelton wrote:

> When ever I try an use the Text::Wrap module I get the following
> Warning:
>       "Use of uninitialized value at /usr/local/lib/perl5/Text/Wrap.pm
>        line 80."

I just ran your script without getting that error. What version of Perl
are you using? 

e.

After all, the cultivated person's first duty is to
always be prepared to rewrite the encyclopedia.  - U. Eco -


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

Date: Wed, 21 Oct 1998 13:31:54 -0400
From: Ted Kennedy <tedken@manning.com>
Subject: Web DB design in Perl
Message-Id: <362E1A8A.E75C9289@manning.com>

We are evaluating a proposal for a new book entitled "Web Database
Design in Perl" by Rich Bowen and are looking for a few people with Perl
credentials to read and comment on this 5-6 page proposal. If
interested, please contact me at <tedken@manning.com> and I will email
the proposal to you.



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

Date: Wed, 21 Oct 1998 13:33:23 -0400
From: Ted Kennedy <tedken@manning.com>
Subject: Web DB design in Perl
Message-Id: <362E1AE3.6B15C748@manning.com>

We are evaluating a proposal for a new book entitled "Web Database
Design in Perl" by Rich Bowen and are looking for a few people with Perl
credentials to read and comment on this 5-6 page proposal. If
interested, please contact me at <tedken@manning.com> and I will email
the proposal to you.



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

Date: 21 Oct 1998 13:54:07 -0400
From: Uri Guttman <uri@fastengines.com>
Subject: Re: What isn't Perl good for?
Message-Id: <sarn26pn6m8.fsf@camel.fastserv.com>

>>>>> "JWL" == Joergen W Lang <jwl@_munged_worldmusic.de> writes:

  JWL> Uri Guttman <uri@camel.fastserv.com> wrote:

  >>  stop drinking coffee!
  >> 
  >> i never touch the stuff! (i don't like the flavor)
  >> 
  JWL> I hardly do. But if I did I might fall for this o so subtle
  JWL> indoctrination of Java in this case - naaa, rather stick to tea.
  JWL> See you at the "Camel" for some roast Gecko or in the "Foo-Bar"
  JWL> where the Sparcs are just a beer each... ;-))

hey we should do this. if all pm members were to invest, we could create
a geek pub. i am tired of all the irish pubs here. we have had pm
meetings in most of the brewpubs and nothing works out well for us (some
combination of good food, beer, service and privacy (less outside noise
so we can make our own).

just another pm pub pre-owner,

uri

-- 
Uri Guttman                  Fast Engines --  The Leader in Fast CGI Technology
uri@fastengines.com                                  http://www.fastengines.com


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

Date: Wed, 21 Oct 1998 17:35:29 GMT
From: gosdpads@yahoo.com (Danny Groppo)
Subject: Re: Who can help me write full-text search engine in Perl with indexing
Message-Id: <362e1b18.606983215@nntp.cts.com>

Snowhare,

Would you please repost the search engine code.  Towards the end of
the message, it was cut off.  Thank you!



On 21 Oct 1998 08:06:05 -0600, snowhare@xmission.xmission.com
(Snowhare) wrote:

>
>
>Nothing above this line is part of the signed message.
>
>In article <saryaqblynj.fsf@camel.fastserv.com>,
>Uri Guttman  <uri@camel.fastserv.com> wrote:
>>>>>>> "DJ" == Darius Jack <dariusz@usa.net> writes:
>>
>>  DJ> Who can help me write search engine to search kew words in full texts,
>>  DJ> in Perl, running locally under Perl for DOS.
>>  DJ> Or ready-made script please.
>>  DJ> jack
>>
>>only god (or larry wall) can do such a thing in perl. begone blasphemer
>>or you will be forced to use DOS! oops, you are using DOS, ignore that
>>last comment.
>>
>>this group is to help people with the perl language, not do work for
>>people.
>
>There is a way to do both. Actual use in live code and explanation of how
>it works is left as an exercise for the student. :)
>
>Benjamin Franz
>
>"And no - I *don't* have the time to explain it to people nor will I
>respond to comments about 'use strict' on it."
>
>#!/usr/bin/perl -w
>package InverseMap;
>use GDBM_File;
>1;
>
># 
># &InverseMap'InsertIndexToKey($key,$index,$ranking);  
># &InverseMap'DeleteIndexFromKey($key,$index);  
># &InverseMap'OpenInverseMap($database,$mode,
>#                             $minblockelements,$maxblockelements); 
># &InverseMap'CloseInverseMap;  
># &InverseMap'EnumToKey($enumvalue);  
># &InverseMap'KeyToEnum($keystring);  
># &InverseMap'EnumToIndex($enumvalue);  
># &InverseMap'IndexToEnum($indexstring);  
># $nmatches=&InverseMap'ReadEnumIndexesForKey($keystring, 
>#                             $IndexEnumValuesRef,$RankingValuesRef); 
>
># The globals used within the package are:
>#
>#     $PersistentInvMap -  holds the name of the currently open
>#                          inverted database. 'undef' if no database
>#                          is open.
>#
>#     %IndexStringToEnum - tied hash database containing the
>#                          enum<->indexstring forward and reverse
>#                          lookup data
>#
>#     %KeyStringToEnum   - tied hash database containing the
>#                          enum<->keystring forward and reverse
>#                          lookup data and the byteoffset and blocksize
>#                          for each keyed block.
>#
>#     %FreeChain         - holds the free chain lists for available
>#                          blocks that can be reused
>#
>#     INVMAPFILE         - file handle for the main inverted database.
>#
>#     $MinEnumElements   - smallest # of elements allowed to be allocated
>#                          for an inverted data block.
>#
>#     $MaxEnumElements   - largest # of elements allowed to be allocated
>#                          for an inverted data block.
>#
>
>sub EnumToIndex {
>
>	my ($indexstring,$enumstring,@CallingParms,$NCallingParms,
>	    $IndexStringMapFile,$KeyStringMapFile);
>	
>	@CallingParms=@_;
>	$NCallingParms=$#CallingParms + 1;
>
>	if ($NCallingParms != 1) {
>		die ("EnumToIndex: Incorrect number of calling parameters ($NCallingParms instead of 1)\n"); 
>	}
>	($enumstring)=@_;
>
>	if (defined($indexstring=$IndexStringToEnum{"r $enumstring"})) {
>		$result=$indexstring;
>	} else {
>		$result=undef;
>	}
>
>	$result;
>}
>
>sub IndexToEnum {
>
>	my ($indexstring,$enumstring,@CallingParms,$NCallingParms,
>	    $IndexStringMapFile,$KeyStringMapFile);
>	
>	$NCallingParms=$#_ + 1;
>
>	if ($NCallingParms != 1) {
>		die ("EnumToIndex: Incorrect number of calling parameters ($NCallingParms instead of 1)\n"); 
>	}
>	($indexstring)=@_;
>
>	if (defined($enumstring=$IndexStringToEnum{"f $indexstring"})) {
>		$result=$enumstring;
>	} else {
>		$result=undef;
>	}
>
>	$result;
>}
>
>sub EnumToKey {
>
>	my ($keystring,$NCallingParms,$result,$KeyStringMapFile,$enumstring);
>	
>	$NCallingParms=$#_ + 1;
>
>	if ($NCallingParms != 1) {
>		die ("EnumToKey: Incorrect number of calling parameters ($NCallingParms instead of 1)\n");
>	}
>	($enumvalue)=@_;
>
>	if (defined($keystring=$KeyStringToEnum{"r $enumvalue"})) {
>		$result=$keystring;
>	} else {
>		$result=undef;
>	}
>
>	$result;
>}
>
>sub KeyToEnum {
>
>	my ($keystring,$NCallingParms,
>		$KeyData,$KeyEnum,$ByteOffset,$BlockSize);
>	
>	$NCallingParms = $#_ + 1;
>
>	if ($NCallingParms != 1) {
>		die ("KeyToEnum: Incorrect number of calling parameters ($NCallingParms instead of 1)\n");
>	}
>	($keystring)=@_;
>
>	if (defined($KeyData=$KeyStringToEnum{"f $keystring"})) {
>		($KeyEnum,$ByteOffset,$BlockSize)=split(/:/o,$KeyData,3);
>	} else {
>		$KeyEnum = undef;
>	}
>
>	$KeyEnum;
>}
>
>
>sub CloseInverseMap {
>	my ($IndexStringMapFile,$KeyStringMapFile,$MapFile);
>
>	if (! $PersistentInvMap) {
>		die ("CloseInverseMap: No inverse map is currently open.\n");
>	}
>	untie(%IndexStringToEnum);
>	untie(%KeyStringToEnum);
>	untie(%FreeChain);
>	close(INVMAPFILE);
>	undef $PersistentInvMap;
>	undef $MinEnumElements;
>	undef $MaxEnumElements;
>}
>
># Opens the Inverse Map for multiple accesses
># $database is the base file name and mode is either 'r' (read only)
># or 'u' (update - read and write). $MinEnumElements and $MaxEnumElenents
># determine the smallest and largest block size that can be used
># when growing the inverted map. They measure the number of
># elements stored in each cell. Setting $MaxEnumElemeents to zero
># places NO limit on the maximum number of elements in each inverted
># list. It is a fatal error to specify a $MaxEnumElements smaller
># than the $MinEnumElements, except for 0.
>
>sub OpenInverseMap {
>	my ($database,$mode,$DatabaseDir,$IndexStringMapFile,
>		$KeyStringMapFile,$MapFile);
>
>	($database,$mode,$MinEnumElements,$MaxEnumElements) = @_;
>
>	$ncalling = $#_ + 1;
>	if ($ncalling != 4) {
>		die ("OpenInverseMap: Incorrect number of calling parameters ($ncalling instead of 4)\n");
>	}
>
>	if ((int($MinEnumElements) != $MinEnumElements) || 
>		(! ($MinEnumElements > 0)))  {
>		die ("OpenInverseMap: An invalid minumum number of elements per inverted index cell was specified: $MinEnumElements\n");
>	}
>
>	if ((int($MaxEnumElements) != $MaxEnumElements) ||
>		(($MaxEnumElements != 0) && 
>		 ($MaxEnumElements < $MinEnumElements))) {
>		die ("OpenInverseMap: An invalid maximum number of elements per inverted index cell ($MaxEnumElements) was specified\n");
>	}
>
>	if (($mode ne 'r') && ($mode ne 'u')) {
>		die ("OpenInverseMap: Invalid mode selected: '$mode'\n");
>	}
>
>
>	if ($PersistentInvMap) {
>		die ("OpenInverseMap: Another inverse map ($PersistentInvMap) is already open.\n");
>	}
>
>	$PersistentInvMap=$database;
>
>	$DatabaseDir = $database;
>	$DatabaseDir =~ s#/[^/]+$#/#o;
>
>	if (! (-e $DatabaseDir)) {
>		die ("OpenInverseMap: Directory $DatabaseDir does not exist\n");
>	}
>	if (! (-d _)) {
>		die ("OpenInverseMap: $DatabaseDir is not a directory\n");
>	}
>
>	$IndexStringMapFile = "${database}.smap";
>
>	if ($mode eq 'u') {
>		if (! tie (%IndexStringToEnum,"GDBM_File",
>		   $IndexStringMapFile,&GDBM_WRCREAT,0644)) {
>			die("OpenInverseMap: Unable to open database $IndexStringMapFile\n\$");
>		}
>
>		$KeyStringMapFile   = "${database}.kmap";
>		if (! tie (%KeyStringToEnum,"GDBM_File",
>		    $KeyStringMapFile,&GDBM_WRCREAT,0644)) {
>			die("OpenInverseMap: Unable to open database $KeyStringMapFile\n\$");
>		}
>
>
>		$FreeChainFile   = "${database}.fmap";
>		if (! tie (%FreeChain,"GDBM_File",
>		    $FreeChainFile,&GDBM_WRCREAT,0644)) {
>			die("OpenInverseMap: Unable to open database $FreeChainFile\n\$");
>		}
>
>		$MapFile = "${database}.imap";
>		# if the main inverse map file doesn't exist, create it
>		if (! -e $MapFile) {
>			if (! open(INVMAPFILE,">$MapFile")) {
>				die ("OpenInverseMap: $MapFile does not exist and could not be created\n$!");
>			}
>			chmod (0644,$MapFile);
>		}
>	
>		if (! -f $MapFile) {
>			die ("OpenInverseMap: $MapFile is not a regular file\n");
>		}
>
>		if (! -r _) {
>			die ("OpenInverseMap: $MapFile exists but cannot be read (improper file permissions set?)\n");
>        	} 
>
>		if (! -w _) {
>			die ("OpenInverseMap: $MapFile exists but cannot be written to (improper file permissions set?)\n");
>        	} 
>
>		if (! open (INVMAPFILE,"+<$MapFile")) {
>			die ("OpenInverseMap: Could not open $MapFile for updating\n$!");
>		}
>		select (INVMAPFILE);
>		$|=1;
>		select (STDOUT);
>	} elsif ($mode eq 'r') {
>		if (! tie(%IndexStringToEnum,"GDBM_File",
>			$IndexStringMapFile,&GDBM_READER,0644)) {
>			die("OpenInverseMap: Unable to open database $IndexStringMapFile\n\$");
>		}
>
>		$KeyStringMapFile   = "${database}.kmap";
>		if (! tie(%KeyStringToEnum,"GDBM_File",
>			$KeyStringMapFile,&GDBM_READER,0644)) {
>			untie %IndexStringToEnum;
>			die("OpenInverseMap: Unable to open database $KeyStringMapFile\n\$");
>		}
>
>		$MapFile = "${database}.imap";
>		# if the main inverse map file doesn't exist, bail
>		if (! -e $MapFile) {
>			untie %IndexStringToEnum;
>			untie %KeyStringToEnum;
>			die ("OpenInverseMap: $MapFile does not exist\n$!");
>		}
>	
>		if (! -f _) {
>			untie %IndexStringToEnum;
>			untie %KeyStringToEnum;
>			die ("OpenInverseMap: $MapFile is not a regular file\n");
>		}
>
>		if (! -r _) {
>			untie %IndexStringToEnum;
>			untie %KeyStringToEnum;
>			die ("OpenInverseMap: $MapFile exists but cannot be read (improper file permissions set?)\n");
>        	} 
>
>		if (! open (INVMAPFILE,$MapFile)) {
>			untie %IndexStringToEnum;
>			untie %KeyStringToEnum;
>			die ("OpenInverseMap: Could not open $MapFile for reading\n$!");
>		}
>	}
>}
>
>sub InsertIndexToKey {
>
>	my ($keystring,$indexstring,$ranking,$NCallingParms,
>		$PackedRecordSize,$PackedLongSize,$BlockSize,
>		$MapFileOffset,$IndexStringMapFile,$KeyStringMapFile);
>	
>	$NCallingParms = $#_ + 1;
>
>	if ($NCallingParms != 3) {
>		die ("InsertIndexToKey: Incorrect number of calling parameters ($NCallingParms instead of 3)\n"); 
>	}
>
>	($keystring,$indexstring,$ranking)=@_;
>
>	if (! $ranking) {
>		die ("InsertIndexToKey: Ranking of '0' is not allowed.\n");
>	} elsif ($ranking != int($ranking)) {
>		die ("InsertIndexToKey: Non-integer rankings are not allowed.\n");
>	}
>
>	if (! defined($IndexEnum=$IndexStringToEnum{"f $indexstring"})) {
>		if (! defined($IndexEnum=$IndexStringToEnum{"HighIndex"})) {
>			$IndexEnum=0;
>		}
>		$IndexStringToEnum{"r $IndexEnum"}=$indexstring;
>		$IndexStringToEnum{"f $indexstring"}=$IndexEnum;
>		$IndexStringToEnum{"HighIndex"}=$IndexEnum+1;
>	}
>
>	if (! defined($KeyEnum=&KeyToEnum($keystring))) {
>		if (! defined($KeyEnum = $KeyStringToEnum{"HighIndex"})) {
>			$KeyEnum       = 0;
>		}
>		$KeyStringToEnum{"r $KeyEnum"} = $keystring;
>		$PackedLongSize                = length(pack("L",1));
>		$PackedRecordSize              = 2 * $PackedLongSize;
>		$BlockSize                     = $PackedRecordSize * $MinEnumElements;
>		$MapFileOffset                 = &PadValue(&RequestBlock($BlockSize),12);
>		$BlockSize                     = &PadValue($BlockSize,6);
>		$KeyStringToEnum{"f $keystring"} = "${KeyEnum}:${MapFileOffset}:${BlockSize}";
>		$KeyStringToEnum{"HighIndex"}  = $KeyEnum+1;
>	}
>
>	&InsertEnumItem($KeyEnum,$keystring,$IndexEnum,$ranking);
>}
>
>sub DeleteIndexFromKey {
>
>	my ($keystring,$indexstring,$ranking,
>            $NCallingParms,$CallingParms,
>	    $IndexStringMapFile,$KeyStringMapFile);
>
>	(@CallingParms)=@_;
>	$NCallingParms=$#CallingParms+1;
>
>	if ($NCallingParms != 2) {
>		die ("DeleteIndexFromKey: Incorrect number of calling parameters ($NCallingParms instead of 2)\n"); 
>	}
>	($keystring,$indexstring)=@_;
>
>	if (! defined($IndexEnum=$IndexStringToEnum{"f $indexstring"})) {
>		return;
>	}
>
>	if (! defined($KeyEnum=$KeyStringToEnum{"f $keystring"})) {
>		return;
>	}
>	&DeleteEnumItem($KeyEnum,$IndexEnum);
>}
>
>sub ReadEnumIndexesForKey {
>	my ($keystring,$IndexEnumValuesRef,$RankingValuesRef,
>	    $KeyStringMapFile,$NCallingParms);
>
>	$NCallingParms=$#_+1;
>
>	if ($NCallingParms != 3) {
>		die ("ReadEnumIndexesForKey: Incorrect number of calling parameters ($NCallingParms instead of 3)\n"); 
>	}
>	($keystring,$IndexEnumValuesRef,$RankingValuesRef)=@_;
>
>	$matches=&ReadEnumMap($keystring,$IndexEnumValuesRef,$RankingValuesRef);
>
>	$matches;
>}
>
>sub InsertEnumItem {
>	my ($key,$keystring,$index,$ranking) = @_;
>	my ($MapChunkBuffer);
>
>	$MapChunkBuffer=&ReadRawEnumMap($keystring);
>	if(&InsertTopNRaw($index,$ranking,\$MapChunkBuffer)) {
>		&SaveRawEnumMap($keystring,$MapChunkBuffer);
>	}
>}
>
>sub DeleteEnumItem {
>	my ($key,$index) =@_;
>	my ($matches,@RankingValues,@IndexValues,$count);
>
>	@IndexValues=();
>	@RankingValues=();
>	$matches=&ReadEnumMap($key,\@IndexValues,\@RankingValues);
>	# Scan for the enumerated value and delete it when found
>	for ($count=0;$count<$matches;$count++) {
>		next if ($IndexValues[$count]!=$index);
>		splice(@IndexValues,$count,1);
>		splice(@RankingValues,$count,1);
>		last;
>	}
>	&SaveEnumMap($key,\@IndexValues,\@RankingValues);
>}
>
>sub ReadRawEnumMap {
>	my ($keystring)=@_;
>
>	my ($MapFileOffset,$ReadBytes,$dev,$inode,$mode,$nlink,$uid,$gid,
>		$rdev,$size,$atime,$mtime,$ctime,$blksize,$blocks,
>		$MapChunkBuffer,$KeyEnum,$BlockSize,$KeyData);
>
>	if (! defined($KeyData=$KeyStringToEnum{"f $keystring"})) {
>		return '';
>	}
>
>	($KeyEnum,$MapFileOffset,$BlockSize)=split(/:/o,$KeyData,3);
>	$MapFileOffset = 0 + $MapFileOffset;
>	$BlockSize     = 0 + $BlockSize;
>	$MapChunkBuffer=pack("x$BlockSize");
>
>	($dev,$inode,$mode,$nlink,$uid,$gid,$rdev,
>	      $size,$atime,$mtime,$ctime,$blksize,$blocks)=stat(INVMAPFILE);
>	if ($size < $MapFileOffset+$BlockSize) {
>		return '';
>	}
>	if (! &LongSeek(\*INVMAPFILE,$MapFileOffset)) {
>		die ("ReadRawEnumMap: Unexpectedly unable to seek to byte $MapFileOffset of $PersistentInvMap\n"); 
>	}
>	$ReadBytes=read(INVMAPFILE,$MapChunkBuffer,$BlockSize);
>
>	if ($ReadBytes != $BlockSize) {
>		die ("ReadRawEnumMap: Short read on $PersistentInvMap. Only $ReadBytes of $BlockSize bytes were read at offset $MapFileOffset\n");
>	}
>
>	$MapChunkBuffer;
>}
>
>sub ReadEnumMap {
>	my ($key,$IndexValuesRef,$RankingValuesRef)=@_;
>
>	my ($nmatches,$count,@RawMapList,$NElements,$PackedRecordSize,
>		$PackedLongSize);
>	
>	@$IndexValuesRef=();
>	@$RankingValuesRef=();
>
>	# values are stored as pairs of signed long integers,
>	# RankingValue first, IndexValue second
>
>	$MapChunkBuffer=&ReadRawEnumMap($key);
>
>	return 0 if (length($MapChunkBuffer)==0);
>
>	$PackedLongSize=length(pack("L",1));
>	$PackedRecordSize = 2 * $PackedLongSize;
>
>	$NElements= length($MapChunkBuffer) / $PackedRecordSize;
>	(@RawMapList)=unpack("L*",$MapChunkBuffer);
>
>	# The field pairs are a bit inefficient on speed in Perl
>	# without structures - but should be ideal in C
>
>	$count=0;
>	$nmatches=0;
>	while($count<=$#RawMapList) {
>		# If the ranking=0, this is the end of the list
>		# because no actual entry will have a ranking of 0
>		if ($RawMapList[$count]==0) {
>			last;
>		}
>		push (@$RankingValuesRef,$RawMapList[$count]);
>		$count++;
>		push (@$IndexValuesRef,$RawMapList[$count]);
>		$count++;
>		$nmatches++;
>	}
>
>	$nmatches;
>}
>
>sub SaveEnumMap {
>	my ($keystring,$IndexValuesRef,$RankingValuesRef)=@_;
>
>	my (@RawMapList,$tcount,$scount,$MapChunkBuffer,$stopat);
>
>	# values are stored as pairs of signed long integers,
>	# RankingValue first, IndexValue second
>
>	$scount=0;
>	$tcount=0;
>	$stopat = $#$RankingValuesRef + 1;
>	$stopat = $MaxEnumElements if ($stopat > $MaxEnumElements);
>	while($tcount<$stopat) {
>		# If the ranking=0, this is the end of the list
>		# because no actual entry will have a ranking of 0
>		if (! defined($$RankingValuesRef[$tcount]) ||
>			($$RankingValuesRef[$tcount]==0)) {
>			last;
>		}
>		push (@RawMapList,$$RankingValuesRef[$tcount]);
>		$scount++;
>		push (@RawMapList,$$IndexValuesRef[$tcount]);
>		$scount++.
>TAKETHIS <oTlX1.538$ob2.27852918@newsreader.digex.net>
>Path: uunet!in5.uu.net!newsfeed.xcom.net!chnws02.mediaone.net!192.148.253.68!netnews.com!dca1-hub1.news.digex.net!digex!newsreader.digex.net!not-for-mail
>Newsgroups: comp.jobs,comp.jobs.offered,prg.jobs
>Subject: US-NJ-METUCHEN-Lead Software Architect
>From: cshopinfo@careershop.com
>Organization: Career Shop <http://www.careershop.com>
>Lines: 41
>Message-ID: <oTlX1.538$ob2.27852918@newsreader.digex.net>
>Date: Wed, 21 Oct 1998 14:06:12 GMT
>NNTP-Posting-Host: 207.87.32.174
>X-Complaints-To: abuse@digex.net
>X-Trace: newsreader.digex.net 908978772 207.87.32.174 (Wed, 21 Oct 1998 10:06:12 EDT)
>NNTP-Posting-Date: Wed, 21 Oct 1998 10:06:12 EDT
>Xref: uunet prg.jobs:1908591
>
>
>Job Title: Lead Software Architect
>Job Location: METUCHEN, NJ
>
>Prime Associates, Inc., a leading provider of Messaging 
>Middleware solutions for the Financial Industry, seeks 
>a lead product developer. Strong experience in a combination 
>of C++, Visual Basic (VB), or SQL Server on Windows 
>NT required together with strong management and communications 
>skills.
>
>High visibility among senior banking management.
>
>Minimal travel.
>
>Fantastic personal and financial growth oppty.
>
>Leading edge development
>
>Job Ref.# CAREERSHOP 67231
>
>Company Information:
>Prime Associates
>Sal Cangialosi
>495 Main St.
>Mentuchen, NJ  08840
>Phone: 732-603-0956
>Fax: 732-603-9262
>Email: scangialosi@primeassociates.com
>URL:  
>
>
>~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>Posted by CAREER SHOP <http://www.careershop.com>
>LOCAL Online Job Fairs Now in Progress!
>Top Local employers WANT YOU!
>Search Jobs and Post your resume FREE!!!
>~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>
>
>

Danny Groppo
gosdpads@yahoo.com


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

Date: 21 Oct 1998 13:44:27 -0400
From: Uri Guttman <uri@fastengines.com>
Subject: Re: Who can help me write full-text search engine in Perl with indexing
Message-Id: <sarogr5n72b.fsf@camel.fastserv.com>

>>>>> "DAB" == David Alan Black <dblack@pilot.njin.net> writes:

  DAB> Darius Jack <dariusz@usa.net> writes:
  >> Uri Guttman wrote:
  >>>  >>>>> "DJ" == Darius Jack <dariusz@usa.net> writes:
  >>> 
  DJ> Who can help me write search engine to search kew words in full
  DJ> texts, in Perl, running locally under Perl for DOS.

  >> I don't ask you to work on my project in Perl, [...]


  DAB> Meaning the original "Who" meant "Who (other than Uri Guttman)" ?

i resemble that remark. the original posting was a typical who can do my
work for me. his followup was clearer in that he had some sort of real
group project idea. i am still not interested as it is on DOS. 

uri

-- 
Uri Guttman                  Fast Engines --  The Leader in Fast CGI Technology
uri@fastengines.com                                  http://www.fastengines.com


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

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

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