in reply to using undef on a array

This is because (I believe) the @a=undef code sets the first value of the array a to the undefined value - the array is still defined, as it contains one value, which happens to be 'undef'.
I may be wrong about this, but I'm hoping not. :)
Hope that helps
davis