my $_FirstDir = "/home/path/public_html/software";
my $_secondDir = "/home/path/public_html";
opendir (DIR, $_FirstDir) or die "Couldn't open $_FirstDir: $!\n";
my @DirList = readdir(DIR);
closedir(DIR);
my $_filesNotThere = "";
my $_numMissing = 0;
my $_filesThere = 0;
foreach my $DirFile (@DirList) {
if (-e "$_secondDir/$DirFile") {
$_filesThere++;
} else {
$_filesNotThere .= "$_secondDir/$DirFile\n";
$_numMissing++;
}
}