![]() |
1
10
Bareword "sdf" not allowed while "strict subs" in use at -e line 1. Execution of -e aborted due to compilation errors. 要获得更多乐趣,请尝试
看见 Strictly speaking about use strict :
更正: E:\Home> perl -we "print sdf" Unquoted string "sdf" may clash with future reserved word at -e line 1. Name "main::sdf" used only once: possible typo at -e line 1. print() on unopened filehandle sdf at -e line 1.
如果一个裸字被提供给
E:\Home> perl -MO=Deparse -e "print sdf" print sdf $_; 作为对这一观察的确认。另请注意: E:\Home> perl -e "print asdfg, sadjkfsh" No comma allowed after filehandle at -e line 1. E:\Home> perl -e "print asdfg => sadjkfsh" asdfgsadjkfsh
所有这些例子都表明使用空话会带来很多惊喜。你应该
|
![]() |
2
5
这是一个“
bareword
". 如果允许,则其值为
|
![]() |
3
4
这个例子并不特别:
您可能想查看这篇关于Perl中的真相的文章: What is Truth? |
![]() |
4
3
|
![]() |
5
0
除非参数中传递的值未定义,否则定义的函数将返回true。这对于区分包含0或“”的变量和刚刚存在的变量非常有用。 |