By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,852 Members | 1,426 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,852 IT Pros & Developers. It's quick & easy.

error while using the date::calc module

P: 10
hi!

i got the following error while using the Date::Calc module in perl.
plz help me..

the file is ex.pl
contains code like this:
Expand|Select|Wrap|Line Numbers
  1. use strict;
  2. use  Date::Calc();
  3. print "hello";
  4.  

Can't locate Corp.pm in @INC (@INC contains: /usr/local/lib/perl5/site_perl/5.005/i386-freebsd /usr/local/lib/perl5/site_perl/5.005 . /usr/libdata/perl/5.00503/mach /usr/libdata/perl/5.00503) at ex.pl line 2.

thank u,
manogna.
Feb 6 '08 #1
Share this Question
Share on Google+
5 Replies


KevinADC
Expert 2.5K+
P: 4,059
hi!

i got the following error while using the Date::Calc module in perl.
plz help me..

the file is ex.pl
contains code like this:
Expand|Select|Wrap|Line Numbers
  1. use strict;
  2. use  Date::Calc();
  3. print "hello";
  4.  

Can't locate Corp.pm in @INC (@INC contains: /usr/local/lib/perl5/site_perl/5.005/i386-freebsd /usr/local/lib/perl5/site_perl/5.005 . /usr/libdata/perl/5.00503/mach /usr/libdata/perl/5.00503) at ex.pl line 2.

thank u,
manogna.

I'm assuming Corp.pm is a module that Date::Calc needs that is not installed in any of the folders your perl install uses to find modules. If Corp.pm is not used by Date::Calc then the error makes no sense because you are not trying to call any other modules in the code you posted. On a side note, that is a very very old version of perl you are using: 5.005. 10 years old maybe. Consider upgrading to 5.8.8 or 5.10 if possible.
Feb 6 '08 #2

P: 10
I'm assuming Corp.pm is a module that Date::Calc needs that is not installed in any of the folders your perl install uses to find modules. If Corp.pm is not used by Date::Calc then the error makes no sense because you are not trying to call any other modules in the code you posted. On a side note, that is a very very old version of perl you are using: 5.005. 10 years old maybe. Consider upgrading to 5.8.8 or 5.10 if possible.


hi!

thank u for ur reply!

if i use the use ::DBI also it is getting the following error...like this..
i did not understood why it is comming like that...

the code in ex.pl is:

Expand|Select|Wrap|Line Numbers
  1.  use DBI;
  2.  print "hello";
  3.  


Can't locate DBI.pm in @INC (@INC contains: /usr/local/lib/perl5/site_perl/5.005/i386-freebsd /usr/local/lib/perl5/site_perl/5.005 . /usr/libdata/perl/5.00503/mach /usr/libdata/perl/5.00503) at ex.pl line 1.
BEGIN failed--compilation aborted at ex.pl line 1.



please suggest me to rectify the error.


thank u ,

Manogna.
Feb 6 '08 #3

P: 2
Doesn't look like you have either of those modules loaded. Not sure if you are running on your on workstation or a remote server (looks to be a remote server), and that would mean you may not be able to upgrade your perl version, as previously suggested.

If you are learning Perl, and just starting out, I'd advise loading Perl onto your workstation. There are versions for most systems, including Windows (ActiveState), and Linux. On the windows version from ActiveState, Perl v5.8 comes with a graphical ppm module that gives you a nice way to manage perl packages. You can issue the ppm query command to see what modules are loaded from most versions too, if ppm is loaded. On a Linux box your native package manager would be similar.

If you don't have a system to use or manage, then it would be best to contact the system administrator of the system you are using to inquire about the versions and modules that are loaded. There might be specific rules about your access and ability to use Perl on a system with managed accounts.

Cheers
Feb 6 '08 #4

numberwhun
Expert Mod 2.5K+
P: 3,503
hi!

thank u for ur reply!

if i use the use ::DBI also it is getting the following error...like this..
i did not understood why it is comming like that...

the code in ex.pl is:

Expand|Select|Wrap|Line Numbers
  1.  use DBI;
  2.  print "hello";
  3.  
Can't locate DBI.pm in @INC (@INC contains: /usr/local/lib/perl5/site_perl/5.005/i386-freebsd /usr/local/lib/perl5/site_perl/5.005 . /usr/libdata/perl/5.00503/mach /usr/libdata/perl/5.00503) at ex.pl line 1.
BEGIN failed--compilation aborted at ex.pl line 1.



please suggest me to rectify the error.


thank u ,

Manogna.
Manogna,

Before you can use a Perl module, you must first install it. Modules aren't installed by default, at least not all of them. Perl does come with its own base set of modules.

I think you should first read up on how to install Perl modules. that will give you an idea of what to do.

Regards,

Jeff
Feb 6 '08 #5

P: 10
thank u very much!


for all of u!

i installed the modules in my machine and i got the respective functions for manipulate the data..



thanks and regards,

Manogna..................
Feb 8 '08 #6

Post your reply

Sign in to post your reply or Sign up for a free account.