undef @x; use Data::Dumper; print Dumper(\@x); !defined(@x) && print "not defined\n";
Unfortunately, Data::Dumper shows \@x == []
which means that @x is an array named for an empty list, not that @x is undefined.
The difference cropped up for me when getting back data from grep, which returns undef when nothing in the input list matches the criteria of the code block.
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |