$sub = $i ($i = 0)的时候肯定会die的。 :-)
shandaw wrote:
> $sub="";
> for(my $i=0;$i<5;$i++)
> {
> $sub=$i or die "fail";
> print "$sub\n";
> }
> 请问为什么这段代码会显示"fail",难道$sub=$i 没有赋值成功吗?可是我去掉or die "fail",它却能正常运行.
> >
>
--
Perl乐事 -- http://www.perlersh.org
我的博客 -- http://www.perlersh.org/blog.html
--~--~---------~--~----~------------~-------~--~----~
您收到此信息是由于您订阅了 Google 论坛“PerlChina Mongers 讨论组”论坛。
要在此论坛发帖,请发电子邮件到 [email protected]
要退订此论坛,请发邮件至 [email protected]
更多选项,请通过 http://groups.google.com/group/perlchina?hl=zh-CN 访问该论坛
-~----------~----~----~----~------~----~------~--~---