(Perl:)

delete $hash{ELEM} deletes the key named ELEM from the hash %hash. After this command, exists $hash{ELEM} will no longer be true. See exists for more information on the difference between the operators delete and undef when applied to a hash element (you usually want the former).

In fact, delete will accept a hash slice. So delete @hash{'a','b','c'} will delete the three keys 'a', 'b', 'c' from %hash.

The return value of this operator is the list of the values which were associated with the specified keys (prior to their deletion, of course). This return value is rarely used.

(C++:)

delete p, where p is some pointer, destroys the object that p points to and releases the memory which was allocated to it (using new). In particular, the object must have previously been allocated using new (and delete must not already have been called for this object).

Common errors using this operator include calling delete on an array (you should use delete[] instead), and using delete to free PODs allocated using malloc.