t*g
2 楼
【 以下文字转载自 Linux 讨论区 】
发信人: thanksgiving (~灯红酒绿的上海~), 信区: Linux
标 题: perl怎么判断一个变量为空并且不为零?
发信站: BBS 未名空间站 (Wed Aug 13 17:46:08 2008)
$str=0
if (!$str){
print "empty";
}
上面是错误的判断。有没有什么办法?
如果写 (!$str) && ($str != 0) 太麻烦了。
发信人: thanksgiving (~灯红酒绿的上海~), 信区: Linux
标 题: perl怎么判断一个变量为空并且不为零?
发信站: BBS 未名空间站 (Wed Aug 13 17:46:08 2008)
$str=0
if (!$str){
print "empty";
}
上面是错误的判断。有没有什么办法?
如果写 (!$str) && ($str != 0) 太麻烦了。
相关阅读
c++ define 一问问一个MinGW + CMake 的问题C# WebControl怎么将linked list 存储到文件中去呀One network C question[转载] Re: Mac C++ program questionSolaris shell problem, HELP me !!!!Help: any good decompiler for DLL偶三年多前写的东东 Re: 8-puzzle超牛的debug问一个在C里面转换十六进制的问题respin 是什么意思?c++ rand() 一问Re: 一个小c++(stl) 的问题有用Eclipse的嘛?请教一个关于字符指针的简单问题[转载] What search method is used in exists()?Usage of Grep???help!!!a question about ASP.NETRe: 请教一道题目