-Returns each element so deleted or the undefined value if there was no such -element. Deleting from C<$ENV{}> modifies the environment. Deleting from +Returns a list with the same number of elements as the number of elements +for which deletion was B. Each element of that list consists of +either the value of the element deleted, or the undefined value. In scalar +context, this means that you get the value of the last element deleted (or +the undefined value if that element did not exist). + + %HASH = (foo => 11, bar => 22, baz => 33); + $scalar = delete $HASH{foo}; # $scalar is 11 + $scalar = delete @HASH{qw(foo bar)}; # $scalar is 22 + @array = delete @HASH{qw(foo bar baz)} # @array is (undef,undef,33) + +Deleting from C<$ENV{}> modifies the environment. Deleting from a hash tied to a DBM file deletes the entry from the DBM file. Deleting from a Cd hash or array may not necessarily return anything.