http://qs321.pair.com?node_id=1222924

Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

Greetings Monks,

I am trying to use a module from CPAN.

use Excel::Writer::XLSX;

I installed the module locally with command

perl -MCPAN -Mlocal::lib -e 'CPAN:install(Excel::Writer::XLSX)'

I could locate the required module in the dir

~/perl5/lib/perl5/Excel/Writer/XLSX.pm

So, I add the lib dir to @INC with command

use lib '~/perl5/lib';

But, I get the error

Can't locate Excel/Writer/XLSX.pm in @INC (@INC contains: ~/perl5/lib ...

I could not figure out the exact dir location, so I tried

use lib '~/perl5/lib/'; use lib '~/perl5/lib/perl5'; use lib '~/perl5/lib/perl5/';

Any help in pointing out the mistake is much appreciated.

Many thanks