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?

Thanks,
John

 > The display time is probably modification not - not creation time.
> Switch to mtime (9) and you should get better results:
>
> my $filename = 'whateve';
> 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";
>
> --
>    ,-/-  __      _  _         $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
>

_______________________________________________
Perl-Unix-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to