in reply to Global variables question
may work better for you. This will filter out any directories. Also, I don't think that the files returned by readdir are guaranteed to be in any order, so if you sort, that will get things into a predictable, repeatable order.opendir( DIR1, $dir1 ) or die("Error opening: $dir1"); my @files1 = sort grep {-f "$dir1/$_"} readdir(DIR1);
|
|---|