#!/usr/bin/perl -w use strict; #-- Use modules use File::stat; use Time::Local; use Time::localtime; #-- Define local constants #-- Define local variables my $lNow; my $lStat; #-- Initialize variables $lNow=localtime(); $lNow=timelocal($lNow->sec,$lNow->min,$lNow->hour,$lNow->mday,$lNow->mon,$lNow->year); #-- Process all files foreach (@ARGV) { #-- Get the file's status $lStat=stat($_) || die 'Could not stat file ['.$_.']...'; #-- Print the time print $_,"\t",($lNow-$lStat->mtime()),' seconds old',"\n"; } #-- End of Script