Scalar found where operator expected at /pgfs1/eng/hchian2/bin/soc/fc_net_tracer.pl line 158, near "%hash_build_db::$cblock"
(Missing operator before $cblock?)
syntax error at /pgfs1/eng/hchian2/bin/soc/fc_net_tracer.pl line 158, near "%hash_build_db::$cblock"
Execution of /pgfs1/eng/hchian2/bin/soc/fc_net_tracer.pl aborted due to compilation errors.
我正在尝试从另一个模块复制哈希,但是这个问题错误阻止了我。
我用来引用我在hash_build_db.pm
中创建的哈希的代码是
use hash_build_db;
%$cblock = %hash_build_db::$cblock;
答案 0 :(得分:1)
那应该是
%$cblock = %hash_build_db::cblock;
如果cblock
包中有hash_build_db
哈希,并且$cblock
是hashref。