home | O'Reilly's CD bookshelfs | FreeBSD | Linux | Cisco | Cisco Exam  


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 .