- 论坛徽章:
- 0
|
本帖最后由 黑色阳光_cu 于 2010-10-25 14:26 编辑
print $ab[0] 'aaa' 会语法错,因为print会试图给句柄加上*转成GLOBTYPE,像这样子print *$ab[0] 'aaa',结 ...
flw 发表于 2010-10-25 14:23
比较了,差不多。
print $ab[0] 'aaa';
print *$ab[0] 'aaa';
D:\>perl t.pl
String found where operator expected at t.pl line 7, near "] 'aaa'"
(Missing operator before 'aaa'?)
syntax error at t.pl line 7, near "] 'aaa'"
Execution of t.pl aborted due to compilation errors.
D:\>perl t.pl
String found where operator expected at t.pl line 7, near "] 'aaa'"
(Missing operator before 'aaa'?)
Global symbol "$ab" requires explicit package name at t.pl line 7.
syntax error at t.pl line 7, near "$ab["
Execution of t.pl aborted due to compilation errors. |
|