ok thanks.
I tried with 'stat' but it doesn't not work.
use warnings;
use strict;
use File::Find;
my ($recent,$nom,$rep);
my $line;
$rep = 'D:\\';
# cherche le plus recent
sub plus_recent {
return unless -f;
return if defined $recent and $recent > (stat($_))
;
$nom = $File::Find::name;
}
find(\&plus_recent,$rep);
print $nom;
#open (LOG,"<D:\\log.log") || die ("Erreur d'ouverture de TOTO") ;
open(LOG,"$nom") ;
my @LogFilePosition=<LOG>;
close(LOG);
foreach $line (@LogFilePosition) {
if ($line =~ /CHAINERECHERCHEE/) {
print "C'est démarré !!";
}
}