The above code doesnot give the age for the directory. It shows as 0 always. How can we find the age of both file and directoryopendir(DIR, $dirname) || die "can't opendir $dirname': $!"; @dots = readdir(DIR); closedir DIR; foreach $file (@dots){ my $diff = -M $file; print "The age is" .int($diff)."\n"; }
In reply to Age of directory by sandy1028
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |