in reply to Checking if file has been modified in last 7 days using stat [9]

First, since you're only getting one element from stat, you might as well stick it in a scalar instead of an array. To see if a file was modified more than seven days ago, just get the current time and compare.

my $mtime = (stat $tapes)[9]; my $now = time; if( $mtime < ( $now - 604800) ) { print "$tapes is more than seven days old.\n"; }