这个.....不要用$a和$b,sort保留 详细看perldoc -v \$a 在 2011年1月19日 上午11:21,Jeova Sanctus Unus <[email protected]> 写道: > perldoc -f undef > 节选 > undef EXPR > undef Undefines the value of EXPR, which must be an lvalue. > 即undef $a和$a=undef是一样的 > > 在 2011年1月18日 下午11:17,方伟 <[email protected]> 写道: >> 我自己试了一下,还是搞不懂 >> $num=100; >> if(undef($num)){print "it's undefined";}else{print "it's defined";} >> 输出结果是it's defined >> >> 去掉第一行: >> if(undef($num)){print "it's undefined";}else{print "it's defined";} >> 输出结果还是it's defined >> >> 在 2011年1月18日 下午10:52,方伟 <[email protected]> 写道: >>> 在教程上看到这样的用法:if (defined($name)) 以及 $name=undef; >>> 我想知道能不能反过来用呢,这样子行不行:if (undef($name)) 以及 $name=defined; >>> >> >> -- >> 您收到此邮件是因为您订阅了 Google 网上论坛的"PerlChina Mongers 讨论组"论坛。 >> 要向此网上论坛发帖,请发送电子邮件至 [email protected]。 >> 要取消订阅此网上论坛,请发送电子邮件至 [email protected]。 >> 若有更多问题,请通过 http://groups.google.com/group/perlchina?hl=zh-CN 访问此网上论坛。 >> >> >
-- 您收到此邮件是因为您订阅了 Google 网上论坛的"PerlChina Mongers 讨论组"论坛。 要向此网上论坛发帖,请发送电子邮件至 [email protected]。 要取消订阅此网上论坛,请发送电子邮件至 [email protected]。 若有更多问题,请通过 http://groups.google.com/group/perlchina?hl=zh-CN 访问此网上论坛。
