defined(@array) is deprecated at undef1.pl line 2. (Maybe you should just omit the defined()?) still defined $VAR1 = [ undef ];