1

I'm trying to download a module from CPAN and save it into the same directory as the directory that my Perl script is in because I don't have permissions to download it normally, but when I try to run the code, it can't find the script.

My Code:

#usr/bin/perl
use Spreadsheet::WriteExcel;

Error Message:

Can't locate Spreadsheet/WriteExcel.pm in @INC at temp.pl line 3.
BEGIN failed--compilation aborted at temp.pl line 3.

How can I tell Perl where to look for the module? Thanks.

choroba
  • 231,213
  • 25
  • 204
  • 289
Andrew
  • 497
  • 6
  • 21
  • What do you mean by "download it normally"? – choroba Sep 11 '15 at 20:34
  • I tried using the FindBin method, but now it says Can't locate FindBin.pm in @INC at temp.pl line 3. BEGIN failed--compilation aborted at temp.pl line 3. How do I solve this? – Andrew Sep 11 '15 at 20:38
  • @Andrew FindBin is a core module, so it should already be installed somewhere in `@INC`. What are the contents of `@INC` in the error message? – ThisSuitIsBlackNot Sep 11 '15 at 20:43

0 Answers0