江天一色
业精于勤荒于嬉,行成于思毁于随
2008年5月20日星期二
Perl : defined 检测变量的问题
来源:
perlfaq-4.54-Why does defined() return true on empty arrays and hashes?
defined 碰到 空array 或 空hash 时返回True
因此defined最好只用来检测scalar或sub,而不是检测array/hash
没有评论:
发表评论
较新的博文
较早的博文
主页
订阅:
博文评论 (Atom)
没有评论:
发表评论