0
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;
4

1 回答 1

1

那应该是

%$cblock = %hash_build_db::cblock;

如果您在包cblock内有哈希hash_build_db,并且$cblock是 hashref。

于 2013-10-19T13:58:42.387 回答