start page | rating of books | rating of authors | reviews | copyrights

Perl in a Nutshell

Perl in a NutshellSearch this book
Previous: Reference: defined Chapter 5
Function Reference
Next: Reference: die
 

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 .


Previous: Reference: defined Perl in a Nutshell Next: Reference: die
Reference: defined Book Index Reference: die