open FILES1, "ls *|" or die "Can not run ls $!\n"; while (<FILES1>) { my $time1=time(); my $mtime = (stat ($_))[9] or die "Stat problem on $_: $!\n"; my $age_hours=($time1 - $mtime) / 3600 ; my $age_days= $age_hours/24; print "Got time $mtime hours: $age_hours days: $age_days \n"; } close FILES1;
In reply to Strange problem with stat by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |