use Data::Dumper; $x[0]=[0];map{undef $_}(@x);print "still defined\n" if defined @x; print Dumper(\@x);