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

Re: [MacPerl] Thingies



On 23 Apr, Chris Nandor wrote:
> At 09.28 -0400 1999.04.23, jacobs@azstarnet.com wrote:
>>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.

ok -- so if I'm going to have a series of arrays, each a different
size, each of which may or may not have contents, I'm better off doing

	defined ( $array1[0] )
	defined ( $array2[0] )

given that I'm going to be filling each array from the start. (It's just
the end points that are variable.) 

Sorry if I'm being dense, but I want to make sure I'm understanding
what you're saying. I'll do a `man perlfunc | grep defined` too...

Thanks for the help,
john,
who feels his brain growin' by the minute...
-- 
----------------------------------------------------------------
John S Jacobs Anderson                      jacobs@azstarnet.com
www.treefort.org/~jacobs/ <--   GeneHack (bioinfo*linux*opinion)
Data/Spock '96  the Logical Choice!


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