亚洲av成人无遮挡网站在线观看,少妇性bbb搡bbb爽爽爽,亚洲av日韩精品久久久久久,兔费看少妇性l交大片免费,无码少妇一区二区三区

Chinaunix

標(biāo)題: use strict的不解 [打印本頁(yè)]

作者: freeterman    時(shí)間: 2013-05-28 20:29
標(biāo)題: use strict的不解
[root@localhost ~]# less test
#!/usr/bin/env perl
use strict;
use warnings;
my $name = Fred;
print "hello\n" if $name =~ /red/;
[root@localhost ~]# ./test
Bareword "Fred" not allowed while "strict subs" in use at ./test line 4.
Execution of ./test aborted due to compilation errors.
[root@localhost ~]#


當(dāng)注釋了use strict的時(shí)候就正常了
[root@localhost ~]# less test
#!/usr/bin/env perl
#use strict;
use warnings;
my $name = Fred;
print "hello\n" if $name =~ /red/;
[root@localhost ~]# ./test
hello
[root@localhost ~]#

那位可以幫忙解釋一下,謝謝。

作者: mcshell    時(shí)間: 2013-05-28 21:07
字符串加引號(hào){:3_186:}
作者: freeterman    時(shí)間: 2013-05-29 06:36
謝謝 謝謝 :wink:
作者: kangwenyi    時(shí)間: 2013-05-29 09:20
頂起~~~~~~~~~~~~~~~~~~




歡迎光臨 Chinaunix (http://www.72891.cn/) Powered by Discuz! X3.2