in reply to Perl Stat Issue
use Modern::Perl; use File::stat; opendir( DIR, 'c:/data' ) or die('Cannot open directory'); my @files = readdir(DIR); closedir DIR; foreach my $file (@files) { my $full_name = 'c:/data/' . $file; my $st = stat($full_name); my $mod = $st->mtime; say "Filename $full_name has the mod date of $mod"; }
CountZero
A program should be light and agile, its subroutines connected like a string of pearls. The spirit and intent of the program should be retained throughout. There should be neither too little or too much, neither needless loops nor useless variables, neither lack of structure nor overwhelming rigidity." - The Tao of Programming, 4.1 - Geoffrey James
My blog: Imperial Deltronics
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Perl Stat Issue
by omegaweaponZ (Beadle) on Jun 26, 2013 at 15:24 UTC | |
by CountZero (Bishop) on Jun 26, 2013 at 19:10 UTC |