@a = (1..1000); print "original array:\n"; print join(",", @a), "\n"; $#a = -1; print "after set to -1:\n"; print join(",", @a), "\n";#You can not say for sure that your array has already been garbage collected at this point, but at least it is now a candidator.