Re: Hash arrays [was: does property exists in a record]
Re: Hash arrays [was: does property exists in a record]
- Subject: Re: Hash arrays [was: does property exists in a record]
- From: Greg Strange <email@hidden>
- Date: Mon, 13 Aug 2001 20:26:07 -0500
>
I'd like to see some argument for why they'd
>
improve the life of the average scripter.
Well for me in Perl, I use it a lot to do things like managing lists of
values under a single variable where I don't necessarily know what is going
to be passed to me (as in a CGI). To make myself clear let me describe it
like this:
If I had two guys named Ted and Arnold, I could use $key{$value} and be able
to manage every instance of name as essentially a nested list. Basically it
allows me to get in and out of deeply complex arrays faster and without as
much coding. It also allows me to change the name of the key of each value
so that if later I wanted to pass a list of first names (but keep the same
data), my code doesn9t change at all because it just cares about each unique
$key.
I am not entirely sure I make myself clear.
That's my two cents.
Greg Strange
__________________________________________________________________
Writing AppleScripts? Got a bunch of code snippets laying around?
Want to add them to a list of modules that every scripter could use?
Go to
http://www.applemods.com