next up previous contents
Next: Operators Up: Associative Arrays Previous: Associative Arrays

Associative Array Operators


The keys(%arrayname) lists all the key names in a specified associative array. The answer is returned as an ordinary index array.


@names = keys(%lookup);

values() This operator returns the values of the specified associative array.


@codes = values(%lookup);

delete deletes an associated key and value by key reference, e.g.

# scrub adam from code list
delete $lookup("adam");