Perl找不到Tie / File / AsHash.pm

时间:2012-06-13 04:46:18

标签: perl

我有一个代码

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.

1 个答案:

答案 0 :(得分:2)

这通常表示未安装该模块。一个通常安装模块如下:

cpan Tie::File::AsHash