Hi All Perl experts,
I am new to Perl and got a real stupid question. We are trying to install the Date:Calc package for some calculations with dates.The security guys mentioned they won't install it as root in /usr/bin/perl but have asked us to install it in any directory and use it from there.
Here's the sample program that I created to test this scenario.But I am getting an error.Any help will be appreciated.
(rk3388) mpdev1=> ./test1.pl
Can't locate Date/Calc.pm in @INC (@INC contains: /home/ss1880/Date-Ca
+lc-6.3/li.
BEGIN failed--compilation aborted at ./test1.pl line 4.
#!/usr/bin/perl
use lib '/home/ss1880/Date-Calc-6.3/lib/Date/';
use Date::Calc;
my @today = (localtime)[5,4,3];
$today[0] += 1900;
$today[1]++;
my @birthday = (1980, 4, 3);
my $days = Delta_Days(@birthday, @today);
print "I am $days days old\n";
exit 0;
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.