Ah hah! I removed the file::stat and it worked like a charm! Awesome!
Thanks, John > [EMAIL PROTECTED] wrote: > > Using > > > > my $filename = "$test"; > > my $mtime = (stat $filename)[9]; # or ctime is 10 > > my $time = time; # broke time out to print > > my $age = int (($time - $mtime) / 86400); # did int to drop fraction > > print "time=$time, mtime=$mtime, age=$age\n"; > > > > I get the following results: > > time=1031216545 mtime= age=11935 > > > > Note there is no mtime? It must not be stating the file right? I have the > > use File::stat; Any ideas past th is point? > > You don't need File::stat - stat is a core function. > > To use File::stat, you would do it more like: > > use File::stat; > my $st = stat($filname) or die "stat($filename): $!"; > my $time = time; # broke time out to print > my $age = int (($time - $st->mtime) / 86400); > print "time=$time, mtime=$st->mtime, age=$age\n"; > > -- > ,-/- __ _ _ $Bill Luebkert ICQ=162126130 > (_/ / ) // // DBE Collectibles Mailto:[EMAIL PROTECTED] > / ) /--< o // // http://dbecoll.tripod.com/ (Free site for Perl) > -/-' /___/_<_</_</_ Castle of Medieval Myth & Magic http://www.todbe.com/ > _______________________________________________ Perl-Unix-Users mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs