1

我有一个代码

use Tie::File::AsHash;
tie %sets, 'Tie::File::AsHash', '.\\main\\old_names.txt',  split => '\+' or die "Problem trying to %hash: $!";

我得到了错误:

Can't locate Tie/File/AsHash.pm in @INC <@INC contains: C:/strawberry/perl/site/lib C:/strawberry/perl/vendor/lib C:/strawberry/perl/lib .> at C:\Users\user\Desktop\test.pl line 97 (which is the second line I posted)

BEGIN failed--compilation aborted at line 97.
4

1 回答 1

3

这通常表明该模块未安装。通常按如下方式安装模块:

cpan Tie::File::AsHash
于 2012-06-13T04:50:55.580 回答