my @list = `dir *.log \/B \/OD`; my $newest = $list[-1]; print "$newest\n";