in reply to deleting all the elements of an array

The undef() operator can clear variables of all types:

undef $scalar; # $scalar = undef undef @array; # @array = () undef %hash; # %hash = ()

    -- Chip Salzenberg, Free-Floating Agent of Chaos