I am currently trying to create/generate a CSV file using one of three classes:
use Class::CSV; use Text::CSV; use Text::CSV_XS;
Though when I try and run it, to check my code I come up with the same error message:
Can't locate Class/CSV.pm in @INC (@INC contains: C:/Per/site/lib C:/Perl/lib .) at C:\Users\<DIRECTORY> - <DIRECTORY>.file.pl line1
I have tried searching for the files though I haven't had any luck. Has anyone else come up against this problem? I have looking in the Directory and the CSV.pm file does exists.
Class::CSV is installed on your system, your library search path is incomplete. (Your error message lists
C:/Per/site/lib as a search lib, which looks like a typo for
C:/Perl/site/lib, which you might want to look into.)
You need to locate the correct
CSV.pm file where the library is located. For example, if it's found in:
Then you have one of the following options.
Modify the environment for Perl or the invocation so that this is set (assuming my Windows skill haven't expired completely, someone feel free to edit and correct if I get the syntax wrong):
You can use the
-Ioption to perl to add the path:
perl -IC:/Perl/lib/foo my-app.pl
You can use the
use libcommand in the program itself to add the search path:
use lib 'C:/Perl/lib/foo'; use Class::CSV; # etc.
- How Upload file using Mojolicious?
- Perl: Find a sum of an array recursively with tail call optimization
- .NET Regular Expression (perl-like) for detecting text that was pasted twice in a row [on hold]
- Perl How to remove a directory after program finishes
- Perl supervisor plackup starman perlbrew [closed]
- How to use timestamp to get recent files in Perl
- Missing shell module in perl 5.18
- Print only the last three columns from file
- Print how many substitutions took place in a Perl s///g?
- Specifying file to process to Perl one-liner