perldoc -f readdir
perldoc -f stat
jue
perldoc -f stat
Example (using also a hash):
my $dir = '/path/to/some/directory';
opendir DIR, $dir or die $!;
my @files = grep -f "$dir/$_", readdir DIR;
closedir DIR or die $!;
my %moddates = ();
$moddates{$_} = localtime( (stat "$dir/$_")[9] ) for @files;
print "$_ : $moddates{$_}\n" for keys %moddates;
--
Gunnar Hjalmarsson
Email: http://www.gunnar.cc/cgi-bin/contact.pl
Please read http://www.cs.tut.fi/~jkorpela/usenet/xpost.html before you
decide to go off multi-posting again.