$principal{"clarinet"} = "Susan Bartlett"; $principal{"basson"} = "Andrew Vandesteeg"; $principal{"flute"} = "Heidi Lawson"; $principal{"oboe"} = "Jeanine Hassel"; @woodwinds = keys(%principal); @woodwindPrincipals = values(%principal);
Some Associative Array functions | |
---|---|
keys(%ARRAY) | Return a list of all the keys in %ARRAY. The list is "unordered" - it depends on the hash function used internally. |
values(%ARRAY) | Return a list of all the values in %ARRAY |
each(%ARRAY) | Each time this is called on an %ARRAY, it will return a 2 element list consisting of the next key/value pair in the array. |
delete($ARRAY{KEY}) | remove the pair associated with KEY from ARRAY. |
The National Center for Supercomputing Applications
University of Illinois at Urbana-Champaign
johnsonb@ncsa.uiuc.edu
Last modified: June 19, 1997