#Setting the variables $AllDevices='All_Devices.txt'; # Listing the devices opendir (DIR,$_AllConfDir) || die "Error in opening dir $_AllConfDir\n"; unless (open STRM_AllDevices, ">> $AllDevices") { die "Could not create $AllDevices";} while( ($file = readdir(DIR))){ print STRM_ALLDevices ("$file\n"); print ("$file\n"); } #closedir(DIR); close STRM_AllDevices; close $ConfFile;