[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

Re: [MacPerl] Thingies



At 09.28 -0400 1999.04.23, jacobs@azstarnet.com wrote:
>> As a further comment, don't call defined() on arrays or hashes. In this
>> example, you can call exists() to see if a specific key is valid, or just
>> test the individual array refs.
>
>I'm not sure I understand this comment. Why not use exist() on arrays
>or hashes? (Works ok -- is there some meta-reason why this is
>considered a Bad Thing?)

You only think it works OK.  For aggregates (arrays and hashes), defined()
says whether or not memory has ever been allocated for the given aggregate.
However, this is only the current behavior and is subject to change.
perlfunc's entry for defined explains it all.

--
Chris Nandor          mailto:pudge@pobox.com         http://pudge.net/
%PGPKey = ('B76E72AD', [1024, '0824090B CE73CA10  1FF77F13 8180B6B6'])

===== Want to unsubscribe from this list?
===== Send mail with body "unsubscribe" to macperl-request@macperl.org