I have a problem with perl5 with ubuntu.
I've got a script, in which I include several directories. When starting the script, the shell returns
Can't locate XML/Twig.pm in @INC (@INC contains:
/etc/perl
/usr/local/lib/perl/5.14.2
/usr/local/share/perl/5.14.2
/usr/lib/perl5
/usr/share/perl5
/usr/lib/perl/5.14
/usr/share/perl/5.14
/usr/local/lib/site_perl)
at /root/cron/bin/xml-gp-data.pl line 9.
BEGIN failed--compilation aborted at /root/cron/bin/xml-gp-data.pl line 9.
Alright, so that means, perl doesn't find that directory. I've checked the directory and the file. Its path is
/root/perl5/lib/perl5/XML/Twig.pm
The code I use to include that directory and file is
use strict;
use warnings;
use DBI;
use lib qw(/root/perl5/lib/perl5);
use XML::Twig;
use Data::Dumper;
use lib qw(/root/perl5/lib/perl5/);
I didn't write that script myself, so I can't tell you, why it is included twice :-P
Still I don't understand, why perl can't find XML/Twig.pm
. It is exactly where I told perl to look for it.
Any ideas why this doesn't work and how I can correct it?