http://qs321.pair.com?node_id=783545

turbokwak has asked for the wisdom of the Perl Monks concerning the following question:

I'm a newbie to perl and I'm currently breaking my head on an issue now for 4 hours. The following iteration will print to the screen (a directory-listing), however will not print to the file. What i'm I doing wrong?
#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 creat +e $AllDevices";} while( ($file = readdir(DIR))){ print STRM_ALLDevices ("$file\n"); print ("$file\n"); } #closedir(DIR); close STRM_AllDevices; close $ConfFile;
Thank you for the response