open(LOGFILE, '>>test.txt') or die"Can't append: $!"; #### print LOGFILE "\nDirectory: $file\n";