next up previous
Next: Further Perl Programming Up: Basic Perl Programming Previous: Associative Arrays

Associative Array Operators

keys()

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

E.g.

@names = keys(%lookup);

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

E.g.

@codes = keys(%lookup);

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

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



Dave Marshall
9/28/2001