Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!usc!zaphod.mps.ohio-state.edu!wuarchive!uunet!cme!durer.cme.nist.gov!przemek From: przemek@rrdstrad.nist.gov (Przemek Klosowski) Newsgroups: comp.lang.perl Subject: Re: A question on associative arrays Message-ID: Date: 30 May 91 20:41:01 GMT Sender: news@cme.nist.gov Organization: U. Notre Dame/NIST Lines: 15 Hello! The solution to a problem with testing if associative array element was already defined reminded me of a problem I had, and couldn't figure out. How does one check if the associative array was assigned at all? My program runs a loop initializing an array, but each individual initialization is conditioned on something. On a rainy day all conditions could be false: is there a way to find out? The obvious $#ary doesn't work, since it refers to @ary. defined(%ary) is no good, since %ary might be pre-defined in a local(). Ideas, anyone? przemek -- przemek klosowski (przemek@ndcvx.cc.nd.edu) Physics Department University of Notre Dame IN 46556