Newsgroups: comp.lang.perl
Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!think.com!sid
From: sid@think.com (Sid Stuart)
Subject: A question on associative arrays
Message-ID: <1991May30.134223.23225@Think.COM>
Originator: sid@grub.think.com
Sender: news@Think.COM
Organization: Thinking Machines Corporation, Cambridge MA, USA
Distribution: na
Date: Thu, 30 May 91 13:42:23 GMT


I am writing a Perl application in which I would like to store
into an associative array only if an entry for that key does
not exist. The problem is I may come up with duplicate keys and
I don't want to overwrite the contents of an entry. Is there a
cheap way to find out if a key is in use? By cheap I mean other
than using the functions "keys" or "each" to search through all
the keys of the array.

Thanks for the time,
Sid Stuart
sid@think.com

-- 
Sid Stuart, Thinking Machines Corp.

sid@think.com
{uunet,harvard}!think!sid
