$|++; print "Glob\n"; my @file2 = glob("tmp/*.tmp"); my $count2 = @file2; print "$count2\n"; print "Readdir\n"; opendir(DIR, "tmp") or die "Acck: $!"; my @file1 = grep /\.tmp$/, readdir DIR; my $count1 = @file1; print "$count1\n"; closedir DIR; print "Done\n";