in reply to undef'ing @arrays caveat
You can only assign lists to arrays, but what you probably forgot is that not all lists need parentheses. So effectively, this happens:
It makes your array be a single element array with undef as its only value. To empty an array, use an empty list (because there is no scalar this time, you need the parens):@array = (undef);
To really destroy the array, and also reset its MAX, use:@array = ();
See also: undef.undef @array;
In Section
Meditations