zwt 于 2010-01-04 14:29:21发表:
因为用了use strict,所以要用my $name.
jevens-ly 于 2008-09-20 10:50:40发表:
name为什么要设成局部变量?my $name;
jevens-ly 于 2008-09-20 10:47:36发表:
请解释下好吗?谢谢
wgyzhechao 于 2008-09-18 12:00:41发表:
use strict; print "请输入名字:"; my $name; chomp ($name = ); if ($name eq 'pual'){ print "Hi pual"; } else { print "sorry.have we meet before"; }
zwt 于 2010-01-04 14:29:21发表:
因为用了use strict,所以要用my $name.
jevens-ly 于 2008-09-20 10:50:40发表:
name为什么要设成局部变量?my $name;
jevens-ly 于 2008-09-20 10:47:36发表:
请解释下好吗?谢谢
wgyzhechao 于 2008-09-18 12:00:41发表:
use strict;
);
print "请输入名字:";
my $name;
chomp ($name =
if ($name eq 'pual'){
print "Hi pual";
}
else
{
print "sorry.have we meet before";
}