PDA

View Full Version : Any 'Perlers' around?


BOAC
3rd May 2011, 20:20
Now I have my disk drives behaving, another query for the experts:

I'm a bit 'Newbie-ish' to Perl (used much older perl before), but have now installed 5.12.3 on Win XP SP3 and am working on an excel function.


The example 'a_simple_parser.pl' from Spreadsheet-ParseExcel-0.59\examples' produces 'cannot locate Spreadsheet/ParseExcel.pm in @INC' etc etc


I have checked @INC and it contains C:/usr/site/lib and C:/usr/lib and the .pm is in the former location. PPM shows 'no missing packages to install'. I have also used 'Use lib etc etc' with no success.


Bit Stuck!

mixture
3rd May 2011, 20:36
Have you tried reinstalling the module with CPAN ?

Something like cpan -fi Spreadsheet::ParseExcel::Simple

(changing module name as necessary for your needs)

Spurlash2
3rd May 2011, 22:20
Thread HERE (http://www.unix.com/unix-dummies-questions-answers/121104-not-able-run-simple-perl-script.html)that may give a clue.

Scroll down a toosh.

BOAC
4th May 2011, 07:57
Ta Spurlash - if you mean post 5 on the link, I have now installed the excel module via Cpan AND the original PPM and I still get the same message.

This is the first time I have used a 'module', as previous dabbles have been with home-made or 'ordinary' scripts with no module calls, so I am probably just screwing something up!

ExGrunt
5th May 2011, 16:49
BOAC,

I have checked @INC and it contains C:/usr/site/lib and C:/usr/lib and the .pm is in the former location.I have not used perl with windows, but could it be that the @INC paths use forward slashes rather than windows back slashes - ie:

C:\usr\site\lib

HTH

EG

BOAC
5th May 2011, 21:43
EG - a good thought, but the 'warning' i get has forward slashes in it In fact, bizarrely, I have sorted the problem by adding 'use C:/Perl/site/lib' in the header, whereas before I was using 'use usr/site/lib' so it appears that the system has got 'usr' wrong - simple.