in reply to Question about foreach/iterating/verifying an undefined array

I think you want to empty your array, so use @array=(); (update: or undef @a;)

my @array = undef; assigns a 1-element list with value undef

HTH!

Cheers Rolf

PS: writing my @a is already sufficient for having an empty array!