sub recDir { my $f; my @theDir; my $DIR; my @theDir; system "pwd"; my @dfiles; @dfiles = glob("*.d"); foreach $f (@dfiles) { printf ("found $f \n"); } if (opendir ($DIR, ".")) { # print "+\n"; @theDir = readdir($DIR); foreach $f (@theDir) { unless ( ($f eq ".") || ($f eq "..") ) { # printf "-$f\n"; if (-d $f) { # printf "+$f\n"; chdir($f); recDir($f); chdir(".."); } } } } else { print "can't open Dir $sourcefile $! \n"; $globalerror = 1; } } chdir($ARGV[0]); recDir($ARGV[0]);