[root@ test]$ perl -e "%hash=(key,1);print 2 if exists $hash{key};"
exists argument is not a HASH or ARRAY element at -e line 1.
这段程序放到单独的文件中执行不会报错,命令行就不行,为何?
|
|
这段程序放到单独的文件中执行不会报错,命令行就不行,为何? |
||
|
|
|
|
或者使用单引号:
|
|||
|
|