in reply to Argh
my ($greatest, $gnum) = ('', 0); while($file = readdir DIR) { (my $fnum = $file) =~ /^(\d+)\./; next unless $fnum > $gnum; $gnum = $fnum; $greatest = $file; } [download]