Reference: delete
Author: Ellen Siever, Stephen Spainhour & Nathan Patwardhan
Date: 1999-07-02T01:34:33Z

#

| Chapter 5 Function Reference |

## delete

    delete $hash{key}
    delete @hash{@keys}

Deletes the specified key or keys and associated values from the specified hash. (It doesn't delete a file. See `unlink` for that.) Deleting from `$ENV{}` modifies the environment. Deleting from a hash that is bound to a (writable) DBM file deletes the entry from the DBM file.

For normal hashes, the `delete` function returns the value (not the key) that was deleted, but this behavior is not guaranteed for tied hashes, such as those bound to DBM files. To test whether a hash element has been deleted, use `exists`.

Reference: defined |  | Reference: die