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

date compare problems

Thread Next
Alex Harris
January 7, 2002 09:26
date compare problems
Message ID:

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";

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";

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

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

when i added: use File::stat;

i got:
Can't locate Date/ in @INC (@INC contains: 
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.

Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About