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


in reply to if (defined @arr) problem

That's because the array contains one value : 'undef' .
Look at what happens if you do :
sub test { return () ; }
You can also print scalar @a to see the what's the length of the array .