Guest_imported
New member
- Jan 1, 1970
- 0
I want to be able to find modificiaton times in all my subdirectories. Please advise what I am doing wrong.
use strict;
my $finder = $File::Find::name; #not sure what to do here.
my $newfile = "/perl/bin/";
opendir(DIR,$newfile);
my @files = readdir(DIR);
close(DIR);
chdir ($newfile) or die "Could not change to $newfile directory\n$!\n";
for(@files) {
my $filename = $_;
next if ($_ != m/^\.+$/);
my $modtime = localtime ( (stat($filename))[9] );
print "file name : $filename\n";
print "MODIFICATION time : $modtime\n";
}
use strict;
my $finder = $File::Find::name; #not sure what to do here.
my $newfile = "/perl/bin/";
opendir(DIR,$newfile);
my @files = readdir(DIR);
close(DIR);
chdir ($newfile) or die "Could not change to $newfile directory\n$!\n";
for(@files) {
my $filename = $_;
next if ($_ != m/^\.+$/);
my $modtime = localtime ( (stat($filename))[9] );
print "file name : $filename\n";
print "MODIFICATION time : $modtime\n";
}