Guten Nachmittag,

On Sat, 30 Jul 2005 19:37:43 +0200, Detlef Lindenthal wrote:

  ##  Just for clarity: What is your distinction between "domain" and
"name"?
  ##  "Domain" the first two levels, and the rest "name"??

In my posting I used "name" for the whole, e.g. www.nigeria.gov.ng.
and "domain" for the 2 top levels, e.g. gov.ng.

  ##  Try this, add a hash entry "{is_read}":

$H{'64.207.97.183'}{ng}{gov}{nigeria}{www}{is_read}=1;
$H{'64.207.97.183'}{ng}{gov}{nigeria}{is_read}=1;

  ##  If you test:

print     "nigeria.gov.ng\n" if exists
$H{'64.207.97.183'}{ng}{gov}{nigeria}{is_read};
print "www.nigeria.gov.ng\n" if exists
$H{'64.207.97.183'}{ng}{gov}{nigeria}{www}{is_read};

  ##  these tests work as desired.
  ##  Right?

Quite right.

So, your idea needs one hash instead of two for the new records. It's a clever
scheme.
It would be interesting to assess each scheme in terms of resource requirements
(running time and memory).
Your hierarchical scheme implies one hash level for each word in the names.
Plus extracting each word of every name in the archive at updating time.
Would this overhead be smaller that handling two hashes ? I have no idea.
It may not even matter. But your scheme is worth learning.

Thanks for your help.

Auf wiedersehen.

Reply via email to