请问数组清空后,作用域会变化吗?

在 Perl in 20 pages 看到了这么一段话,有多了一些疑问

A scalar variable that has a valid string or numeric value, such as 4.3 or "hello" or even "" (the empty
string), is defined. In contrast, if a variable without a valid value is undefined. The builtin value undef
represents this undefined value, much like NULL in C/C++, null in Java or nil in Lisp/Ada are undefined
values. An array is defined if has previously held data. The empty array () is undefined; all other array
values are considered defined. Use the defined() function to test if a variable is defined.

[Copy to clipboard] [ - ]
CODE:
my $emptystr = "";
my(@nonemptylist) = ( undef );
if ( defined($emptystr) && defined(@nonemptylist) ) {
print "will see this\n";
}
my $invalid;
my(@emptylist) = ();
if ( defined($invalid) || defined(@emptylist)) {
print "will NOT see this\n";
}
@emptylist = (1, 2);
@emptylist = ();
if ( defined(@emptylist)) {
print "emptylist is empty but is defined now\n";
}

没看内容,标题的答案是:不会。
如果你碰到什么问题,请检查下自己的程序,别往这个方向联想了。