|Just another Perl shrine|
Perl File-Test Operatorsby gyasuda (Initiate)
|on Aug 11, 2006 at 02:07 UTC||Need Help??|
gyasuda has asked for the
wisdom of the Perl Monks concerning the following question:
I am using an AIX 5200-05 (IBM UNIX) with perl.rte 184.108.40.206.
I have a file /tmp/log/startOnline.was_20050801_0701.joblog which has a timestamp of Aug 01 2005. The last time it was accessed and modified was like over 370 days. Of course, the /tmp/log directory has many log files.
In Perl, here is part of the code:
The output lists "/tmp/log/startOnline.was_DATE_TIME.joblog 0 0 0".
In Perl, I thought the "-M" file-test operator returns how long since the file has been modified, "-A" returns how long since the file has been accessed, and "-C" returns how long since the file's inode has been accessed.
If $logfile has the full path of the filename, how come the file-test operators display zeroes?
If I can get the file operators to work, I can finish my Perl script to start deleting the older log files.
Any help would be appreciated.