develooper Front page | perl.beginners | Postings from January 2002

date compare problems

Thread Next
From:
Alex Harris
Date:
January 7, 2002 09:26
Subject:
date compare problems
Message ID:
F17czmullh3TNPF6kGt00014738@hotmail.com



Ok so I'm REALLY REALLY a newbie and this next question is going to sound 
like "where's the spoon" so you can feed me but...
Here's my code and the error I got.  I know it means I'm suppose to include 
something but I'm not sure what.

use File::stat;

   use Time::localtime;
   $date_string = ctime(stat($file)->mtime);
   $date_string2 = ctime(stat("zzp2.txt")->mtime);

   print "$date_string   $date_string2\n";


$date1=&ParseDate($date_string);
$date2=&ParseDate($date_string2);
$flag=&Date_Cmp($date1,$date2);
if ($flag<0) {
   print "date 1 is earlier\n";
} elsif ($flag==0) {
   print "the two dates are identical.\n";
} else {
   print " date2 is earlier\n";
}

errors:
without this: use File::stat;
i got the following

Undefined subroutine &main::ParseDate called at ztest.pl line 19.

when i added: use File::stat;

i got:
Can't locate Date/Manip.pm in @INC (@INC contains: 
/usr/opt/perl5/lib/5.00503/ai
x /usr/opt/perl5/lib/5.00503 /usr/opt/perl5/lib/site_perl/5.005/aix 
/usr/opt/perl5/lib/site_perl/5.005 .)

Does this mean I need to add it to my library and if so HOW!?!??!


_________________________________________________________________
Join the worldÂ’s largest e-mail service with MSN Hotmail. 
http://www.hotmail.com


Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About