and your print statement becomes print LOGFILE "\nDirectory: $file\n";
In reply to RE: Appending to a file by Albannach in thread Appending to a file by curtisb