![]() |
|
"be consistent" | |
PerlMonks |
Re: undef'ing @arrays caveatby Juerd (Abbot) |
on Apr 20, 2002 at 09:52 UTC ( #160759=note: print w/replies, xml ) | Need Help?? |
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): To really destroy the array, and also reset its MAX, use: See also: undef.
In Section
Meditations
|
|