http://www.perlmonks.org?node_id=1009988


in reply to Re^2: map and undef - odd behaviour with an array of arrays
in thread map and undef - odd behaviour with an array of arrays

But why did map{undef $_}(@x) behave differently than undef @x?
"undef @x" empties the array while "map{undef $_}@x" sets each element in the array to the value undef. Since your array had one element in it, that element was not deleted, rather its value was set to undef.